Last active
March 26, 2026 14:35
-
-
Save githuib/8634cb34ebd52050bb4c9f67fc53a8d2 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| #!/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 |
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
You might want to add ffmpeg to the brew install list