[FFmpeg-user] How can I simplify these two scale calculations?

ogrgkyle phthluar at gmail.com
Thu Aug 6 23:55:47 CEST 2015

Yes, apparently the formatting tag I used is not supported.  Here is the

ffmpeg.exe -y -i "myvideo.avi" -vf
"yadif=0:-1:0,framestep=2,scale=iw*sar:ih,scale=-2:ih/3.3333" -c:v libx265
-preset placebo -b:v 53.905k -pass 1 -ac 1 -cutoff 12000 -c:a libopus -b:a
16k -vbr 1 -f matroska NUL && \
ffmpeg.exe -y -i "myvideo.avi" -vf
"yadif=0:-1:0,framestep=2,scale=iw*sar:ih,scale=-2:ih/3.3333" -c:v libx265
-preset placebo -b:v 53.905k -pass 2 -ac 1 -cutoff 12000 -c:a libopus -b:a
16k -vbr 1 "myvideo.mkv"

Moritz, thanks for pointing out 1/3 vs. 1/3.3333.  Yes, I wanted 33% (1/3),
not 30% (1/3.3333).  In the solution you gave (scale=iw/3*sar:ih/3), how can
I ensure that both dimensions are divisible by 2?  Since they are both
explicitly defined, I cannot use -2, right?

View this message in context: http://ffmpeg-users.933282.n4.nabble.com/How-can-I-simplify-these-two-scale-calculations-tp4671742p4671747.html
Sent from the FFmpeg-users mailing list archive at Nabble.com.

More information about the ffmpeg-user mailing list