Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to convert an MKV file to AVI format. I've tried different settings and there is always a slight crackling in the background. Why does this happen? How can I convert an MKV file to a different video format while preserving the sound quality?

share|improve this question
up vote 1 down vote accepted

ffmpeg -i filename.mkv -vcodec copy -acodec copy output.avi should do it, see Ignacio's answer. he's right, this is just the command to support his answer

share|improve this answer
The conversion worked and the sound problem isn't there anymore. However, I noticed that the playback isn't smooth anymore. Why could that be? – tony_sid Dec 30 '10 at 2:09
maybe avi container doesn't like the framerate-correction keyframe issue probably – RobotHumans Dec 30 '10 at 2:13
you could try ffmpeg -i filename.mkv -sameq -acodec copy output.avi – RobotHumans Dec 30 '10 at 2:15
that should resync everything and keep the quality – RobotHumans Dec 30 '10 at 2:30
it doesn't preserve the quality better, it is almost exactly the same quality. it just re-renders the video and to keep the same quality the size grows...copy is EXACTLY the same. jerkiness going away is the re-encode of both channels and resync. I was trying to get around re-encoding for all the keyframe and audio syncing stuff. it might be that avi and mkv support different size slices between keyframes, so the copy of media gets jerky because it thinks the slice is done when there's more data. that could explain the popping. that happens sometimes when you release and grab a soundcard – RobotHumans Dec 30 '10 at 14:46

Converting from one container to another does not affect the quality of the contents. You may be suffering from underruns though, where the codec suddenly runs out of data to convert. Check your mux/interleave settings.

share|improve this answer
There are settings which affect quality for both audio and video, so I don't see how they're not affected. What kinds of settings should I be looking for? – tony_sid Dec 30 '10 at 1:27
@Ignacio answer would be add ram or processor, but then I'm a hardware whore. You might be able to do it in settings. I just use an ax instead of a rapier – RobotHumans Dec 30 '10 at 1:28
@Linux Jedi I think he means if you specify sameq etc. the container has nothing to do with codec or bitrate. – RobotHumans Dec 30 '10 at 1:29
I don't think my computer is underpowered. That shouldn't make a difference though, right? It will just take longer to convert, is that correct? What's sameq? You mean same quality? I tried that and it doesn't really make a difference? – tony_sid Dec 30 '10 at 1:39
the -sameq flag is for video...there's a similar switch for audio i think....but it means don't transcode audio at all just duplicate the stream...don't remember's in the man page...correction not in the man page just checked, but i know i used it – RobotHumans Dec 30 '10 at 1:42

Your Answer


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.