H264 decompression/decomposition into JPG - quality issues

0

I'm trying to decode a 1920x1080 30fps h264 stream. Individual frames look outstanding in VLC media player (pausing the playback), but when I decode using avconv (ffmpeg has been deprecated and replaced by avconv), the frame quality is really poor by comparison (my primary complaint is blockiness).

Here's how I am calling avconv:

avconv -i video.h264 -s 1920x1080 -f image2 temp/images/video-%03d.jpg

Is there a jpg output setting for avconv? I read what I suspected were the salient parts of the avconv documentation (namely, http://libav.org/avconv.html#image2-1), and couldn't find any way to specify the output jpg quality.

In addition, it appears avconv reads the entire stream before it starts decoding it, so if the stream is in progress, it only decodes to where the stream was when avconv started the decoding process. Is there any way around this? In other words, if a 10-second-long stream is started at t seconds and avconv is started at t+1 seconds, avconv will only decode 1 second of the stream.

Respectech

Posted 2013-06-05T18:11:21.150

Reputation: 103

1To clarify, the libav (a fork of FFmpeg) version of their ffmpeg has been replaced by avconv, but the way the "not developed"/"deprecated" message was written makes users think that FFmpeg (the project) and/or ffmpeg (the cli tool) have been "replaced" which is not true. – llogan – 2013-06-05T21:55:52.677

Answers

1

You can force the JPEG quality scale to the best possible JPEG quality by using the -q:v 1 parameter:

avconv -i video.h264 -s 1920x1080 -f image2 -q:v 1 temp/images/video-%03d.jpg

Nick van Tilborg

Posted 2013-06-05T18:11:21.150

Reputation: 775

0

JPEG is a lossy codec, perhaps use PNG

ffmpeg -i video.h264 -s 1920x1080 temp/images/video-%03d.png

Steven Penny

Posted 2013-06-05T18:11:21.150

Reputation: 7 294