Created
April 14, 2016 00:14
-
-
Save i8degrees/fe9fbcdd71536392cec03e1554077a15 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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