Easy way to deal with MKV files
+9
shewolf51
JulietProductions
Lucyrinoa
Lymun
Tifa326x
Haeresis
Feta
TheSylphOne
Azure Vermillion
13 posters
Page 1 of 2
Page 1 of 2 • 1, 2
Easy way to deal with MKV files
Okay, so I know a lot of people seem to despise using MKVs when editing because for most people, they most don't want to ever work with a NL video editor, and the people who know how to covert them know of the hassle and the huge amounts of disk space required to do so in a lossless format.
However, I have a solution:
General notes about this method.
Some general knowledge - Stuff you don't actually have to read xD
PLEASE DON'T BOTHER CLICKING THIS, IT'S ALL OUTDATED AND A LITTLE CONVULTED!!!!The steps for getting an .mkv to work in an editing suite (The stuff you actually wanna read!!)
PLEASE FOLLOW THIS INSTEAD!
EDIT: Alright guys, it's about time I updated this little guide since I've found more effective ways to do things
Here we go
1. Download MKVtoolnix - http://www.videohelp.com/tools/mkvtoolnix - and MKVcleaver - http://www.videohelp.com/tools/MKVcleaver-
Install MKVtoolnix and extract MKV cleaver
Uhh since you made it this far here is a picture of the final product and my current Background wallpaper
If you found this helpful, that's awesome. If you're having any sort of trouble, please reply here and I'll help you out as best as possible.
Also, if you want I'll make another guide on how to export videos from Vegas as H.264/x64 MKV/MP4 files. Where the file quality is practically lossless and filesize is significantly smaller than a wmv, mov or xvid/avi file.
However, I have a solution:
General notes about this method.
- Spoiler:
This method is much less painful and once you get familiar with it, you wont ever want to convert to huffy again
It saves time (once you get used to this, it takes less than 10 min per video) and also saves disc space (it should be smaller than the original file!!!)
However, I don't know if builds for these programs exists for the MAC OS, something like Avidemux should do the trick though
Some general knowledge - Stuff you don't actually have to read xD
- Spoiler:
90% of the time most import problems are caused not by the file extension (.avi .mkv. .mp4 .mov etc) these file extensions are the 'containers for the video and the codec used to compress them
What is the problem then, if it isn't the container most of the time?
If it isn't the containers fault, it can only be the codec's fault! - that is why some .avi files will seem to work, while others don't - a majority of these problems can be fixed by either updating the codec/decompressor
(however, even if you have the relevant decompressor/codec sometimes the editing suite can just be incompatible with a certain codec or file extension - That being said, regardless of the codec used to compress it, as a general rule .mkv (mastroska files) don't really work well with editing suites, Sony Vegas in particular
Okay then how do you get .mkv (Matroska files) to import and be editable in Sony Vegas?
Before that you need to know a little bit about the MKV (Matroska) files
Do you remember what I said about 'containers' before? They just are there to bundle the sound and video (and text, if applicable) streams together
Hardsubbing in fansubbing refers to when the text/subtitle stream has been physically pressed/flattened 'hardcoded' on the video stream, so physically the added text/subtitles are now apart of that stream and cannot be easily removed
This is usually the case in .avi containers
Softsubbing is when all three layers are still separate streams, are played at the same time, which each can be turned off when desired
This this usually the case with .mkv and sometimes .mp4 containers
What does softsubbing mean for you?
Something very amazing, it means you can actually extract those streams from the container and effectively create a RAW file for you to edit with
PLEASE DON'T BOTHER CLICKING THIS, IT'S ALL OUTDATED AND A LITTLE CONVULTED!!!!
- Spoiler:
Here are the steps to make the .mkv file playable in a program like Sony Vegas, Adobe Premiere or Final Cut Express and etc
1. Get a MKV file. (that's the easy part!)
2. Demux the file
(Demuxing is the splitting and extracting of the tracks that make of the video file, they include: The video stream, the audio stream(s) and subtitles, chapters and whatnot.)- Spoiler:
Here is a guide for extracting (demuxing) an .mkv container
http://www.dvd-guides.com/content/view/157/59/ - this should also include links to the programs and whatnot needed to do so
DON'T DOWNLOAD THE FILES FROM THAT GUIDE, THEY ARE OLD AND BUGGY, DOWNLOAD FROM HERE:
http://www.videohelp.com/tools/mkvtoolnix- This is the latest version of MKVtoolnix, Place the contents of mkvextract into this main directory
MKVextract is here: http://www.videohelp.com/tools/MKVExtractGUI
-Note, remember to keep MKVextract in the same directory as everything else, as shown in my picture
3. You should now have just the RAW .h264 video stream and audio streams as separate files. (meaning a video with no sound and an audio file, and an .ass subtitle file. If you decide to extract everything) So if you want to use audio from the file in your video, either import it separately into your editing suite, or encode it with the video file with something like virtualdubmod
You also have your original file unaltered and unharmed meaning if something happens later, you still have the original file
4. You need to put that h264 video stream into an AVI container so that Sony Vegas and the likes will accept the file and let you edit it.
Tthis is the program you need to put the h264 stream into an AVI container http://www.videohelp.com/tools/avc2avi
(This is my little guide)
Notes and things to remember- Spoiler:
- Just remember to select 'all files' and pick the extracted stream, not the original. Otherwise the program will just crash
- Also remember to pick your footage's framerate - It's very important to get this part right because if you don't your clips bit become faster or slower depending on what they originally were, can cause blending and syncing issues later on.
For most downloaded video framerate is usually 23.976
- The black command prompt screen is meant to be blank, don't panic!
It's doing its job - if it doesn't crash within 20 seconds ( an actual crash message) it means you have done it right and you now just have to leave your computer alone for a bit. You'll get a confirmation message when it's finished. (A blank screen means it is working, and should be left alone)
Now apparently, Sony Vegas doesn't really like .avi/xvid container when you import them as the lack of single intra frames (due to the way Xvid compresses files) eventually screws up your videos on the timeline. If at all possible convert them to MJEPG or something lossless.
If ever you're having problems with Vegas (or other video editing suites) and footage, consider it is not the fault of the suite, but a problem with how your footage was encoded. Also Converting your footage to MJEG (while filesize is extremely bloated) it is faster and smoother to work with... but that isn't the point of this guide.
Oh also, as a general rule.
Resampling is something that shouldn't really be turned on unless your playing around with the velocity (speed of the clip) and only then it should be enabled for that specific clip (so turn it off)
PLEASE FOLLOW THIS INSTEAD!
EDIT: Alright guys, it's about time I updated this little guide since I've found more effective ways to do things
Here we go
1. Download MKVtoolnix - http://www.videohelp.com/tools/mkvtoolnix - and MKVcleaver - http://www.videohelp.com/tools/MKVcleaver-
Install MKVtoolnix and extract MKV cleaver
- Spoiler:
It's a very simple layout and everything is pretty self explanitory
1. Import your desired mkv footage
2. Select your output directory
3. Locate the mkvtoolnix folder
4. Check off (on the right) what streams you want demuxed
5. Check off convert H.264 to avi
6. Click the extract tracks button
NB. The program doesn't pormt you that your files have finished extracting/converting. Check the bar at the bottom left of the screen - or simply wait for the 'extract tracks' button to turn grey and unclickable
You need to locate your mkvtoolnix folder before you can choose to demux the video file. - You might need FFDshow or similar to startup/and/or convert to AVI Though it is pretty much commonplace nowday.
Uhh since you made it this far here is a picture of the final product and my current Background wallpaper
If you found this helpful, that's awesome. If you're having any sort of trouble, please reply here and I'll help you out as best as possible.
Also, if you want I'll make another guide on how to export videos from Vegas as H.264/x64 MKV/MP4 files. Where the file quality is practically lossless and filesize is significantly smaller than a wmv, mov or xvid/avi file.
Last edited by Azure Vermillion on 30th September 2010, 2:13 pm; edited 5 times in total (Reason for editing : Overhaul of guide, suggested a different approach to things.)
Re: Easy way to deal with MKV files
Good guide. I haven't had to deal with .mkv files much but the next time I do I'll be sure to follow this guide :D
Re: Easy way to deal with MKV files
Thank you! I might try this. I used to convert my .mkvs in a lossless format but the files were HUGE.
One question though. Is there any quality loss during this procedure?
One question though. Is there any quality loss during this procedure?
Re: Easy way to deal with MKV files
No quality loss at all, because you aren't encoding anything, merely extracting the stream and placing it into another container, In this case, an Avi container.Feta wrote:Thank you! I might try this. I used to convert my .mkvs in a lossless format but the files were HUGE.
One question though. Is there any quality loss during this procedure?
However if the video was anamorphic Widescreeen, the video may lose it's DAR flagging and will appear to have a 4:3 DAR. This has only really ever happened once for me, but, it's absolutely no problem if you're just working with that footage alone, as it can be easily corrected after you export your finished project.
Don't panic, you haven't lost any quality, nor have you cropped the video. All you would need to do is mux the exported file back into a container such as MP4 or M2ts which supports DAR flag changing. You can restore it's widescreen appearance when you st the flag back to 16/9. Again, just muxing, so no quality loss.
Though if need be I'll cover this in my next guide.
Re: Easy way to deal with MKV files
THANK YOU FOR THIS GUIDE!!!
This is exactly the thing I was looking for since encoding in Lagarith was taking up way to much of my hard drive.
The only problem I'm having is that the link to the program that allows you put a h264 stream in an avi container isn't working.
This is exactly the thing I was looking for since encoding in Lagarith was taking up way to much of my hard drive.
The only problem I'm having is that the link to the program that allows you put a h264 stream in an avi container isn't working.
Re: Easy way to deal with MKV files
Haeresis wrote:
The only problem I'm having is that the link to the program that allows you put a h264 stream in an avi container isn't working.
I've updated the link for you, also fixed the guide up slightly
link is also here for convenice
http://www.videohelp.com/tools/avc2avi
Re: Easy way to deal with MKV files
Azure Vermillion wrote:
No quality loss at all, because you aren't encoding anything, merely extracting the stream and placing it into another container, In this case, an Avi container.
That's what I thought too. Just asked to make sure.
This was a very helpfull guide. *thumbs up*
I never thought that you could put the exported video stream from a matroska into an avi container.
This pretty much solves lots of problems.
Thanks! :D
Re: Easy way to deal with MKV files
Just wondering, is it possible to edit with the avi that you made with this method? If not, what converter would you recommend to change the AVI to MPEG or some other format?
Re: Easy way to deal with MKV files
Yes it is completely possible you can edit with the .avi file produced by this method.Haeresis wrote:Just wondering, is it possible to edit with the avi that you made with this method? If not, what converter would you recommend to change the AVI to MPEG or some other format?
I've just added the thing about MJPEG because it helped solve problems I had with Xvid/avi files and Sony Vegas In the past. Examples were, some frames weren't displaying right and others repeating constantly, once it all started it was nigh impossible to save a project.
If you've never had any of those problems, don't worry about what I said about the MJPEG, you can totally disregard it, However if you have experienced, or are experiencing similar problems, converting to MJPEG might just remedy the situation.
In terms of converters, I've never used one, I do it all manually via Virtualdubmod, and the compressor/decompressor I use is PICVID. It's very fast to edit with, practically lossless and the filesizes are somewhat half the size of HUFFY encodes if you know how to play with the settings.
Best of all it is dirt cheap
http://www.accusoft.com/picvideomjpeg.htm
Re: Easy way to deal with MKV files
What codec is needed to import the files into Vegas because Vegas won't let me import the files.
Re: Easy way to deal with MKV files
Are you using a native media player, such as Windows media player? or are you using a standalone player such as VLC?
Actually, can you even play the demuxed H.264/AVC stream? Can you play it after you've squished it into an avi container?
If yes to all those questions, and no to VLC
Try updating your Haali Media Splitter and/or FFD show.
If you don't know what either is try downloading this http://www.cccp-project.net/
Actually, can you even play the demuxed H.264/AVC stream? Can you play it after you've squished it into an avi container?
If yes to all those questions, and no to VLC
Try updating your Haali Media Splitter and/or FFD show.
If you don't know what either is try downloading this http://www.cccp-project.net/
Re: Easy way to deal with MKV files
Azure Vermillion wrote:Are you using a native media player, such as Windows media player? or are you using a standalone player such as VLC?
Actually, can you even play the demuxed H.264/AVC stream? Can you play it after you've squished it into an avi container?
If yes to all those questions, and no to VLC
Try updating your Haali Media Splitter and/or FFD show.
If you don't know what either is try downloading this http://www.cccp-project.net/
I have the newest version of CCCP but the files still aren't playing. I guess I need to update my Haali Media Splitter.
Re: Easy way to deal with MKV files
So, I tried that to one .mkv file.
When I tried to import in vegas the video stream was black and I couldn't play it on Windows Media Player. :/
I'm pretty sure I did everything right.
I read what you said above about the Haali media splier/ffdshow and the cccp codec pack.
I usually try to avoid downloading codec packs but if downloading this helps I might do it. =/
When I tried to import in vegas the video stream was black and I couldn't play it on Windows Media Player. :/
I'm pretty sure I did everything right.
I read what you said above about the Haali media splier/ffdshow and the cccp codec pack.
I usually try to avoid downloading codec packs but if downloading this helps I might do it. =/
Re: Easy way to deal with MKV files
FFDshow is pretty much mandatory nowday, and I'm quite surprised you've been editing without it^^
Okay, firstly, please don't go installing codec packs and whatnot during the middle of a project. The last thing we want happening is codecs and stuff clashing with each other and programs.
Just to be on the save side, make a system restore point before you go messing around with potentially video breaking stuff.
Honestly, you shouldn't ever really need CCCP, I just go and update my FFDshow every so often. (CCCP is FFDshow, just with a few extra players included. Though I do recommend getting media player classic.)
If everything is up to date (FFDshow, CCCP, whatever) make sure you actually have to decompressors enabled for H.264/AVC and Xvid, and possibly FVFW,FFDS just to be sure.
Set them to 'libavcodec' and make sure they aren't disabled.
To check if they are enabled go to Start menu> All programs> FFDshow>Video Decoder configuration > codecs
If your using CCCP
Go to Start menu> All programs> Combined Community Codec Pack > Filters > FFDshow video decoder configuration > codecs.
They should be at the very top of the list.
I've never had any problems with the Haali media splitter and have never poked around inside the settings.
Now if this doesn't work. I'm going to need a little more information about the file you're trying to plan.
Download Mediainfo
http://www.videohelp.com/tools/MediaInfo and import your video file. Let me know what codec it is using, and a screenshot of the codec page in the FFDshow video decoder configuration
Mediainfo is also handy for obtaining your media's framerate for when you put it into Avi container.
Okay, firstly, please don't go installing codec packs and whatnot during the middle of a project. The last thing we want happening is codecs and stuff clashing with each other and programs.
Just to be on the save side, make a system restore point before you go messing around with potentially video breaking stuff.
Honestly, you shouldn't ever really need CCCP, I just go and update my FFDshow every so often. (CCCP is FFDshow, just with a few extra players included. Though I do recommend getting media player classic.)
If everything is up to date (FFDshow, CCCP, whatever) make sure you actually have to decompressors enabled for H.264/AVC and Xvid, and possibly FVFW,FFDS just to be sure.
Set them to 'libavcodec' and make sure they aren't disabled.
To check if they are enabled go to Start menu> All programs> FFDshow>Video Decoder configuration > codecs
If your using CCCP
Go to Start menu> All programs> Combined Community Codec Pack > Filters > FFDshow video decoder configuration > codecs.
They should be at the very top of the list.
I've never had any problems with the Haali media splitter and have never poked around inside the settings.
Now if this doesn't work. I'm going to need a little more information about the file you're trying to plan.
Download Mediainfo
http://www.videohelp.com/tools/MediaInfo and import your video file. Let me know what codec it is using, and a screenshot of the codec page in the FFDshow video decoder configuration
Mediainfo is also handy for obtaining your media's framerate for when you put it into Avi container.
Re: Easy way to deal with MKV files
I have the latest version of FFDshow and yeah, I'm a bit against codec packs too.
Anyway, I'll make sure to check the things you said above and I'll hopefully find a way to solve this. :)
thanks!
Anyway, I'll make sure to check the things you said above and I'll hopefully find a way to solve this. :)
thanks!
Re: Easy way to deal with MKV files
Wow thank you so much! I'll be using this probably <3 Very easy to understand...I LOVEEE YOUU! I'll test it out first and see if I have all the right stuff, like codecs and whatnot >.<
Re: Easy way to deal with MKV files
Thank you for this tutorial, but I've got a problem with the final .h264.avi file. It won't work with Windows Media Player or Media Player Classic, and Vegas still refuses to open it. I followed each steps from your tutorial, I could demux and then put the mkv file into an avi container properly but the file I've got won't work. I don't understand what happened... I tried earlier to convert my mkv file into an avi file with mkv to avi converters but I couldn't get rid of the subtitles, except with the method you indicated. Could you please help me? I'd be grateful for that since I really need this file to edit with Vegas...
Guest- Guest
Re: Easy way to deal with MKV files
Grenat24 wrote:Thank you for this tutorial, but I've got a problem with the final .h264.avi file. It won't work with Windows Media Player or Media Player Classic, and Vegas still refuses to open it. I followed each steps from your tutorial, I could demux and then put the mkv file into an avi container properly but the file I've got won't work. I don't understand what happened... I tried earlier to convert my mkv file into an avi file with mkv to avi converters but I couldn't get rid of the subtitles, except with the method you indicated. Could you please help me? I'd be grateful for that since I really need this file to edit with Vegas...
Alrighty, I'm going to assume straight off the bat that you're missing codecs required to play it. Install CCCP or FFDShow , go into the video codec configuration and make sure H.264 and FVFW are not dsiabled. Actually Just enable the first 5 codecs, the option should be ''libavcodec''
This might be a redundant question, but you could play the .mkv file in something native like WMPC or just plain old Windows media player right?
Hopefully you don't reply and say you've been playing it with VLC, cause if that is the case, you definitely need FFD show/CCCP.
I'll uninstall both on my laptop and install fresh versions of both and try and work out why it isn't working for a few of you people, it's gotten me really interested!
Re: Easy way to deal with MKV files
I installed CCCP and did as you said, but the file still won't work even though H.264 and FVFW codecs are enabled. I can play the mkv file with both Windows Media Player and Windows Media Player Classic.
Guest- Guest
Re: Easy way to deal with MKV files
You could play the demuxed file fine, but not the final avi file right?
That is really strange
I uninstalled all codecs and whatnot from my old laptop to test this out.
I honestly had trouble with the stability of the newer builds of MKVtoolnix/MKVextract
After finally getting it to demux, I realised I couldn't get the raw AVC stream to play, However I was able to play the final-product avi file with no problem.
This was purely with just the latest CCCP installed.
The only thing I can think of is that maybe your file isn't h.264/avc, and is something different
Try downloading Mediainfo or using the mkvinfo exe inside the MKVtoolnix package to analyse the video for you. Let me know what codecs all 3 files are compressed with.
I'm quite curious as to why it isn't playing..
That is really strange
I uninstalled all codecs and whatnot from my old laptop to test this out.
I honestly had trouble with the stability of the newer builds of MKVtoolnix/MKVextract
After finally getting it to demux, I realised I couldn't get the raw AVC stream to play, However I was able to play the final-product avi file with no problem.
This was purely with just the latest CCCP installed.
The only thing I can think of is that maybe your file isn't h.264/avc, and is something different
Try downloading Mediainfo or using the mkvinfo exe inside the MKVtoolnix package to analyse the video for you. Let me know what codecs all 3 files are compressed with.
I'm quite curious as to why it isn't playing..
Re: Easy way to deal with MKV files
Well, no I couldn't played neither the .h264 file, nor the final .h264.avi file, only the original .mkv one, but finally, I downloaded Mediacoder and managed to convert the .h264 file into mp4 so it can work in Vegas, it's very slow though (in Vegas) and pretty difficult to use but as least it works. I guess it would have been the same with your method. Whatever, thank you for taking the time and helping me! I guess I'll use this file now...
Guest- Guest
Re: Easy way to deal with MKV files
If you're going to convert files, and you have the size, convert to MJPEG or HUFFY, while they are HUGE (huffy is twice as big as MJPEG though) You won't ever run into problems editing, and they are actually super fast to edit with. Some projects were up to 7x faster to render out with.Grenat24 wrote:Well, no I couldn't played neither the .h264 file, nor the final .h264.avi file, only the original .mkv one, but finally, I downloaded Mediacoder and managed to convert the .h264 file into mp4 so it can work in Vegas, it's very slow though (in Vegas) and pretty difficult to use but as least it works. I guess it would have been the same with your method. Whatever, thank you for taking the time and helping me! I guess I'll use this file now...
Vegas, isn't all that found of MP4s either.
But whatever works for you I guess, Sorry I couldn't be of more help.
Re: Easy way to deal with MKV files
I was wondering, what program do you use to convert your program to .MPEG and I also have the PICVideo codec so can you tell me your settings for a decent file size and decent quality?
Page 1 of 2 • 1, 2
Page 1 of 2
Permissions in this forum:
You cannot reply to topics in this forum