dvdspanky - a DVD MPEG encoder  


dvdspanky -i file [OPTIONS]  


dvdspanky is a CLI tool used to covert video from various sources into DVD compatible MPEG files. It is designed to be consistent and easy to use no matter the input and provides useful features suited to common DVD encoding tasks. Written in C, dvdspanky provides a front-end to a variety of trans-coding and other tools.  


It is recommended you encode video from a new working directory. This reduces the chance of accidental file overwrite and makes cleaning up easy.  


See the EXAMPLES and TIPS sections below for some quick ideas.  


-i FILE , --input=FILE
The input video. This is the only mandatory option.
-o FILE , --output=FILE
Output file-name prefix (without extension). If not specified the base of the input file-name is used. For example ../video/myvid.avi becomes ./myvid.mpg. Care must be taken not to overwrite the source file.
-d TITLE , --dvd=TITLE
Specify the DVD title number to encode. Use -i|--input to specify the DVD device.
-s KB , --size=KB
The desired output file size in kilobytes (1000*1000). This option is incompatible with -r|--rate.
-m , --multipass
Uses a 2 pass variable bit-rate (VBR) encoding. This achieves overall higher quality video. This obviously takes twice as long to complete as a single pass constant bit-rate (CBR) encoding. The default is a single pass CBR encode. The first pass of a VBR encode creates a '.pass1' file.
-0 , --avpass
Perform only an auto volume pass. See -A|--autovolume.
-1 , --firstpass
Perform only the first pass of a 2 pass VBR encoding.
-2 , --secondpass
Perform only the second pass and multiplexing of a 2 pass VBR encoding.
-M , --mplex
Perform only the multiplexing.
-U, --noremove
Do not remove any temporary files during the process. This is handy for debugging.


-r RATE , --vrate=RATE
The desired video output bit-rate output in kilobits per second. This option is incompatible with -s|--size. The default is the source video rate.
-a MODE , --aspect=MODE
Force the output aspect ratio. Valid MODE values are 2 (4:3), 4:3, 4/3, 1.3333, 3 (16:9), 16:9, 16/9 and 1.77777.
-C MODE , --inaspect=MODE
Force the input aspect ratio. Valid MODE values are 2 (4:3), 3 (16:9), *:*, */* and *.*.
-p , --pal
Forces output to PAL format. Please see the TIPS section.
-n , --ntsc
Forces output to NTSC format. Please see the TIPS section.
-N , --ntscfix
Tries to convert multiple frame rate NTSC streams into something sane. This feature is experimental.
-b , --border
Automatically add a black border to correct the aspect ratio.
-B , --clip
Automatically clip sides of the image to correct the aspect ratio.
-V PIXELS , --vcrop=PIXELS
Vertically; A negative value adds a black border, a positive clips the image.
-H PIXELS , --hcrop=PIXELS
Horizontally; A negative value adds a black border, a positive clips the image.
-T , --postprocess
Perform post processing to increase picture quality for low to medium quality video using mplayers's pp filter.
-D , --deinterlace
Deinterlace the source video (remove
-G GAMMA , --gamma=GAMMA
Set the gamma between 0.0 and 10.0. A value lower than 1.0 will lighten, above will darken. The default is 1.0 or off.


-R RATE , --arate=RATE
The desired audio bit-rate output in kilobits per second. The default is at or slightly above the input audio bit-rate being raised only to maintain DVD compatibility.
-c CHANS , --channels=CHANS
The number of audio channels. The default is the same as the source video.
-A , --autovolume
Calculates a single scale to adjust the volume of the entire movie. This option will add another pass to the CBR encode although it's rather fast, there is no difference for VBR encodes. This creates a '.norm' file and on a pass 2 it places the '.norm' file in use. This option works far better than -O|--normalise currently.
-O , --normalise, --normalize
Dynamically normalise the volume to a consistent level throughout the video using transcode's normalize filter. Note that transcode's normalize filter is of poor quality and can create distortion, it's best to use the -A|--autoaudio option instead.


-P , --preview
Creates 5 previews of the start of the video, displays them using feh then exits. feh can be navigated using the mouse buttons/scroller or the left and right arrow keys.
-S , --speed
When converting FPS this option will increase or decrease the speed of the movie preserving the original frames. This will alter the pitch slightly but it is not really noticeable when converting between 23.976 FPS (NTSC) and 25.000 FPS (PAL). Large differences in frame rate will make the movie appear too fast/slow and the pitch too high/low. The advantage of using this setting is the video remains smooth and the audio is still good. Do not use this option for purely music video.
-f FILTERS , --filters=FILTERS
Specify any transcode filters separating them with commas. Do not specify this option more than once as only the last will be processed. See the FILTERS sections of the transcode(1) manual for more filters. The doublefps filter is automatically enabled for low frame rate video.
-I , --nonice
Do not run at the nice priority level 19.
-v , --verbose
Display verbose output.
-L , --licence
Display the program licence.
-h , --help
Display a help screen.


The program returns 0 on non failure or a positive number otherwise.  


dvdspanky -s 150000 -TSbmp -i ../video/video.avi
Convert a video to DVD in PAL format (-p) with post-processing (-T), automatic black border (-b), multi-pass (-m), automatic aspect ratio (default), with a file size of 1.1GB (-s), smooth FPS conversion using playback speed alteration (-S) and an automatically calculated output file-name video.mpg based on the input file-name (default). Append the -P|--preview option to check the output then remove it to start the encode.

dvdspanky -i infile.avi -o outfile --aspect=3 --border --multi --pal

Encode a VBR video in 16:9 format with black borders to correct the aspect ratio in PAL format.

dvdspanky -i infile.mpg -o outfile

Encode a CBR video stretched to the closest aspect in the auto-detected format.


Previewing the output is a fine idea. Append the -P|--preview switch before doing the encode to preview 5 sample frames using feh.

The -b|--border option is highly recommended for all video although it is not default. If a video has already been bordered it may still need this option or -B|--clip and -a|--aspect to correct the output.

Single letter options with no arguments can be combined such as -m -p -b become -mpb.

The -S|--speed option is great for converting between 23.976 FPS NTSC video and 25.000 FPS PAL video. See the description for more information.

Note that it is possible to create mixed NTSC/PAL DVDs using titlesets. Mixed format DVDs aren't supported by the DVD standard but appear to work on many (cheap) DVD players.

Log files are automatically created based on the output file-name. It can be insightful to view these if you encounter problems.

Some files will remain after an encode such as '.norm' and '.pass1' files. These are left for you so you can run only the 2nd pass of a VBR encode again. Remove them if you wish. The 'ffmpeg.cfg' file can be removed as long as there are no other instances of dvdspanky running in that directory. The '.log' file can be removed after the encode.  


Some features marked experimental may not perform correctly, feedback on correcting or improving these are welcome.  


Jeffrey Grembecki - http://www.nongnu.org/dvdspanky  


Sune Mølgaard - For testing and bug reports  


transcode(1), mplayer(1), mplex(1), feh(1), dvdauthor(1)  


Copyright (c) 2007 Jeffrey Grembecki.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. You should have received a copy of the GNU Free Document Licence along with this document; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.