9 export VIDEO_FORMAT=NTSC
11 if [[ -z $SRC ]] || [[ ! -r $SRC ]]; then
12 echo "-E- You need to specify a valid src video file as an argument"
16 if [[ ! -e "$MPG" ]]; then
17 echo "-> Converting \"$SRC\" -> \"$MPG\""
18 # Convert the SRC video into a DVD compatible mpg2 file
19 ffmpeg -i "$SRC" -target ntsc-dvd -aspect 16:9 "$MPG"
20 if [[ $? != 0 ]]; then
21 echo "-> ffmpeg encountered an error. aborting..."
27 echo "-> Creating DVD ISO: $ISO"
28 # Create an intermediate DVD dir
30 # Define the title file
31 dvdauthor -o "$DVD" -t "$MPG"
32 # Create a table of contents
33 dvdauthor -o "$DVD" -T
34 # Convert the DVD dir into an ISO image
35 genisoimage -dvd-video -o "$ISO" "$DVD"
36 # Remove the intermediate DVD dir
38 # Remove the intermediate MPG file