Log in

View Full Version : Fastest way to mux OGM's


N_F
25th May 2003, 01:30
First of all, this post in not aimed at beginners who've never used OGM (or similar container), nor is it aimed at casual encoders who encodes a movie now and then. It is aimed at people who encode a lot of movies/series with the goal of a near perfectly sized OGM file.

(If you're only interested in my method you can ignore the next 4 paragraphs and skip down to the instructions below the line.)

The most common tools for creating OGM's today is probably VirtualDubMod, followed by Oggmux. These are great tools, but they do have one "problem". They have graphical interfaces. Anyone who does lengthy series will probably recognize that it can be a real pain muxing all the streams to a final OGM with a graphical interface where you have to do everything all over again, especially if you want to add comments to all streams. And it's not very uncommon that you have to remux the streams a couple of times if you get a slightly oversized file or you find a spelling error in a subtitle stream.

With graphical interfaces this becomes a very lengthy and boring process. Still, I did it until a couple of days ago. Some time ago I did a couple of X-files seasons where I added 3 streams (english sound, english subs, swedish subs, and sometimes a fourth director's comments audio stream). As I wanted to fit 3 episodes perfectly on a CD I did a whole lot of remuxing.

A couple of days ago I picked up Twin Peaks season 1. 8 episodes (so not that bad from that perspective), but with 2 audio streams (english and director's comments) and 2 subtitle streams (swedish and english). I decided to try and find a better way.

I knew of a mux tool made by Cyrius that was used before Oggmux and VirtualDubMod existed. I had never tried it, just heard/read about it. I downloaded it and after a while I had come up with a very fast and comfortable way (for series anyway, movies benefit less from it). Instructions follow below:

----------------------------------------------------------------------------------------------------------

1) Download OGMuxer 1.1a6 (http://cyrius.bunkus.org/) and place it wherever you place things like this.


2) Open Windows Explorer. Go to Tools --> Folder Options... --> File Types and click on "New". It will ask you for a file extension, put "omx" here and press OK. Select this new extension that will show up in the "registred file types" window and press "advanced".

Press "new" and write an appropiate name at "Action". Personally I use "Run with Ogmuxer", but it doesn't really matter. Next, press "Browse" and look up OGMuxer.exe and press ok. If you've done everything right you should now have a line in the "actions" window with the name you wrote previously ("Run with Ogmuxer" for me). Highlight it and press "edit".

In the "Application used... " window, edit the line so it looks like this:

"C:\Movie Tools\OGMuxer 1.1a6\OGMuxer.exe" -s "%1"
(Of course your path will be different) Press ok until you're back to Windows Explorer.

NOTE: This has only been tested on XP. I would expect it to work on 2000; I have no idea if it works with 98


3) Create a textfile with the extension ".omx". The layout should look something like this:


<input file="C:\RIP\Twin Peaks dvd 3\Twin Peaks - 106.avi"></input>

<input file="C:\RIP\Twin Peaks dvd 3\106 Eng.ogg">
<comment name="LANGUAGE">English</comment>
</input>

<input file="C:\RIP\Twin Peaks dvd 3\106 DC.ogg">
<comment name="LANGUAGE">Director's Comments</comment>
</input>

<input file="C:\RIP\Twin Peaks dvd 3\106 Swe.srt">
<comment name="LANGUAGE">Swedish</comment>
</input>

<input file="C:\RIP\Twin Peaks dvd 3\106 Eng.srt">
<comment name="LANGUAGE">English</comment>
</input>

<output file="C:\RIP\Twin Peaks dvd 3\Twin Peaks - 106.ogm">
<title>Twin Peaks - 106</title>
</output>

For more information how the omx file can look like, see the readme that comes with OGMuxer.


4) Doubleclick on the .omx file and it will hopefully run fine and you'll see the progress in a command prompt window. You can also right click on the file and select "Run with Ogmuxer" (or whatever you called the action).

The big benefit is that you can now remux the same (but likely slightly altered) streams without having to bother manually adding the streams and the comments like you'd have to with the graphical interfaces (VDM, Oggmux). Also, if you're doing series, you can use the same omx file, you probably just need to change a couple of numbers and save it to a different file. (for instance, in the example above I could easily exchange "106" with "107" and it would work perfectly for the next episode).


I hope some of you will find this useful,

N_F

N_F
25th May 2003, 01:34
1) Does anybody know of a better/faster way? In that case, please let me know.

2) I think Oggmux is supposed to be able to handle omx files just like Ogmuxer, but I haven't gotten it to work (I'm just adding this so Koepi won't put on his aggresive mode on me ;)).

3) You may wonder why I bother with omx, can't all this be done with a simple batch-script? Almost, but as far as I could tell there is one problem with that. It won't allow you to add your comments. Omx has to be used for this.

