Skip to content

Python script for compressing a bunch of videos to one size

License

Notifications You must be signed in to change notification settings

antonsizikov/video-compress

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Video Compressor

This script calculates video bitrate based on file duration and target size and than compresses the video with this value in 2 passes to save maximum quality.

Targeted size is usfull if you want to compress video for some of the social networks.

Also you can eneble hardware acceleration to speed up the process but it is not recommended if you want the best quality.

Using

Clone the repository to your computer:

git clone https://github.com/antonsizikov/video-compress.git

To start the script type the following command in folder with the script:

python3 compress.py

Or doble click on compress-mac.command ro compress-win.bat.

Than you need to type the path to folder with videos and target size and wait until compression is done.

FFmpeg

This script requires FFmpeg. You can install it on your system using the following commands.

Windows:

winget install ffmpeg

macOS:

brew install ffmpeg

About

Python script for compressing a bunch of videos to one size

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages