Log in

View Full Version : Splitting an H264/AAC/SSA Matroska file


No_OnE
2nd January 2006, 02:12
I'm wondering if anyone knows how to do this. I have an anime file in the Matroska container with H264 AVC for the video, AAC for the audio, and SSA for the subtitles (I got those by loading the file into the mkvmerge GUI, here's a screenshot in case I missed something (http://img.photobucket.com/albums/v650/josh987654321/mkvmergescreenshot.jpg)). My objective is to split them into avi, aac and ssa files, then convert the sound to wave so that I can load them into an AVI container (while keeping the subs external, obviously), then do further processing. The only problem I have is splitting the MKV into the 3 files. I've looked around and even done searches here for some help, but I can't find anything on how to do this. Anyone know where I should go from here? Any help is appreciated, so thanks!

berrinam
2nd January 2006, 02:20
Have you tried mkvextract? It comes with MkvToolnix, and you can get a GUI here (http://forum.doom9.org/showthread.php?t=73819&page=1&pp=20)

No_OnE
2nd January 2006, 02:48
Sweet thanks! I loaded the file, and checked everything, and clicked "Extract". But it didn't do anything, so I did some expiramenting and found out that it would extract the audio, subs and the .ttf font that was an attachment, but it won't extract the video for some reason. When I first checked it, it told me to choose an extension for the file, so I chose "avi", but I'm thinking that was the wrong choice, since it doesn't extract. What should I do now? Thanks in advance!

berrinam
2nd January 2006, 03:14
Get the latest version of mkvtoolnix (http://forum.doom9.org/showthread.php?t=103757), because h264 extraction was only recently supported. The extension should be .264 or .h264. You may need to change avi to h264 in the Formats.txt, or perhaps it is enough to rename the outputted avi file to .264. After you've created this file, use avc2avi (from Sharktooth's x264 Sticky) to convert it to avi. Good luck!

No_OnE
2nd January 2006, 03:35
Thanks for the help, I'll edit this post once I get as far as I can (hopefully it all works out).
-----
*EDIT* Wierd, I tried changing the entry in formats.txt to "(V_MPEG4/ISO/AVC) h264" and "(V_MPEG4/ISO/AVC) 264", but neither of them worked :S. It'll pop open the DOS window, then close it almost instantly after, and say (except in spanish) "Files extracted correctly". So I don't know why it does this, really...I found out that if you make an MKV file with just the video stream, you can convert it with TMPEnc to a lossless format (or just XviD @ 100% quality), but that takes time and harddrive space (I have barely 1GB of harddrive left since I have a small harddrive to begin with, so I can't do that really).

berrinam
2nd January 2006, 04:07
Did you get the latest version of mkvtoolnix and copy the mkvextract and mkvmerge executables into the mkvextractgui folder?

When I tried with an old version, I got the same as you: the DOS window pops up, closes, and mkvextractgui says it completed successfully, but nothing had happened. However, with mkvtoolnix 1.6.5, it works fine. It gives a raw 264 file, which you can convert to avi with avc2avi or to mp4 with mp4box.

No_OnE
2nd January 2006, 04:59
There we go, I got an AAC, an SSA, and a 264 file, thanks berrinam :D. I think the link for AVC2AVI in Sharktooth's sticky is down. Can you upload the file to www.sendspace.com or somewhere similar for me and link to it here? (that's if you still have it) Thanks again!

berrinam
2nd January 2006, 06:18
Celtic Druid also has a compiled version:
http://www.aziendeassociate.it/cd//x264/avc2avi.revision267.7z

No_OnE
2nd January 2006, 06:26
Thanks again, I can tell it's a command line program, what's the format of the entry, like "C:\folder>avc2avi.exe track1.avc track1.avi"? I'm not the best at getting command line stuff to work =/...

berrinam
2nd January 2006, 06:38
you can get help by typing avc2avi -help but the format is avc2avi -i input.264 -o output.aviIf your fps is not 25, then you will need to add --fps to the commandline, like: avc2avi --fps 23.976 -i input.264 -o output.avi

No_OnE
2nd January 2006, 06:57
Awesome, thanks! *pays you $50 imaginary tip* I can take it from here :D.

bond
2nd January 2006, 11:35
so that I can load them into an AVI container (while keeping the subs external, obviously), then do further processing.what further processing needs you to have the streams in .avi and not in .mkv?

moved

foxyshadis
2nd January 2006, 19:26
This comes from somewhere in the megui thread, I think, it's a simple gui version that muxes x.264 into x.264.avi.