Reputation: 15122
Different between '-s' and '-vf scale=' in ffmpeg?
And for a two-pass transcoding in ffmpeg, what's the difference or influence then?
Upvotes: 5
Views: 5828
Reputation: 133873
Using the md5 muxer to compare.
-s
$ ffmpeg -i input -an -s 640x360 -f md5 -
...
MD5=6280d86947e18d6633f4eddc299cf8a4
-vf scale
$ ffmpeg -i input -an -vf scale=640:360 -f md5 -
...
MD5=6280d86947e18d6633f4eddc299cf8a4
I believe -s
is mapped to scale
but I'm not totally sure and did not look at the source code to find out.
scale
instead of -s
You can use it with other filters and determine exactly where in the filtergraph you want the scale to occur.
It is more flexible because you can use additional options and expressions.
You can just declare one dimension and scale
can automatically determine the other while preserving aspect ratio: scale=640:-1
.
See the FFmpeg scale video filter documentation for more info.
Upvotes: 13