[FFmpeg-user] output jpeg quality
greenkoopa at gmail.com
Thu Jan 15 09:05:51 CET 2015
On 12 Jan 2015, Lou <lou at lrcd.com> wrote:
> On 10 Jan 2015, Green Koopa <greenkoopa at gmail.com> wrote:
> > This creates one image for each second of video:
> > ffmpeg -i 00020.MTS -vf fps=fps=1 -f image2 stills-%03d.png
> > When I change the output format to jpeg, it does the same:
> > ffmpeg -i 00020.MTS -vf fps=fps=1 -f image2 stills-%03d.jpeg
> > But there is a problem. The quality of the jpegs begin okay, but quickly
> > deteriorate. By the tenth image or so, they are unusable. This seems
> > strange to me, but this is my first day with ffmpeg.
> Does it look better if you use -qscale:v (or -q:v)? It's a linear scale
> of 1-31. A doubling of the value will probably (very) roughly halve the
> bitrate. 2-5 are good values to try, but you can experiment.
> You don't need the "-f image2".
-q did set the jpeg compression level, making it consistent across frames.
(It had no affect on the png compression level.) Thanks for the tips Lou.
When outputting frames like this, is there a way to put the frame
number/time in the output file name? Otherwise, it looks like I have to use
the drawtext filter to add it to the images.
More information about the ffmpeg-user