What is mmm?
MakeMovingMenus (aka mmm) is a tool to generate a thumbnail menu background for DVD authoring for chapters of one file or multiple clips.
To prevent misunderstandings: mmm is not (yet?) a DVD menu authoring tool! It is a simple helper script to create fancy backgrounds for menus created with dvdauthor, spumux etc.
Warning
This script produces a massive amount of temporary data files. This will be made configurable in a next version to be either fast or save space on your harddisk
Features
- Resizing of source pictures
- Generate PAL/NTSC compilant MPEG2 files
- arbitrary backgrounds through images or solid color
- play clips one after anoter or all at once
Prerequisites
- Perl ( tested with 5.8.4 )
- transcode ( tested with recent cvs snapshot )
- mjpegtools ( tested with version 1.6.2 )
- imagemagick + perlmagick ( tested with 6.0.3.1 )
- XML::Simple (for config files)
Changes
Version 0.3
- added autodetection of used programs
- code cleanups, more comments
- support PNG, JPEG and PPM as temporary file format (small benchmark)
Version 0.2.1
- removed hardwired transcode path
- added forgotten check for ppm
Version 0.2
- added support for masks
- corrected plenty of typos in program and documentation
- fixed NTSC handling ( was always producing PAL size frames )
Usage
mmm.pl [options] --xml <filename>
- Options
- --tempdir <dirname> Directory for temporaray files (will be created)
--resolution Width x Height Resolution for background images
--format pal|ntsc Video format to use (pay attention to use the)
right resolution --successive Play clips one after another, not simultaneously --frames <num> Length of clips in frames --output <filename> Name of output clip (.m2v will be appended) --images ppm|png|jpg Format of intermediate files (ppm is default)
These options override the values provided in xml file. General option precedence is: default < XML < commandline
Syntax of the XML file format
<mmm [tmpdir="<path>"] [resolution="<WxH>"] [format="pal"|"ntsc"]
[images="ppm"|"png"|"jpg"] [successive="0"|"1"]
[background="#rrggbb"|"<filename>"]
[frames="<num>"] [output="<filename>"]>
<clip x="<pos>" y="<pos>" vob="<filename>" [startframe="<int>"]
[width="<int>"] [height="<int>"] [mask="<filename>"] />
[<clip ... />]
</mmm>
<mmm>
- tmpdir denotes the directory in which the temporary image files are saved. This corresponds to the commandline Option --tempdir. (default: /tmp)
- resolution is the resolution of the generated clip. Please pay attention that you choose a valid resolution for the used video format. Valid resolutions for PAL are 720x576, 704x576, 352x576 and 352x288, for NTSC 720x480, 704x480, 352x480 and 352x240. The corresponding commandline option is --resolution (default: 720x576).
- format can be either pal or ntsc; read the note about valid resolutions aswell. Can be overridden with --format (default: pal).
- images
- successive is a boolean value (either 0 or 1) to denote if the videos are played simultaneously (0) or one after another (1) (default: 0).
- background can be either a hex color triplet (#rrggbb) or a filename pointing to an image file. Formats supported are the same as those by ImageMagick. This can be overidden with --background (default: #000000).
- frames denotes the number of frames which are captured from the suplied clip(s). This option determines the length of the resulting clip, depending on the chosen video format (25 Frames = 1 sec. in PAL, 30 Frames = 1 sec. in NTSC). If in successive mode, the length of the produced clip is frames * #clips (default: 250).
- output is a prefix for the output filename, .m2v will be appended to it (default: clip).
Furthermore this file contains an arbitrary number of <clip /> tags.
<clip />
Mandatory options
- vob is the name of the clip
- x and y denote the position of the clip
tweaking of the clip
- width and height allow modification of the clip size. If not specified, the size of the originating clip is used
- startframe can be used to specify the start of the thumbnail clip. Otherwise the thumbs are generated from the start of the clip.
- mask can be used to provide matte information. A mask image is typically grayscale and the same size as the clip. If mask is not grayscale, it is converted to grayscale and the resulting intensities are used as matte information.
TODO
- more NTSC testing
- make complete MPEG files with sound (arbitrary & silence, 0.4)
- ability to add buttons and make complete menus already containing subtitles(0.4)
Contact
Benchmark
These numbers were generated on an Duron 900 using 2 videos as sourcefiles
To summarize: using JPEG as intermediate format, mmm is fast and does not use space, but JPEG is lossy; if you can cope with this, JPEG is the format of your choice
Both ppm and png have disadventages. For ppm, it's the size of the temporary material, for PNG it's the speed (ok, this will actually vanish on a slightly faster computer)
Generation of a 10s PAL clip with JPEG as intermediate format
jgeorg@newton:~/src/mmm$ time ./mmm.pl --xml thumbs.xml --frames 250 --images j
pg
Searching for programs.
Extracting video frames
Creating frame 000249
Creating video stream.
real 2m17.065s
user 1m50.524s
sys 0m4.897s
jgeorg@newton:~/src/mmm$ du -hcs menus/
7,8M menus/
7,8M total
Generation of a 10s PAL clip with PPM as intermediate format
jgeorg@newton:~/src/mmm$ time ./mmm.pl --xml thumbs.xml --frames 250 --images p
pm
Searching for programs.
Extracting video frames
Creating frame 000249
Creating video stream.
real 2m8.250s
user 1m26.963s
sys 0m9.337s
jgeorg@newton:~/src/mmm$ du -hcs menus/
335M menus/
335M total
Generation of a 10s PAL clip with PNG as intermediate format
jgeorg@newton:~/src/mmm$ time ./mmm.pl --xml thumbs.xml --frames 250 --images p
ng
Searching for programs.
Extracting video frames
Creating frame 000249
Creating video stream.
real 4m37.156s
user 3m57.066s
sys 0m6.448s
jgeorg@newton:~/src/mmm$ du -hcs menus/
59M menus/
59M total
