wheenglish.blogg.se

Ffmpeg scale crf
Ffmpeg scale crf








I'm not sure why someone added audio encoding to the first pass example in the wiki, but I've never needed to do that, so I omitted it. You just need to tell it the duration and the desired output file size.Įxample if your input is 1 hour long and you want an output of approximately 900 megabytes:įfmpeg -y -i input -c:v libx264 -preset slow -b:v 1918k -pass 1 -an -f mp4 /dev/null & \įfmpeg -y -i input -c:v libx264 -preset slow -b:v 1918k -pass 2 -c:a libfdk_aac -b:a 128k -movflags +faststart output.mp4 If you don't feel like doing the math you can use a simple bitrate calculator (). (In the vast majority of all other cases, and if file size is not a priority, I recommend just using single pass with -crf). Using a slow preset will give good compression and a CRF of 19 will keep most of the original video quality. The range of the scale for crf and qp for 8-bit is from 0 to 51, where 0 is lossless, approximately 18 is visually lossless, 23 is the default value and 51 is. If you have large number of pictures to rename, you can use the following command to ease the burden. The following example will start with img100.jpg : ffmpeg -f image2 -startnumber 100 -i imgd.jpg /tmp/a.mpg. Using two-pass method can allow you to achieve a desired output file size. This is useful if your sequence does not start with img001.jpg but is still in a numerical order. See the Two-pass example in the link provided by SeijiSensei:










Ffmpeg scale crf