Skip to content

Instantly share code, notes, and snippets.

@githuib
Last active March 26, 2026 14:35
Show Gist options
  • Select an option

  • Save githuib/8634cb34ebd52050bb4c9f67fc53a8d2 to your computer and use it in GitHub Desktop.

Select an option

Save githuib/8634cb34ebd52050bb4c9f67fc53a8d2 to your computer and use it in GitHub Desktop.
#!/bin/sh
# Prerequisites (on MacOS with Homebrew installed)
# brew install dvdauthor dvdrtools ffmpeg
# Usage:
# chmod +x burndvd.sh
# ./burndvd.sh path/to/input_video.ext
input_file="$1"
if [ -f "$input_file" ]
then
temp_path="$(mktemp -d)/out"
# Convert input file to MPEG-2
ffmpeg -i "$input_file" -threads 16 -aspect 16:9 -target ntsc-dvd "$temp_path.mpg"
# Demux into VIDEO_TS/AUDIO_TS structure
VIDEO_FORMAT=NTSC dvdauthor -o "$temp_path" -t "$temp_path.mpg"
# Create table of contents IFO
VIDEO_FORMAT=NTSC dvdauthor -o "$temp_path" -T
# Create ISO
mkisofs -dvd-video -V VOLUME -o "$temp_path.iso" "$temp_path/"
# Burn to DVD
hdiutil burn "$temp_path.iso"
else
echo "No (existing) input file provided (run script with ./burndvd.sh path/to/input_video.ext)."
exit 1
fi
@itsdrewmiller

Copy link
Copy Markdown

You might want to add ffmpeg to the brew install list

@githuib

githuib commented Dec 11, 2025

Copy link
Copy Markdown
Author

You might want to add ffmpeg to the brew install list

Ah sure thanks :) In fact I just took this from a reddit post and wanted to share my adjustments to it as well with this gist.
(so there might be some more things not working out of the box for other people as I didn't have a more generic use case in mind)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment