Skip to content

Instantly share code, notes, and snippets.

@i8degrees
Created April 14, 2016 00:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save i8degrees/fe9fbcdd71536392cec03e1554077a15 to your computer and use it in GitHub Desktop.
Save i8degrees/fe9fbcdd71536392cec03e1554077a15 to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
# to_dvd.sh:jeff
# SOURCE: http://ffmpeg.gusari.org/viewtopic.php?f=25&t=1235
OUTPUT_FILE=out.mpg
# TODO(jeff): escape input with printf
ffmpeg -i "${1}" -filter:v "scale='if(gt(a,720/480),720,-1)':'if(gt(a,720/480),-1,480)',pad=w=720:h=480:x=(ow-iw)/2:y=(oh-ih)/2" -target ntsc-dvd ${OUTPUT_FILE}
# Environment setup for dvdauthor
export VIDEO_FORMAT=NTSC
DVD_ROOT=dvd
dvdauthor --title -o ${DVD_ROOT} -f ${OUTPUT_FILE}
# Setup the table of contents
dvdauthor -T -o ${DVD_ROOT}
DVD_ROOT=$(pwd)
DVD_NAME="Sinister"
ISO_IMAGE=dvd.iso
hdiutil makehybrid -iso -udf -udf-version 1.02 -joliet \
-udf-volume-name ${DVD_NAME} -o ${ISO_IMAGE} ${DVD_ROOT}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment