all2mpg is a script to convert (almost) any video file into a format suitable for mastering onto a video DVD. It builds on the work done by Phil Ehrens and borrows heavily from his scripts: AviToVob and Mp42dvd.
Once you have converted the files you'll still need a DVD authoring program such as QDVDAuthor in order to create a video DVD.
This script is heavily dependent upon the transcode package. Transcode is no longer in maintenance hence this may or may not work.
When using Phil's scripts I kept finding that I wanted to make adjustments to the transcoding process and what was right for one video file wasn't right for another. I decided to modify his scripts to allow command line arguments and to further automate the process. I tried to keep everything in shell-script but my natural affinity for python soon took over so the result is a utility written in python.
all2mpg is written in python hence you will need the python interpreter.
all2mpg is a simple glue script; it leaves all the hard work to other programs. As an absolute minimum you will need transcode and transcode will have a dependency on ffmpeg. Any recent version of these application should work.
all2mpg has two modes of operation; in its normal mode you'll only need the applications shown above but you can choose to use mplayer as a front-end decoder. Typically you will do this when you have a video file to convert which transcode cannot handle by itself. In this case there a two extra dependencies: mplayer for video and sound extraction and sox for audio conversion. Again any recent version of mplayer should suffice but sox presents a particular problem in that its interface is in a state of flux. all2mpg was developed using sox version 14.0.1, as I write this sox version 14.1.0 is available and it appears to have a different interface but is backwards compatible so it should work but I have not tested this configuration.
Basically all2mpg needs a lot more testing than I can give it so any feedback to me will be welcome.
Always run all2mpg from the directory in which the video files reside. Type:
all2mpg -h
and you'll get some help text. Input files should be specified as the last arguments on the command line and wildcards can be used. When run successfully all2mpg should produce a new video file for every input file specified on the command line but with an extension of mpg.
I am no expert on transcoding, all the details that have gone into all2mpg have been found from reading Phil Ehrens' scripts, the transcode wiki and also by a bit of trial-and-error by myself. If you think there is something wrong with the choices I have made then please let me know.
all2mpg uses transcode to get the work done and transcode, in turn, uses ffmpeg. The output video is set by the --export_prof option of transcode and for quality settings of 0 or 1 the video produced will be a constant bit-rate output.
all2mpg has three quality settings controlled via the -q command line option. The quality level selected directly affects the settings sent to ffmpeg, the following table shows this, please note that the settings are cumulative:
| Quality (-q) | ffmpeg options |
|---|---|
| 0 | mbd = 2 vqcomp = 0.7 vqblur = 0.3 |
| 1 | trell = 1 |
| 2 | cmp = <2 or 3> (*) subcmp = <2 or 3> (*) nr = 20 (**) |
In addition, when a quality value of 2 is selected transcode will be put into two-pass mode and the output will be a variable bit rate.
It may be notable that I have chosen to use a default output of NTSC rather than PAL even though I live in a PAL region, the reasons for this are:
Get it here
New Features