Skip to content

Instantly share code, notes, and snippets.

@jbonhag
Created January 2, 2017 01:22
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jbonhag/cc416e1f72eb99de4b6cd852756d1324 to your computer and use it in GitHub Desktop.
Save jbonhag/cc416e1f72eb99de4b6cd852756d1324 to your computer and use it in GitHub Desktop.
Make a DVD from iPhone movies
all: clean dvd
dvd: dvd.iso
hdiutil burn dvd.iso
dvdauthor.xml:
echo "<dvdauthor>" > dvdauthor.xml
echo " <vmgm />" >> dvdauthor.xml
echo " <titleset>" >> dvdauthor.xml
echo " <titles>" >> dvdauthor.xml
echo " <pgc>" >> dvdauthor.xml
for video in IMG_*.mp4; do echo " <vob file=\"$$video.mpg\" />" >> dvdauthor.xml; done
echo " </pgc>" >> dvdauthor.xml
echo " </titles>" >> dvdauthor.xml
echo " </titleset>" >> dvdauthor.xml
echo "</dvdauthor>" >> dvdauthor.xml
dvd.iso: dvdauthor.xml
for video in IMG_*.mp4; do ffmpeg -i $$video -aspect 16:9 -target ntsc-dvd $$video.mpg; done
VIDEO_FORMAT=NTSC dvdauthor -o dvd -x dvdauthor.xml
mkisofs -dvd-video -o dvd.iso dvd/
clean:
rm -f dvd.iso
rm -fr dvd/
rm -f dvdauthor.xml
rm -f *.mpg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment