I recently wanted to do a little content editing of an MKV file. I really didn’t want to spend time converting the file (and losing video and audio resolution), but every “trick” I could find online involved downloading software for demuxing, converting, etc. (things that take time, and mostly things that alter the original video –not to mention things that often come from shady sources).
So I thought about it for a bit, poked around in some of the (free) software I had readily available, and found a solution.
An MKV file is just a container. Thus, I figured I could just change the extension (.mkv) to something else more “useable” (like .mp4) and mess with it that way. Just changing the extension made Adobe Premiere unhappy (header issues), but as usual, VLC handled it just fine. Not only that, but VLC ultimately turned out to be the solution for what I needed to do.
In VLC, you can save a file (right click the file in your playlist and select “save” from the list), and under the “settings” options you have “convert” and “dump raw input.” First I tried utilizing the RAW option, but when it went to “streaming” after clicking “start,” there didn’t seem to be any progress, so I tried the next option.
Using the “convert” option, you can select pretty much any preset to do what we want to do, but I wanted an MP4 so I chose the first thing on the list: Video – H.264 + MP3 (MP4). Of course I don’t want MP3 for my audio (I want to keep the original file format), but don’t worry! The next step is to click the tools/settings button next to the profile drop down. There you will see tabs for “video codec” and “audio codec.” In each of those settings, you can choose “keep original video track” and “keep original audio track.” Once you do that, you simply click “start” and you’ll see your progress bar tick away. It took me about four minutes to ouput a 2 hour movie that was originally 17.8 GB as an MKV. However, the new file was now 11.4 GB, so obviously something had changed (and I assume resolution was lost, thought the file still looked pretty similar to the original).
I actually created a profile called MKV to MP4 wherein I selected the “original video” and “original audio” options with an MP4/MOV container, and the subsequent “conversion” took only around 20 seconds. I had opened and closed VLC several times, but I suppose the conversion could have still been using cached files.
UPDATE: If the original audio format (like the audio in the file i was using) isn’t an audio format that VLC has in its output codec selection, trying to utilize the “original audio” option will create a file with no audio. I’m not sure why it does this, but to correct for the problem, I changed my profile to convert the audio, and set up the audio as a high bitrate AAC with a sample rate the same as the original (48KHz). The resulting file was a bit larger than the previous and took longer to output (because it’s actually converting the audio), but now has audio and can be imported into Adobe Premiere.
It turns out that the RAW dump is actually the better option if you’re trying to keep the file exactly like the original (just changing the extension), it just wasn’t showing me a live process when it was outputing a file. I tried the RAW option again, and sure enough, after about four minutes (the same amount of time the above “convert” option took), I found I had an MP4 exactly the same size as the original MKV. Unfortunately the file still wouldn’t work with Premiere, althought now i just get a “generic error” when trying to import the MP4 into Premiere.
…
No comments:
Post a Comment