I want all the parameters of a video to be just good enough to minimize the size as much as possible.
I want to know how to write the ffmpeg command so that a video has a max height of 720p, a max bitrate of 2 megabits per second or less, a max frame rate of 30 fps, a max audio bitrate of 64 kilobits per second.
How do I know if I should use
b:v because I've read I have to chose one of them. I wanted to use
-crf and if the resulting video was going to be above a given max bitrate I would use
-b:v instead. How can I be sure I use the one that achieves the lowest bitrate between
-crf 26 and
There are some arguments that I have to use always, right? Like the video and audio encoding. I've tried adding it only when it's not already the one I want and it was turning
aac audio to
vorbis. So I guess the base command needs to be:
ffmpeg -i input.mp4 -c:v libx265 -crf 26 -c:a aac output.mkv
And then depending on the input I would add more parameters?
I want to make sure to avoid executing the command twice for the same video. How can I skip a video if it's already been processed?
Here is what I'm trying to do in python:
I would also like to know what are all this options for. I've copied them from another project.
-progress pipe:1 -map 0 -map -v -map V