Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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.

share|improve this question

migrated from stackoverflow.com Jun 5 '13 at 23:20

This question came from our site for professional and enthusiast programmers.

1  
To 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. –  LordNeckbeard Jun 5 '13 at 21:55
add comment

2 Answers

up vote 0 down vote accepted

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
share|improve this answer
add comment

JPEG is a lossy codec, perhaps use PNG

ffmpeg -i video.h264 -s 1920x1080 temp/images/video-%03d.png
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.