Home Music Photos Software Writings

VOBDNorm

VOBDNorm is a command-line utility that copies a VOB while modifying the “dialog normalization” values in the AC-3 audio stream(s) it contains. In some cases you can use VOBDNorm to correct low volume in an AC-3 track on a DVD or to match AC-3 audio volumes in a compilation made from different DVDs without demultiplexing the VOBs or re-encoding the AC-3 audio.

version 1.0 (.zip archive for Win32; 99KB)

VOBDNorm version 1.0; copyright 2007 by Randy Fellmy.
VOBDNorm is free software released under the GNU General Public License.


***********************************************************************
                       W   A   R   N   I   N   G                       
***********************************************************************

As of this writing, very little testing has been done on this program;
it should be considered EXPERIMENTAL ONLY. If you can't deal with
unexpected events, don't keep backups, etc., WAIT until more testing
has been done before using it.

***********************************************************************


This archive contains both C++ source and a Windows executable.
If you only want to run the program, simply extract vobdnorm.exe
and run it from the command line. It needs no supporting files.

The source is almost entirely Standard C++ (with standard libraries)
except for the use of __int64 and __int16 in VOBStruct.h. Also, while
bitfields (also used in VOBDStruct.h) are part of the C++ standard,
their implementation is not necessarily consistent in all salient
aspects across different systems. Aside from revisions which may be
needed to the above mentioned items, it should be possible to compile
and run on any reasonably standard C++ development system.

(I expect to replace the potentially problematic items mentioned above
with more reliably portable constructs in later versions.)



***********************************************************************
                       D O C U M E N T A T I O N                       
    Displayed when the program is run with no or invalid arguments.
***********************************************************************

VOBDNorm copies a VOB while modifying the "dialog normalization" values
in the AC-3 audio stream(s) it contains.

Syntax:

vobdnorm input-file output-file { [sub/][old[-old2]=][+|-]new }+

input-file:  specifies the file name of the VOB to be processed.

output-file: specifies the file name of the new VOB to be written.

The modification instructions which follow may be repeated as many times as desired.
Instructions must be separated from one another by spaces, and no spaces are allowed
within an instruction.  If more than one instruction applies to a particular AC3-frame
the first applicable instruction is used. At least one instruction must be given.

If an instruction contains neither a "sub" nor an "old" qualifier it must be the last
(or only) instruction.

sub: either a single digit 0-7 which specifies the AC-3 sub-stream number or two
     hexadecimal digits which specify a mask of sub-stream numbers. Both digits must
     be specified for a mask; the high-order bit represents AC-3 sub-stream 0.

     Example: "c1/25" specifies that dialog normalization values in AC-3 sub-streams
     0, 1 and 7 are to be changed to 25.

     If "sub" is not specified the instruction applies to all AC-3 sub-streams.

old: a number from 0 to 31 which specifies the old dialog normalization value to be
     changed; or, if "old2" is specified, the lower bound of an inclusive range of old
     dialog normalization values to be changed.

     old2: a number from "old" to 31 which specifies the upper bound of an inclusive
           range of old dialog normalization values to be changed.

     If "old" is not specified the instruction applies to all old dialog normalization
     values.

new: a number from 1 to 31 which specifies the new dialog normalization value. If
     prefixed by a plus or minus sign, the indicated amount is added to or subtracted
     from each existing dialog normalization value to which the instruction applies.
     Calculations which yield a value less than 1 or greater than 31 result in setting
     the dialog normalization value to 1 or 31, respectively. Dialog normalization
     values of 0 in the input stream are replaced by 31 before adding or subtracting.