Matroska Attachment Scripting
Earlier today, martino asked in #darkhold about extracting large ammounts of fonts and other attachments from mkv files. Noting that on linux there is no mkvextract gui, I went ahead and wrote a poorly formatted script. Copy to where ever and run it how you will, syntax is ./mkvattachex.sh infile.mkv a b c, where a, b, and c are optional. a is the number of video tracks, b the number of audio, and c the number of subtitle tracks. These are important so that the script can tail properly however I am pretty sure I can fix this. Defaults are all 1 so if it’s a standard file with only 1 of each then they can be ignored. The script will extract all attachments, which generally means all included fonts. I have no idea if it will kill your system and if it does, as always, blame movax.
Here be the actual script, I’ll be updating it later on with proper functionality:
http://ophion.pastebin.com/f8437ff2
Ordered Chapters and You
One of the most interesting features of the Matroska container is Ordered Chapters. Admitedly until recently I wasn’t such a big fan of it, due to lack of support for them in linux, or anything other than Haali’s splitter really. I understood the point and found them to be clever and useful (although after using them I disabled it due to not wanting to have to watch the OP of a series at the time) however I never really thought much about how good they are. Recently Kovensky and elenril patched the mplayer PKGBUILD for Ophion, it now has support for ordered chapters.
Ordered chapters are a function of matroska that allows segments of a file to be externally linked. Think of the video file as a php web page for example. Obviously the site looks like 1 big page, but on the server end its a series of php includes to ‘mux’ a bigger file out of. With ordered chapters, segments are linked to allow clips from other files to be included in the main file without it being seen by the viewer. Take for example the DVD rip of Shigofumi I am watching at the moment. The episodes themselves contain the opening scene, the main episode, the ending, and the next episode preview, but no opening theme song. The OP is a separate file, but with ordered chapters in my mplayer, smplayer reads it like one file, along with timestamps and subtitles.
It took a bit of tweaking to get subtitles using the ssa/ass library to work (-correct-pts in mplayer options will fix it) however I’m pretty happy with it now. I haven’t commited the new package to the repository yet, considering making a testing repository, but it all seems fairly solid and stable so far. If anyone would like to try it out, the package can ge found here.
For more information, read what TheFluff has written over on Walls of TL;DR
#Ophion
[09:23:50] <rofflwaffls> mkfifo + wget + mplayer = instant streaming :D
[09:26:09] <Kovensky> uhh…
[09:26:15] <Kovensky> why not just mplayer? :V
[09:26:22] <Kovensky> mplayer can open http:// and ftp://
[09:26:32] <rofflwaffls> uhhh
[09:26:36] * rofflwaffls facepalms
[09:26:43] <rofflwaffls> how did i not think of that
That’s my lulz for today. In other news we moved Ophion to git, I split the 64-bit repo into stable and sandpit on the actual repository, and added a few things, like sx264, a nice little Qt based x264 GUI. 32-bit is not yet updated, so keep that in mind. For 64-bit users, the new syntax is as follows:
[ophion-stable]
Server = http://emess.developersatlarge.com/packages/x86_64/stable[ophion-sandpit]
Server = http://emess.developersatlarge.com/packages/x86_64/sandpit
This should really go on the Ophion development blog but currently it’s not active. Any complaints about gitweb being down can go to rofflwaffls as well, as I didn’t break it.