don't take my picture

Alex Keeling

ffmpeg standard command

From February 5th, 2016

I use ffmpeg just infrequently enough that every time I go to use it, I need to look up the commands again. I’m typically converting a video taken with┬ámy point-and-shoot Canon from a huge MOV file to a much smaller┬áMP4 so that I can more easily share them with family & friends.


For future reference for myself, here’s more or less what I usually want:


ffmpeg -i input.MOV -c:v libx264 -crf 22 -s 1280x720 output.mp4


CRF is Constant Rate Factor. Lower values give larger file sizes with better quality, while higher values give smaller file sizes with lower quality. A good rule of thumb is to try for between 20 and 30. When I’m just sending videos of things like kids’ birthday parties to family, I’ll often end up around 30 or 32 to get the file size down. If you’re working on something important, you’ll want to stick to lower values.


More information written by people more experienced with this than me can be found here and here.