解决新版本 FFmpeg 警告:-vsync is deprecated. Use -fps_mode

1,926 阅读1分钟

情景:

$ ffmpeg  -i input.mp4 -vf select='between(n,20,24)' -vsync 0  frames/%3d.png
...
-vsync is deprecated. Use -fps_mode
Passing a number to -vsync is deprecated, use a string argument as described in the manual.
...

解决: 使用 -fps_mode 替代。

$ ffmpeg  -i input.mp4 -vf select='between(n,20,24)' -fps_mode drop frames/%3d.png

或者

$ ffmpeg  -i input.mp4 -vf select='between(n,20,24)' -fps_mode vfr frames/%3d.png

作用: 直观感受就是不会出现重复帧 —— dup=0

解决依据来自 官方文档

image.png