Introduction

VirtualDubMod is a project that was born when suddenly a lot of modifications to the original VirtualDub by Avery Lee sprung up, mainly on the Doom9 forums. Some people got tired of needing several diffrent modified VirtualDub executables, so the idea arose to put them all together into a single app, VirtualDubMod.

The founders were:

  • VirtualDubOGM - Cyrius
  • VirtualDubMPeg2 - Pulco-Citron
  • VirtualDubAVS - Belgabor


OGM support

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.


NET - Introduction

Introduction

Since version 1.4.13.1 VirtualDubMod includes the NET mod by Thomas Matern. This mod allows distributed encoding on a LAN.
  • Caveats (Important! Please read before you start)
  • Slave setup
  • Master setup
(Help for the net mod was translated and modified for chm from the original help by Thomas Matern)


NET - Caveats

Caveats

  • Doesn't work yet with multipass encoding
  • Only one master per LAN
  • It's usually not a good idea to use MPEG files as source, since the parsing time (which is needed by every client for every segment) can offset the time gained by distributed encoding.
  • Distributed encoding is evidently useful only for encoding, so refrain from using it for "Direct Stream Copy"ing video ;-)
  • Distributed encoding of the audio stream can be problematic. Thomas Matern only implemented a workaround for mp3 that works by splitting the source audio at silent points to evade audible artifacts. There are three modes from which you can choose in the options menu of the job window.

    • If you deactivate "Process Audio", the sound encoding is completely done my the master at the end of the encoding process. "Direct Stream Copy" is not allowed for this mode.
    • If you check only "Process Audio", the slaves encode the audio streams themselves, cut at the segement limits choosen by the scheduler.
    • If you check both "Process Audio" and "Scan for silence", cutting takes place at the most silent moment. The scanned range depends on several factors. In priciple only the first third of a segment is scanned. To limit memory usage, only 2 minutes (encoded audio) or 1 minute (unencoded audio) is scanned.
    This should work independently of the audio source (AVI, MP3, WAV).


NET - Slave setup

Slave setup

Setting up a computer as a slave for net distributed encoding is pretty easy.
  1. Open the job window (default key F4)
  2. Press the "Update" button to show all computers in the network ([b]Warning![/b] This can take a lot of time in a large network!)
  3. Press the "Slave" button
Now the hint "Slave" should show up beside your own computer in the the lower box. All other dialog elements are disabled except "Update" and "Abort" and you can't close the job window or VirtualDubMod.
If you want to start up your computer automatically as a slave, create a link to VirtualDubMod in your Autostart group and add the parameter "/j". If you check the menu item "Options->Send slave to tray" (Job window), all that remains of the slave is an icon in the tray bar. You can further control the slave via the master (shut down, exit...)

If a master was already running, a connection will be established immediately. It doen't matter in what order you start them - as soon as a master and a slave run, they connect immediately.

To close the job window or VirtualDubMod you first have to press the "Abort" button. This way you disconnect from the master. This is even possible during encoding, the only problem that arises is that the canceled video piece has to be encoded by a diffrent computer. It is also possible to activate more slaves during encoding - as long as there are still tasks available they will be assigned immediately.


Master setup

The master is in charge of the encoding process. There you have to do all the setup like usually (filters etc.) and finish with "Save as AVI..." (default key F7). Don't forget to check "Add operation to job list"! This way you can prepare to encode more than one movie and encode them in one net distributed session.

To start encoding, first go to the job window (default key F4). You should see something similar to the following picture. To get the computers on your network hit the "Update" button ([b]Warning![/b] This can take a lot of time in a large network!).

Hit "Master" to connect all running slaves.

"Abort" disconnects and goes back to normal operation mode. To begin the distributed encoding process hit "Start".
You can configure block size and process priority. Changes during an encoding process will take effect as soon as the next part is started.
The entered priority only applies to the local computer and is also used for normal encoding tasks (without master/slave).
The segment length can be changed during encoding without problems, the only limit is a maximum of 512 segments (e.g. with 1 min -> 8h 32 mins max of movie).
If you check the menu item "Always restart jobs" all exsisiting .parts files are ignored. If you reencode videos (e.g. to try out diffrent settings or to encode a show with the same name regularely) this setting allows jobs to be reencoded completely. If you deactivate this option, the information from the .parts files are used to reencode just the unencoded parts. That way you can always abort a running job and continue it later - the already encode parts won't be reencoded.
The colored bar shows the segments of the video. Completed parts are shown in dark green, untouched ones in grey and segants that are currently worked on are shown in light green and red, according to the respective encoding progress. It is normal that the total encoding process doesn't necessarily start from the beginning, the right order will be rerstored when the complete movie is assbled at the end.
Black lines denote the segment borders. If more that one source video is used, each one is automatically one segment that can be split further later.

