[FFmpeg-user] How to decode one frame and encode one jpg if using qscale

penguin flying theflyingpenguin2020 at gmail.com
Tue Mar 17 17:04:04 EET 2020


using this cmd
ffmpeg -i in.mp4  -copyts -f image2 -vframes 5   -y %03d.jpg
will decode one frame and then encode it to one jpg at the same time,
AND the picture will be encoded in default quality.

BUT when I want to improve the quality of the image after adding the param
"qscale",
ffmpeg -i in.mp4  -copyts -f image2 -vframes 5 -qscale:v 2   -y %03d.jpg

I found that three or more frames must be send to the encoder before the
first jpg comes out.

How to send one frame and then one picture out when using "qscale"

PS: the source file  in.mp4 has B frames


More information about the ffmpeg-user mailing list