4) @Cyrius - Can you see anything "bad" with the above? The only difference between an OGM muxed in this way and an OGM muxed with VDM seems to be some kind of buffer setting for the subtitle streams. VDM sets it at ~80 bytes while OGMuxer sets it at 16384 bytes (I guess this is why the VDM version is also a couple of kb's smaller).

5) @Cyrius - Any way you could automatize step 2) in some nice way in your next release (if you think it's a good solution that is)?

6) I would suspect this would also work with matroska (mkvmerge I guess?) with only some slight alterations, but as I haven't really started using it yet (I'm waiting for a DSF that can handle multiple audio streams) I haven't tried it.

7) Sorry if this thread was too long... It kind of grew on me. I've tried cleaning it up and I don't think there is too much "garbage" left.

soulfx
25th May 2003, 03:37
I do tons eps myself actually and ran into the same annoyances of having to re-enter stuff I normally enter everytime anyways. Around this time Koepi had come out with a command line omx function on his Oggmux program.

I thought that was neat, since I could then just write a program that could just generate these omx files and feed it to Oggmux. In this program I put defaults for language and included an auto search funtion, that would find the subtitle, audio, and chapter files based off the origenal filename of the video stream.

It's worked cool for me, but I've gone through some instances where it wouldn't work with some Oggmux versions.

http://members.cox.net/soul.fxpro/OMXgen-0.1.3.rar

You might even be able to modify the program (source included) to work in generating omx files for OGMuxer.

Koepi
25th May 2003, 09:37
N_F:

man, you must have been living on the moon!

OggMux was there as the first frontend for muxing OGMs.
People liked it and asked for automisation support - this is how *.omx was born. (try using OggMux with the -f <myname.omx> command line switch.... and start wondering...) If you'd looked in the revision history of OggMux, you'd know that it is around a bit longer and can do exactly what you want for AGES!

After a few months mosu came up with his non-DSF muxing code for linux, which was then ported to windows.

So what we basically have here is a great misunderstanding of the "OGM-World" from your side :sly:

soulfx's tool looks handy, i may use it when i'm trying to encode a STNG season... ;)

Regards
Koepi

N_F
26th May 2003, 08:48
@Soulfx - Sounds nice, I'll give it a try. Editing the omx file is the only "work" left with my described method.

@Koepi - Either I've misunderstood you or you've misunderstood me. Ok, Oggmux existed before the other tools and it was here the idea for .omx came up. Great. But it doesn't really change anything. Ok, I can use "oggmux -f myfile.omx" instead of "ogmuxer -s myfile.omx", same difference.

I actually tried "oggmux -f" before anything else, but when I didn't get it to work on first and second try I just assumed it was a forgotten parameter that wasn't really supported. Guess I was wrong. At this point I tried Ogmuxer and got it working.

Have you given any though in automatizing step 2) so that you can run an .omx file just by doubleclicking it (that's kinda the whole point in my somewhat lengthy post)?


Hope I don't come of to pushy... then again, you certainly did :sly:

Suiryc
26th May 2003, 17:20
:) as Koepi already mentioned it, OggMux existed long before OGMuxer ;).
OggMux is DSF-based (i.e. you need Tobias' filters to use it). Mosu (Moritz Bunkus) came with a great (commandline) muxing app under Linux (so not DSF-based ;)) to make OGM files. As I was interested in making OGMs, but that the DSF had some weak points (no proper and easy way to mux AC3 for example ;)) I first started by 'porting' Mosu's app to Win32, to see if it would work on windows too.
After some tests I decided to rewrite the app from scratch (to be sure I would understand exactly how it was working) always using Mosu's tool as example. That's how OGMuxer was made.

After some time (and people bugging me) I added support of .omx files in the tool. Since I had more features planned I decided to create my own omx structure (a bit 'XML-like', the one with tags you use). Of course this latest omx format doesn't work in OggMux, that's why you couldn't use it in OggMux ;).

@N_F
I don't think there are 'bad' things in what you wrote ;)
The difference in buffer settings with VDM comes from the fact VDM read the whole subtitle track in advance and know the longest subtitle while I don't do that in OGMuxer (so I set the buffer to a max value at once).

I don't know if there will be major new releases of this tool since I think it already has quite a lot of interesting features, and since the format (and DSF) hasn't evolved since a long time now (mainly because the author, Tobias Waldvogel, didn't released any source of his filters and vanished since he was said to join XipH). Anyway this format may not evolve anymore since XipH (Tobias included) was supposed to release a new official container based on Ogg (and so replacing the non-official OGM format).

Apfelstruhdl
29th May 2003, 12:33
Is there a proggy that can feed all necessary info into OGMux?
I really like Suiryc's tool but it is a bit work to enter everything.