## OGM support in VirtualDubMod

The two most important things in VirtualDubMod concerning OGM support are:

- the new OGM menu
- and of course the File -> Save as OGM... item :)

The OGM menu allow you to get some information (OGM information) on an opened OGM file, specify comments for the video and two main audio streams (Comments items) in VirtualDubMod, and select what streams (Show inputs) you want to mux when saving to an OGM file.

#### How to manage the streams to mux in your OGM file.

You can manage the streams you want to mux in an OGM file by selecting the OGM -> Show inputs item. The window that appears list all streams presently opened in VirtualDubMod for the OGM support (except the two main audio streams handled in the Audio and Audio2 menu). You should note that those streams are handled by modified routines coming from VirtualDub. Those routines have been modified to handle more properly streams in OGM. The two main audio streams (Audio and Audio2) are still handled by orignal routines of VirtualDub (which may be less efficient in an OGM context). You can add (Add), remove (Remove), change order (Move up, Move down) of the streams. Supported external files are Ogg, AC3, MP3 and SRT (subtitles) files. You should be able in most cases to use a "Waved" AC3 or MP3 file (i.e. a file that starts with a RIFF header and contains an AC3 or MP3 stream). This is the kind of file you obtain for example when using File -> Save WAV or Save to WAV. You should be warned when the file you try to open is not of the type you specified (in this case the file won't be taken into account). The input files are entirely read and all necessary information are stored in memory for faster data access afterwards. This should represent ~4MB for an AC3 file - 1h, around 5MB for MP3 and 3MB for Ogg with same duration. When opening the file a dialog box showing progress of the process will appear. If the process doesn't reach the end, this could mean one of those three things : your input file is not of the format you specified (you will certainly be warned in such a case) my routines synched on a false Synchronisation information : this happens at the very beginning, and the input file will certainly be considered as in the previous case (not a good format) your input file is corrupted (this can happen anywhere in the file) If the process didn't reach its end but you have not been warned that your file is not good, use the resulting stream at your own risks!!!
When a stream is selected in this list, you can specify an offset to apply to it (Delay by (ms)). The offset works the same than the one you provide in the Interleaving section of Audio and Audio2, i.e. a positive offset will make the stream being played later. If the stream belongs to an Ogg/OGM file, VirtualDubMod will try to 'detect' if an offset have been applied to the stream. If so this offset will be used as the default one for the stream (for various reasons all streams are assumed to start at 0 <=> no offset). Nb : for audio streams don't expect too much of this feature that may result in unplayable OGM clip (when using too large positive offset), or not properly delayed streams (I do my best here ^^). In other words I recommand you (when possible) to make the delay effective thanks to external tools (when encoding the audio for example). Note that the Demux and Save to WAV features are not available when the stream have been added thanks to the Add item. Indeed those features are used for streams contained in an opened OGM file (see later). The Use column tell you if the correspondant stream is to be muxed in an OGM file. You can change the value (Yes, No) by double-clicking on a stream in the list. In the case of external files you may prefer to simply remove the stream from the list.
You can also access the comments concerning a stream with the Comments button. The window that appears list all the comments presently associated to this stream. If the stream already contained comments (i.e. it is an external Ogg file with comments, or the stream comes from the OGM file you opened in VirtualDubMod) its comments will be listed too, allowing you to modify them if necessary. For the video and two main audio (Audio and Audio2) streams, comments are accessible thanks to the Video comments, Audio comments and Audio2 comments items in the OGM menu. You can add (Add), replace (Replace, works when you selected a comment in the list), remove (Remove) and change the order (Move up, Move down) of the comments associated to the stream. At the bottom of the window is a combo-box that already contains tags for most used comments: TITLE (Title property in WMPlayer, and OggDS filter too) LANGUAGE (Language property in WMPlayer, and OggDS filter too) LWING_GAIN (postgain used by the Vorbis decoder - don't know the exact unit, but in my test 1.778 gives +5.00dB) DESCRIPTION (Description property in WMPlayer) GENRE DATE VERSION COPYRIGHT (Copyright property in WMPlayer) LICENSE ARTIST (Author property in WMPLayer) PERFORMER ALBUM TRACKNUMBER ORGANIZATION LOCATION CONTACT ISRC When selecting (or modifying) the LANGUAGE property, another combo-box containing a list of predefined languages will appear. You can also import a chapter list (.txt file) thanks to the Chapters button. Known files fomrat are: SmartRipper chapterXtractor (select OGG format) DVDDecrypter (select OGG format) Nb : actually the chapter info written in the resulting OGM file will depend on the original chapter info and what you did with the video. In particular chapters not belonging to the part(s) of the video you selected won't be written, and the time of the other chapters will be updated to match the part(s) you selected.
On opening an OGM file a window showing progress of the process will appear. The file will be entirely parsed and the necessary information will be stored in memory (for faster access to data afterwards). The streams (audio and text streams, but not the video) contained in the OGM file will be handled (and so will only appear) in the list of input streams (OGM -> Show inputs). As a consequence the File -> File information window won't show any information concerning the two main audio streams (which are handled in the Audio and Audio2 menu). You will be able to differentiate those streams from others (external files) thanks to their Name which will be "Input file (%name%), %type% stream %number%". To prevent you from accidentaly remove one of those streams (since there is no way to add it again then), the Remove function has no effect on those streams. This is where you can change the Use value (by double-clicking on the stream) to discard a stream. When streams belonging to the input OGM file are selected in the list, the Save to WAV and Demux features are available. Both will extract the stream, but Save to WAV will add a WAV header to the generated file (if the stream is not a text or Vorbis one).
You can get information about the streams contained in the OGM file by using OGM -> OGM Information. This will generate a report about each stream in the file, and will give you some usefull information: does the file seems corrupted? (and in this case, how many bytes represents the corrupted data) for each stream : type (video, audio, text, other) header of the stream comments associated to this stream information concerning data structure estimated duration of the stream estimated bitrate of the stream total number of bytes in structures (Packets and Pages)

All the files you added as input are removed from the list when closing the currently opened video file.
For those who don't know this happens when you open a video file, when you select File -> Close video file in the menu, at the end of a job, and (of course) when leaving VirtualDub.
So don't open those input files before opening your video file because in this case you will have to do it again :p
Last but not least the job file should save all the input streams (with offset and the comments you eventually changed/added) you selected. So you can still use the Don't run this job now; add it to job control so I can run it in batch mode feature.
Also your current configuration (input streams selected and their associated comments) should be saved when using Save processing settings, and can be reloaded when using Load processing settings.