tovid: Make DVDs from video files
tovid is a command-line tool for creating DVDs. It can encode your video files to DVD-compliant MPEG format, generate simple or complex DVD menus, author and burn a ready-to-watch DVD, with just a few shell commands. A graphical interface is also provided to make the process even easier.
NOTE: As of tovid 0.35, the legacy scripts makemenu, makexml, makevcd have been deprecated and no longer appear in this manpage. They are still included with tovid for now, and can be used by doing: tovid menu|xml|vcd|postproc as done in the previous 3 versions of tovid.
Also note that as of tovid 0.32, this is the only manual page provided by tovid. There is now a single executable frontend to all functionality in the suite, so if you were expecting to find manpages for todisc, idvid, makempg and their kin, they can all be found in the tovid manpage you are reading now.
And yes, this makes for a pretty large manual page. If you are viewing this manpage from the command-line man utility, which normally pages through the less utility, you can skip to a section by searching with the / key, followed by a ^ to match the given section name. For example, to skip to the mpg command, type /^Command:mpg. See man less for more on how to navigate.
tovid COMMAND [OPTIONS]
Where COMMAND is one of the following:
Main Commands
Helper Commands
The OPTIONS differ for each command; run tovid <command> with no further arguments to get help on a command, and what options it expects.
Two configuration files are created the first time you run tovid:
Includes command-line options that should be passed to the various tovid sub-commands.
Edit these files if you wish to change your configuration.
The following environment variables are also honoured: TOVID_WORKING_DIR (working directory for all scripts). TOVID_OUTPUT_DIR (output directory for the makempg script).
tovid gui starts the graphical user interface (GUI) for tovid. This is the easiest way to start creating DVDs with tovid. The optional arguments are any option used by todisc (’tovid disc’) which will save entering it manually, OR the full path to a saved script from the GUI. This option to save the contents of your project allows you to use it as a bash script later, or to reload the project to continue working with it at another time. Note: this feature is still in development so some options may not load properly - make sure to check that your selections were all loaded.
All help is integrated in the form of tooltips. You can also see **Command:disc ** for more detail about the options. Note: if you wish to use a GUI to make multiple titlesets on the same DVD use ’tovid titlesets’, which is a wizard that uses the the ’tovid gui.
tovid titlesets will assist in making a DVD with multiple titlesets. It can be started without any options, or you can feed it the path to a saved titleset script as an option. The option to save a script is also useful as the resulting script can be run later from a terminal.
tovid disc creates a DVD file-system with optional menus, from a list of multimedia video files and their titles. As todisc can function as a master script, calling other scripts as it needs them, it is the easiest command line program for creating a DVD from start to finish, including automatically converting non-compliant videos and prompting to burn at completion. It can do animated menus, static thumbnail menus, text-only menus, or author with no menu. In addition, it can do slideshows, using images as input, and even combine slideshows with videos. It supports sub-menus for chapter breaks, configurable menu style, animated backgrounds and transparency effects. From simple (no menu) to complex (switched menus and titlesets), you should be able to do what you want with ’tovid disc’.
Please note that although the interface may seem complex with so many options, you can create a fully functional DVD with only a few options on the opening tab of the GUI (select video files and an output name).
tovid disc [OPTIONS] \
-files <file list> -titles <title list>
-out OUT_PREFIX
For example:
$ tovid disc -files File1.mpg File2.mpg File3.mpg \
-titles "Episode 1" "Episode 2" "Episode 3" \
-out Season_one
The number of -files and -titles must be equal, though if you do not include any titles tovid disc will use the basename of the included files as titles. If you are doing a slideshow or multiple slideshows, use -slides rather than -files for passing in the images. You may use -files and -slides more than once to create an ordering in a mixed slideshows/videos menu. See Slideshows part of Usage section, below.
If the input files are not mpeg, you will have the option to auto-encode them.
At present there are 2 display arrangements or “templates”:
Thumbs will be centred, and as large as space restraints allow.
Produces an arrangement with small buttons on the side and the showcase image/video in the centre. If no IMAGE or VIDEO argument is supplied, the central thumb will be omitted.
Note: -textmenu, -quick-menu and -switched-menus are all types of showcase style menus. See descriptions under Menu style section.
The -titles arguments should be double or single quoted, or have the spaces backslash-escaped. Special characters (like ”, !, *, &, ?) may need to be backslash-escaped. To include a quoted string within a title, backslash-escape the quotes. These titles are used for labelling thumbnails on the main menu, and for the submenu title for that video. ( see also -submenu-titles )
The -showcase styles can use longer titles than the default arrangement. With a showcase style, use: -showcase-titles-align west to give more space for the title, or use -showcase-titles-align east to allow titles of more than one line.
The default style can only show about 16 characters (depending on the number of thumbs, and what -titles-font and -titles-fontsize is being used). If your titles are too long to fit in the label area, you may try using sub-menus, which can display longer titles, for example:
$ tovid disc -submenus \
-files file1.mpg file2.mpg ... \
-titles "Short 1" "Short 2" \
-submenus \
-submenu-titles "Long Title One" "Long Title Two" \
-out foo
The -align argument will position both titles and thumbs either south, north east, west, southwest, northwest, southeast, northeast, subject to certain constraints of each arrangement.
More Examples:
A text-only menu:
$ tovid disc -textmenu ...
No menu:
$ tovid -nomenu -files file1.mpg [file2.mpg "file 3.mpg" ...]
Titlesets
A word should be mentioned here about titlesets, which is really just a hierarchy of menus. You need to use titlesets, for example, if you have videos of different resolutions, or otherwise want to arrange videos on separate menus. If you want to have titlesets you need to put all the options for each titleset menu you would like to have between -titleset and -end-titleset options.
Additionally, for the main menu (the opening menu that will let you jump to each titleset), you need to put options between -vmgm and -end-vmgm. You do not use -files for the opening menu options (-vmgm), but you will need as many TITLES after -titles as you have menus.
Any options outside the -titleset -end-titleset and -vmgm -end-vmgm areas will be general options applying to every titleset. If a general option is duplicated inside a -titleset or -vmgm area, the general option will be overridden.
Note: you do not need titlesets for a single menu with chapter break menus, for that just use -submenus or -ani-submenus
Example of using tovid disc with titlesets:
$ tovid disc -static -out MY_DVD \
\
-titleset -files 1.mpg 2.mpg 3.mpg \
-titles "Title One" "Title Two" "Title Three" \
-end-titleset \
\
-titleset -files 4.mpg 5.mpg \
-titles "Title Four" "Title Five" \
-background foo.jpg \
-showcase bar.png \
-end-titleset \
\
-vmgm \
-titles "Season One" "Season Two" \
-background bg.jpg \
-bgaudio foo.mp3 \
-titles-fontsize 20 \
-end-vmgm
See also -titleset and -vmgm
Slideshows
You can also use tovid disc to make slideshows. This can either be a single slideshow, or multiple slideshows on the same menu. Remember to use -slides rather than -files for passing in the images. Images can be any filetype that imagemagick supports: for example JPEG, PNG, GIF, TGA BMP etc. For a single slideshow do not use -titles: use -menu-title to set the slideshow title.
For a single slideshow the default is an animated menu that transitions from slide to slide. The default transition type is ’crossfade’, which fades each slide into the next and loops back to the first slide at the end. If instead you use -static, then a static ’polaroid stack’ menu of all the slides is created, with a single spumux’ed button for navigating with the enter key. You may have to experiment to find out which DVD remote button advances the slides. Try the ’next chapter’(skip ?) button and the play or enter buttons. If you want to limit the number of slides in the menu to a subset of all files entered with -slides, then use -menu-slide-total INT. Be sure to use a long enough audio file for -bgaudio or set -menu-length so the menu is long enough to support the slides plus transitions.
You can also put multiple slideshows on one menu. To do this, use -slides IMAGES for each slideshow desired. You can even mix videos with slideshows by using -files -slides -titles multiple times.
Example of a single slideshow with an animated menu with transitions:
$ tovid disc -menu-title "Autumn in Toronto" -slides images/*.jpg \
-menu-slide-total 20 -slide-transition crossfade -bgaudio slideshow.wav \
-out myslideshow
Example of multiple slideshows on one menu:
$ tovid disc -menu-title "Autumn in Toronto" \
-slides photos/september/*.jpg \
-slides photos/october/*.jpg \
-slides photos/november/*.jpg \
-tile3x1 -rotate -5 5 -5 -align center \
-bgaudio background.wav \
-out myslideshow
Example of mixed videos and slideshows:
$ tovid disc -menu-title "Autumn in Toronto" \
-files fall_fair.mov \
-slides photos/september/*.jpg \
-files harvest.mpg \
-slides photos/october/*.jpg \
-titles "Fall Fair" "September" "Harvest" "October" \
-background autumn.png \
-bgaudio bg.mp3 \
-out myslideshow
See the other slideshow options in the Slideshows options section.
Encoding Options
These are options for reencoding your non-compliant videos. They are passed directly to the tovid mpg command which is invoked by tovid disc when non-compliant files are found. For details, see the Command:mpg section. Here is a list of possible options you can pass: -config, -ntscfilm, -dvd-vcd, -half-dvd, -kvcd, -kvcdx3, -kvcdx3a, -kdvd, -bdvd, -704, -normalize, -amplitude, -overwrite, -panavision, -force, -fps, -vbitrate, -quality, -safe, -crop, -filters, -abitrate, -priority, -deinterlace, -progressive, -interlaced, -interlaced_bf, -type, -fit, -discsize, -parallel, -mkvsub, -autosubs, -subtitles, -update, -mplayeropts, -audiotrack, -downmix, -ffmpeg, -nofifo, -from-gui, -slice, -quiet, -fake, -keepfiles
The type of fade transition between slides in a animated slide menu. Be sure the menu length is long enough to support the 1 second transitions between the slides. The length is determined by 1) the length of the -bgaudio AUDIO 2) the length given with -menu-length NUM. For submenu slideshows, it is determined by 1) -submenu-length NUM if given, and by 2) the length of the audio from -submenu-audio FILE(S).
See -menu-slide-total , -bgaudio , -menu-length , -submenu-length, and -submenu-audio.
The ’crossfade’ transition fades from one slide to another. The ’fade’ transition fades in and out from and to black. If you don’t use this option, the default is to use a ’crossfade’ transition.
The number of chapters for each video (default: 6) OR the actual chapter points in HH:MM:SS format. Chapter points will be used for generating the submenu thumbs, and for seeking with your DVD player. You can pass in just one value that will be used for all videos, or supply a list of values (number of chapters) or time code strings.
If you just pass an integer for ’number of chapters’, then tovid will make the chapter points for you by dividing the video length by the number you supply. If using the -no-menu option, the INT passed in will be the chapter interval in minutes, rather than the above formula.
If passing HH:MM:SS format you need to pass the string of chapter points for each video and each string should have comma separated values. Additionally, the first chapter should always start at 00:00:00 as dvdauthor will add that if it is not there already.
To get your time codes, you can play your videos in mplayer and press ’o’ to see them on-screen. I have found these to be very accurate in my short tests. For greater frame accuracy you could try loading the file in avidemux and find the time codes for the frames you want.
If passing grouped chapters you need to join the chapters from all the videos in a group with a ’+’ separator. If you want to skip creating chapters for a video in the group use ’0’ for its chapters.
Note: chapters for grouped videos should probably be passed in using the above HH:MM:SS format. (Arbitrary chapters using just an INT for the # of chapters is not guaranteed to work reliably in all cases for grouped videos at the moment.)
Example for passing just number of chapters ( 4 videos ):
-chapters 5 2 4 8
Example of passing chapter points ( 4 videos ):
-chapters 00:00:00,00:05:34.41,00:12:54,00:20:45 \
00:00:00,00:04:25.623,00:09:12,00:15:51 \
00:00:00,00:05:10,00:13:41,00:18:13.033 \
00:00:00,00:15:23.342,00:26:42.523
Example of passing grouped chapters using the ’+’ separator:
-chapters 00:00:00,00:05:34.41,00:12:54,00:20:45+00:04:23,00:09:35 \
00:00:00... etc.
Allow grouping videos in dvdauthor.xml, so they will play sequentially as a group. The videos passed in after the ’N’ will be grouped with the ’Nth’ video. Example:
-group 2 2.mpg 3.mpg 4.mpg
will group these 3 videos with the 2nd video given with -files, so that they will play sequentially as one title. Only one thumbnail and/or title will appear on the menu for the group: it will be made from the 1st video in the group. In the above example if you passed:
-files foo.mpg bar.mpg baz.mpg -group 2 2.mpg 3.mpg 4.mpg
then the group will consist of bar.mpg 2.mpg, 3.mpg and 4.mpg, and only the title and/or thumbnail for bar.mpg will appear in the menu. You can use -group more than once for multiple groups. Be sure to quote video filenames if they contain spaces.
-menu-title-geo north|south|east|west|center|[south]
The position of the menu title. You may need to use -align as well if you don’t want your title covering other parts of your menu. See -align
Use a montage tile of 3x1 instead of the usual 2x2 for 3 videos ie.
[movie1] [movie2] [movie3] instead of:
[movie1] [movie2]
[movie3]
This option only comes into play if the number of videos supplied equals 3 Otherwise it will be silently ignored. Not used for -showcase-* style.
Rotate thumbs the given amount in degrees - can be positive or negative. There must be one value for each file given with -files. If the values are not the same distance from zero, the thumbs will be of different sizes as images are necessarily resized *after* rotating. With the default montage template - this will also resize the titles; with the showcase template the titles will remain the same size. Example:
-rotate-thumbs -10 10 -10 10 -10 (for 5 files)
**Note: this option will not turn a portrait image into a landscape image!
This will output a <video aspect WIDTH:HEIGHT /> tag for the dvdauthor xml file. It will affect all videos in the titleset. Example:
-aspect 16:9
This will output a <video widescreen=nopanscan /> tag (for example) for the dvdauthor xml file. It will affect all videos in the titleset. Use in conjunction with -aspect if your dvd player is cropping your videos. Example:
-aspect 16:9 -widescreen
The argument given to various *-font options that set the font to use must be one of the fonts listed by the command ’convert -list type’. Please note that many of your installed fonts may not be available; if you want to maximize the number of fonts available to todisc, download and run {Anthony Thyssen’s} {http://www.cit.gu.edu.au/~{}anthony/anthony.html} {imagick_type_gen} {http://www.imagemagick.org/Usage/scripts/imagick_type_gen} script and run it like this: imagick_type_gen > ~{}/.magick/type.xml. If that doesn’t work, try imagick_type_gen > ~{}/.magick/type.mgk.
Or you can specify a ttf font file directly to the *-font options if you don’t want to install fonts to ImageMagick.
The *-stroke options in todisc are not a stroke in the sense that ImageMagick uses the term, but rather a font shadow (the text is drawn twice) To get a truer Imagemagick -stroke try something like: -title-font-deco “-stroke black” (or -titles-font-deco “-stroke black”). The -fontdeco option is quite flexible and takes a lot of ImageMagick’s convert options. Please refer to the tovid {wiki} {http://tovid.wikia.com/wiki/Making_a_DVD_with_text_menus} and Anthony Thyssen’s guide for further explanation and examples.
tovid mpg converts arbitrary video files into (S)VCD/DVD-compliant MPEG format, suitable for burning to CD/DVD-R for playback on a standalone DVD player.
tovid mpg [OPTIONS] -in INFILE -out OUTPREFIX
Where INFILE is any multimedia video file, and OUTPREFIX is what you want to call the output file, minus the file extension. OPTIONS are additional customizations, described below.
By default, you will (hopefully) end up with an NTSC DVD-compliant MPEG-2 video file; if you burn this file to a DVD-R, it should be playable on most DVD players.
For example:
Standard formats, should be playable in most DVD players:
Non-standard formats, playable in some DVD players:
See {kvcd.net} {http://kvcd.net/} for details on the KVCD specification. Please note that KVCD (“K Video Compression Dynamics”) is the name of a compression scheme that can be applied to any MPEG-1 or MPEG-2 video, and has little to do with VCD (“Video Compact Disc”), which is the name of a standard video disc format.
tovid automatically determines aspect ratio of the input video by playing it in mplayer. If your video plays with correct aspect in mplayer, you should not need to override the default tovid behavior.
If mplayer does not play your video with correct aspect, you may provide an explicit aspect ratio in one of several ways:
The above are the intended INPUT aspect ratio. tovid chooses an optimal output aspect ratio for the selected disc format (VCD, DVD, etc.) and does the appropriate letterboxing or anamorphic scaling. Use -widetv to encode for a widescreen monitor or TV.
Desired output quality, on a scale of 1 to 10, with 10 giving the best quality at the expense of a larger output file. Default is 6. Output size can vary by approximately a factor of 4 (that is, -quality 1 output can be 1/4 the size of -quality 10 output). Your results may vary. WARNING: With -quality 10, the output bitrate may be too high for your hardware DVD player to handle. Stick with 9 or lower unless you have phenomenally good eyesight.
At present, this option affects both output bitrate and quantization (but may, in the future, affect other quality/size-related attributes). Use -vbitrate if you want to explicitly provide a maximum bitrate.
Do interlaced encoding of the input video (top fields first). Use this option if your video is interlaced, and you want to preserve as much picture quality as possible. This option is ignored for VCD, which doesn’t support it.
You can tell your source video is interlaced by playing it, and pausing during a scene with horizontal motion; if you see a “comb” effect at the edges of objects in the scene, you have interlaced video. Use this option to encode it properly.
If you would prefer to have output in progressive format, use -progressive. If you have a DV camera, use -interlaced_bf since DV footage is generally bottom fields first.
tovid id identifies each multimedia video file in a list, and reports its compliance with video disc standards such as VCD, SVCD, and DVD.
tovid id [OPTIONS] VIDEO_FILE(s)
For example:
tovid id foo.avi tovid id -tabluar videos/*.mpg
tovid dvd takes a dvdauthor XML file (as generated by the tovid xml command) and authors a DVD filesytem. This command can also burn a DVD disc from either the XML file or from an existing DVD file-system.
To ensure that this script successfully executes, please run it from a directory with plenty of free space. “Plenty” would be 10 GB for single-layer discs, and 20 GB for dual-layer discs. Running this program may slow down your other applications, due to intense disk activity.
tovid dvd [OPTIONS] DVD_DIR tovid dvd [OPTIONS] FILE.xml
For example:
tovid dvd -burn /path/to/DVD/directory tovid dvd -burn MyDisc.xml
tovid chapters will start a GUI using mplayer to set chapter points in a video. If the video plays through and you want to add more chapters you can press the play button again, but remember that new chapter points will be appended (in correct sequential order). It will display the resulting chapter points, and also output to a terminal (useful for scripts). As well it will give the option of saving the chapters string to a text file.
Note that the ’tovid gui’ now features a similar widget when you press the chapters button on the opening page.
tovid chapters foo.avi {chapters=$(tovid chapters /home/grepper/videos/foo.avi)}
For further assistance, contact information, forum and IRC links, please refer to the {tovid homepage} {http://tovid.wikia.com/}.