How do I convert mkv to avi?
January 17, 2009 6:49 PM   Subscribe

How do I convert mkv to avi, preferably without re-encoding?

My understanding is that both mkv and avi are containers, so it seems like it should be possible to extract the video and audio from the mkv and then put them back together as an avi without having to actually convert the video. Is this right? If so, how do I do it?

I'd prefer a solution that will work in Ubuntu (command line OK), but XP is also fine. Also, since I have never managed to get avidemux to do anything other than freeze, avoiding it would definitely be OK with me.
posted by fidelity to Computers & Internet (7 answers total) 3 users marked this as a favorite
 
Assuming you already have mplayer/mencoder, according to this page, this should work:
/path/to/mencoder /path/to/source.mkv -oac mp3lame -ovc copy -o /path/to/output.avi

posted by Remy at 7:00 PM on January 17, 2009


Best answer: Quick Media Converter is free and does pretty much anything. It is a front-end for FFmpeg (a command line solution). See details at Lifehacker here.
posted by skypieces at 7:12 PM on January 17, 2009


xp: mkv2vob works; it's geared towards making files that PS3s will play. For about 90% of current mkvs, it just remuxes but occasionally it transcodes.
posted by ROU_Xenophobe at 7:15 PM on January 17, 2009


Best answer: AVI-Mux GUI is quite good at this on XP. Beware that H.264 in an AVI is an ugly hack and AAC audio flatly won't work with most splitters.

If you're going to do it with mencoder, as remy suggested, you want this command line to avoid re-encoding:

/path/to/mencoder /path/to/source.mkv -oac copy -ovc copy -o /path/to/output.avi
posted by Inspector.Gadget at 7:23 PM on January 17, 2009 [1 favorite]


Best answer: I'd prefer a solution that will work in Ubuntu (command line OK)

Then mencoder, using the command line that Inspector.Gadget has given you, is a solid choice. Ffmpeg should also work fine:

ffmpeg -i /path/to/source.mkv -vcodec copy -acodec copy /path/to/output.avi

For Ubuntu, these tools are best obtained by adding the appropriate Medibuntu repository. Having done that,

sudo apt-get install mplayer mencoder ffmpeg libdvdcss2 non-free-codecs

should install all the multimedia conversion goodness you are ever likely to need.
posted by flabdablet at 9:38 PM on January 17, 2009


just as a note but in XP/Vista vlc media player plays mkv and avi's w/o a problem...
posted by knockoutking at 12:26 PM on January 18, 2009


Response by poster: Thank you all. Every time I try to figure out anything to do with codecs my brain seems to just stop working. Thanks especially to flabdablet for the Medibuntu tip, which is a much easier way to install all those "non-free" media things.
posted by fidelity at 3:01 PM on January 22, 2009


« Older Bank recommendations in Austin?   |   It's the fist that keeps on fisting. Newer »
This thread is closed to new comments.