很多默认转码命令:
ffmpeg -i [video] -f image2 output_%d.jpg
但是转码出来的图片像素不高,如下图所示:
可以使用qscale命令,说明如下:
Use -qscale:v
Use -qscale:v (or the alias -q:v) as an output option. Effective range for JPEG is 2-31 with 31 being the worst quality. I recommend trying values of 2-5.
ffmpeg -i [video] -qscale:v 2 -f image2 output_%d.jpg
保存单张图片:
ffmpeg -i [video] -qscale:v 2 -f image2 -vframes 1 output.jpg
效果如下所示: