DVD
Jump to navigation
Jump to search
Script to create any video file to NTSC DVD ISO file in Ubuntu command line
- Requires ffmpeg dvdauthor mkisofs
apt-get install ffmpeg dvdauthor genisoimage
- Create Script
touch /usr/sbin/avi2dvd.sh
- Set Permissions
chmod 755 /usr/sbin/avi2dvd.sh
- Edit it
nano /usr/sbin/avi2dvd.sh
#!/bin/bash
export VIDEO_FORMAT=NTSC
output="$1"
basefull=$(basename -a "$1")
ext=${basefull##*.}
baseshort=$(basename -s \.$ext "$1")
#### FFMPEG
function tompg {
ffmpeg -i "$output" -aspect 16:9 -target ntsc-dvd -vsync 0 "$baseshort.mpg"
}
#### DVDAUTHOR
function todvd {
dvdauthor -o "$baseshort"/ -t "$baseshort.mpg"
}
#### DVDTOC
function todvdtoc {
dvdauthor -o "$baseshort"/ -T
}
#### GENISO
function toiso {
mkisofs -dvd-video -o "$baseshort".iso "$baseshort"/
}
function cleanup {
rm "$baseshort.mpg"
rm -rf "$baseshort"/
}
tompg ;
todvd ;
todvdtoc ;
toiso ;
cleanup ;
echo "$baseshort.iso is ready!"