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.

Trying to figure out how to get avconv to concatenate a bunch of .bmps together into a video file.

Here's what I've got so far:

avconv -f image2 -i Capture/%d.bmp -vcodec mpeg4 -r 24 -b:v 20M Capture.mkv

While this does work, the quality is terrible - there are tons of artifacts that are visible, the colours are distorted and everything is blurred.

I've trawled through the documentation for avconv and ffmpeg, but can't find anything that increases the quality.

Any ideas as to how I can get the quality as close to the original bmps as possible?

share|improve this question

migrated from stackoverflow.com Jul 9 '12 at 13:52

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

2 Answers 2

-vcodec mpeg4

That could be your problem. MPEG-4 is a fairly good codec, but it's easily outperformed by h.264 – x264 being a popular example for an h.264 encoder. I'm not sure how big of a role the bitrate plays here, but it would help to just try x264. Therefore, use

-c:v libx264

to change your encoder.* In order to tune the quality, set the Constant Rate Factor to a level of your choice. Sane values are from 19 to 24, where lower values mean better quality.

avconv -f image2 -i Capture/%d.bmp -c:v libx264 -r 24 -crf 21 Capture.mkv

If you still see artifacts, you might want to give us more info, and update your post with the full, uncut console output from your avconv command.

* -c:v is the new syntax used instead of vcodec, similar to -b:v. Try to keep sticking to that.

share|improve this answer

Try using a different video codec. It might only work in QuickTime files (not Matroska), but qtrle is a lossless video codec, although it doesn't compress very well.

share|improve this answer

Your Answer

 
discard

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