Background
Occasionally I’ve needed to burn an mp4 or m4v file to a DVD. No need for any DVD menus, just a disc that would start playing immediately when inserted. Here’s a quick run down of how you can accomplish this via the command line.
Solution
Here’s how I do it for a single video DVD without a menu.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
# 1. first convert the video with ffmpeg ffmpeg -i input.m4v -target ntsc-dvd output.mpg # 2. now do the authoring dvdauthor --title -o dvd -f output.mpg dvdauthor -o dvd -T # NOTE: --title sets the title of the DVD, -T sets the table of contents. In both # above commands the -o switch is referencing a directory, NOT the actual dvd. # 3. roll the .mpg file into an ISO file mkisofs -dvd-video -o dvdimage.iso dvd # NOTE: mkisofs is making an actual DVD video ISO file using the directory, dvd. # 4. burn the ISO to DVD disc growisofs -speed=1 -dvd-compat -Z /dev/dvd=dvdimage.iso NOTE: -speed=1 is for use with lower quality discs, increase as necessary |
NOTE: This approach can be used to convert basically any format (m4v, mp4, etc.) to a DVD. Simply change the input file accordingly.
1 2 3 4 5 6 7 8 |
# m4v ffmpeg -i input.m4v -target ntsc-dvd output.mpg # mp4 ffmpeg -i input.mp4 -target ntsc-dvd output.mpg # etc ... |
Useful Links
- Ubuntu forum thread: m4v to dvd
- about:blank blog: DVD-Authoring with Linux
- ffmpeg howto pages
- Digital (dis)content blog: HOWTO: ffmpeg & x264 presets
- robert.swain’s blog: x264 encoding guide
NOTE: For further details regarding my one-liner blog posts, check out my one-liner style guide primer.