Quickly create a simple DVD from a single file

Here’s a script I use for creating a DVD with no menu from a single MPEG file. It puts chapter marks every 10 minutes.

#! /bin/bash
rm -rf tmp.mpg dvdfiles
ffmpeg -i “$1.mpg” -target dvd -vcodec copy -acodec copy tmp.mpg
dvdauthor -t -c 0:0,10:0,20:0,30:0,40:0,50:0,60:0,70:0,80:0,90:0,100:0,110:0,120:0 tmp.mpg -o dvdfiles
dvdauthor -T -o dvdfiles
mkisofs -dvd-video -udf -o “$1.iso” -V “$1″ ‘dvdfiles’
rm tmp.mpg
rm -rf dvdfiles

I call it smallerdvd, and use it like this:

smallerdvd moviefile

Where

moviefile.mpg

is the input file (don’t specify the .mpg), and it will create a DVD image called

moviefile.iso

.


]]>

Quickly put lots of small MPEG files into a DVD image

I’ve got about 200Gb of cartoons for my children to watch, stored on a NAS drive. But when we go on holiday, I don’t take the NAS drive with me! So I wanted to dump a load of them (each file is only 5 or 10 minutes long) onto a DVD quickly.

Here’s a script to do that – it assumes the input files are MPEG2 (although could be changed to do conversion as well). And I think it probably requires the input filenames to not have any spaces in them.

#! /bin/bash

rm -rf /tmp/mkdvd
mkdir /tmp/mkdvd
pushd /tmp/mkdvd

echo ‘‘ > dvd.xml
echo ‘‘ >> dvd.xml
echo ‘‘ >> dvd.xml
echo ‘ ‘ >> dvd.xml

let a=1
for f in $
do
ffmpeg -i “$f” -target dvd -vcodec copy -acodec copy $a.mpg
echo ‘‘ >> dvd.xml
let a=a+1
done

echo ‘‘ >> dvd.xml
echo ‘‘ >> dvd.xml
echo ‘‘ >> dvd.xml
echo ‘‘ >> dvd.xml

dvdauthor -x dvd.xml
dvdauthor -T -o dvdfiles
popd
mkisofs -dvd-video -udf -o “dvd.iso” -V “dvd” ‘/tmp/mkdvd/dvdfiles’
rm –rf /tmp/mkdvd

Save it as

mkdvd

, then use it with a command line:

mkdvd /my/video/files/pingu.mpg

It will leave a DVD image file call

dvd.iso

in the current directory.


]]>

Using the command line utilities bundled with SmallDVD

SmallDVD includes precompiled utilities of several useful utilities. To use these directly from the command line, just add the directory to your path. So if you put SmallDVD in the Applications folder, do this:

export PATH=$PATH:/Applications/SmallDVD.app/Contents/Resources

Add this to your .profile file if you want it to happen every time you open a terminal window.

The utilities included are:

  • ffmpeg: video & audio conversion, and remultiplexing
  • dvdauthor: creates DVD folders from video files
  • mkisofs: creates an ISO disk image from the DVD folders
  • mplex: video/audio multiplexing (no longer used by SmallDVD)
  • bbdmux: demultiplexes video/audio (no longer used by SmallDVD)

And a few others used in the creation of DVD menus,

spumux

,

mpeg2enc

,

png2yuv


]]>