A | Host names
B | Connection status
C | Region that's currently being encoded by the respective host
D | Encoding progress
E | Encoding speed
F | Encoding progress of the local computer
G | Visual representation of the segments
H | Encoding progress of the complete movie
1 | Stop after sompleteing the current job
2 | Stop immediately
3 | Shut down local computer after all jobs are finished
4 | Refresh host list
5 | Shut down all clients after all jobs are finished - doesn't apply to the master (see 3).


VirtualDubMod FAQ

How can I save the AVI audio streams to WAV files ?
To save the first audio stream select AVI audio in the Audio menu, and No audio in the Audio2 menu (not necessary if your AVI file doesn't contain 2 audio streams). Then use File -> Save WAV.
To save the second audio stream select No audio in the Audio menu. This will automatically set Audio2 to No audio too, so select AVI audio again in the Audio2 menu. Then use File -> Save WAV.

Can I save the audio streams to files without WAV headers ?
Yes, just use Demux audio instead of Save WAV. If the stream type is said to be AC3 or MP3, the correspondant extension will be proposed when saving the file.

What is Show inputs in this new OGM menu ?
OGM files can contains various audio / text streams. Since VirtualDubMod only take into account the 2 first audio streams in general (i.e. for AVI files), OGM streams are handled in the Show inputs window.
The window will list all audio / text streams in the OGM. Note that the video stream isn't listed. As a consequence when opening an OGM file, the Audio and Audio2 doesn't handle any of the streams in the OGM file.

How do I add audio or subtitle streams to mux in my OGM file ?
Use the Add button in the OGM -> Show inputs window.

Can I change the order in which the streams will be muxed in the OGM file ?
Yes, just use the Move up / Move down buttons to change the order of the streams in the Show inputs window.
Note that if you use the Audio and Audio2 menu those audio streams will be muxed before.

I opened an OGM file containing a video and an audio stream in VirtualDubMod. I switched to DirectStream copy mode and used Save as AVI but the AVI file only contains video. Where is the audio ?
To handle them more properly, streams coming from an OGM file are only accessible in the OGM -> Show inputs window. As a consequence the Audio and Audio2 menu do not refer to any of the streams contained in your OGM file.
Those menu are however still effective (i.e. you can still open an audio file to be muxed) when saving to OGM.
Other consequences are that the File -> File information window won't show any information concerning the Audio and Audio2 streams, and that the File -> Preview mode won't play any audio.

I opened an OGM file containing a video and an audio stream in VirtualDubMod. But the File -> File information window doesn't show the ausio stream. Where is the audio ?
See previous question.

I opened an OGM file containing a video and an audio stream in VirtualDubMod. However when using the File -> Preview mode there is only video, no audio. Where is the audio ?
See previous question.

Can I extract streams from the OGM file ?
Yes. In the Show inputs window, select the stream you want to extract, and use the Save to WAV (add a WAV header if the stream is not a text or Vorbis stream) or Demux buttons.

I have a file containing chapters info for my clip. How can I add those information when aiming for an OGM file?
Chapters information must be used with the video stream so that players take them into account. You can access comments used for the video stream thanks to the OGM -> Video comments menu.
To automatically add the chapters information, use the Chapters button. You will have to select the file containing the information.
Recognized files are the ones generated by the following tools :

  • SmartRipper
  • chapterXtractor (select OGG format)
  • DVDDecrypter (select OGG format)

How do I use 'Open via AviSynth'?
This allows you to open any AVISynth compatible video file by automatically generating a suitable script by a selectable template. These templates go into the 'templates' directory in your VirtualDub directory. Template syntax is the same as for AVISynthesizer (I included readme_AVISynthesizer.txt because as of this writing the AVISynthesizer homepage is not available). You can choose the default template shown in the open dialog by starting the template description with "Default" (note that the template filename has nothing to do with this).
This function has no intelligence whatsoever! You're responsible to choose the right template for the file (eg a SegmentedAVISource template for multi-segment avis or giving the right fps to DirectShowSource)
For this to work flawlessly you need AVISynth 2.05 and a correctly set plugin directory. (Create a registry key called "PluginDir" in HKEY_LOCAL_MACHINE\Software\Avisynth\)
A workaround if you don't want to do this is adding the needed LoadPlugin lines into the templates.