/ffmpeg-pyscripts

Python scripts to perform some tasks using FFmpeg

Primary LanguagePythonMIT LicenseMIT

Python scripts to perform some tasks using FFmpeg.

encode-video.py

Creates mkv file from H.265 encoded video and copies of other elementary streams from the source file. If you specify a directory in the --input option, then all files in the specified directory are processed.

Usage:

encode-video [-h] [-i INPUT] [-o OUTPUT] [--preset PRESET] [--crf CRF] [--scale WIDTH:HEIGHT] [--tune TUNE]

Options:

-h, --help
Show help message and exit.
-i INPUT, --input INPUT
Input directory or file.
Default: C:/videoconv/input/.
-o OUTPUT, --output OUTPUT
Output directory.
Default: C:/videoconv/output/.
--preset PRESET
The preset determines compression efficiency and therefore affects encoding speed.
Available options: ultrafast, superfast, veryfast, faster, fast, medium, slow, slower, veryslow, placebo.
Default: slow.
--crf CRF
Constant rate factor (the lower CRF, the higher the video quality).
Default: 22.
--scale WIDTH:HEIGHT
Resolution parameters of the output video. They are set in the format width:height (for example, 1920:1080). Any of these parameters can be set as -1 for automatic calculation (for example, 1920:-1).
If this option is not specified, the resolution does not change.
Default: None.
--tune TUNE
Settings based upon the specifics of your input. By default, it is disabled.
Available options: film, animation, grain, stillimage, fastdecode, zerolatency, psnr, ssim.
Default: None.