Dreamstime

Wednesday 20 February 2013

Converting YouTube's .FLV files to .MKV format

This is what I did to convert YouTube's .FLV files to the .MKV format with Avidemux. Video and audio in the .FLV files are encoded in the H264 and AAC codec, respectively.

The most obvious and easiest thing to do is to just use the COPY mode for video and audio in Avidemux without doing any reencoding. But it did not work. What I got were just very very badly out of sync .MKV files. I tried fixing these .MKV files by shifting the audio like I do with my VirtualDub TV captures. But it did not work either.

Video And Audio Options To Set In Avidemux

What I did in the end is to just use the COPY mode for video but to reencode the audio into the MP3 format. I could have reencoded the video and copy the audio, but this will take a longer time since the size of the video is always significantly larger than the audio. It took me about 25 minutes in total to convert a 900MB .FLV file to .MKV. Audio and video in the converted files are in sync this time.

H.264 Detected In Avidemux

Note: When I opened the .FLV file, Avidemux showed a "Confirmation" dialog box, "H.264 detected". I responded by just choosing "No" to this dialog box.

2 comments: