• About Binary Impulse
  • BashBytes
Binary Impulse

Daily Archives: February 25, 2016

You are browsing the site archives by date.

How To Easily Create A DVD From Just About Any Video Format (Linux CLI)

February 25, 2016 4:05 AM / 3 Comments / Kirk Schnable

Background
Encoding DVDs seems to be a task which is often overcomplicated.  If you have a video file you would like to convert into a DVD, it turns out it is very easy to do it from the Linux command line.

I was looking for a quick way to encode video to DVD, and I found this fantastic post by vmiimu on the ffmpeg forum. His post was fantastic and gave me the basis to create this guide, so props to vmiimu!  I thought the post was a bit crowded and might be difficult for some people to follow, so I have distilled its essence into this post.

This guide will allow you to convert a wide variety of common video formats into a video DVD.  The scope of this guide is to encode 1 video to 1 DVD with no menu.   The source file can be much larger than a DVD, it will be reduced in size automatically.

Prerequisites
For this guide, you will need the following programs \ commands available.  You may need to install the package from your distribution’s package library.

  • ffmpeg (usually available as a package called ‘ffmpeg‘).
  • dvdauthor (usually available as the package ‘dvdauthor‘)
  • genisoimage (usually available as the package ‘genisoimage‘)
  • growisofs (usually available in the package ‘dvd+rw-tools‘)

Installing these programs is beyond the scope of this guide.  You are assumed to already have them installed.

Hint: If you are using a Red Hat based distro, you may need EPEL and NUX Desktop.

Filenames & Paths Used In This Guide
For ease of understanding, I will be using the following filenames in this guide.  Please substitute your own filenames as you choose.
source.mkv – The original source video file you want to burn to DVD.  This is the only file you must supply, the rest will be created.
temp.mpg – The mpeg encoded video file which will be actually burned to DVD.
dvdmovie – The directory which will store your DVD files during encoding (AUDIO_TS, VIDEO_TS)
dvd.iso – The final .ISO image which you will burn to your DVD.
/dev/dvd – The device path for your DVD burner.


The Process:
Convert the source video to an MPEG video file <4.7GB.
(This may take a long time, and is the most CPU intensive part of the process.)

For videos with 4:3 aspect ratio, use this command:

ffmpeg -i source.mkv -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 temp.mpg

For videos with 16:9 (widescreen) aspect ratio, use this command:

ffmpeg -i source.mkv -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" -aspect 16:9 -target ntsc-dvd temp.mpg

Assemble a DVD file structure.

export VIDEO_FORMAT=NTSC
dvdauthor --title -o dvdmovie -f temp.mpg
dvdauthor -T -o dvdmovie

Generate an ISO image file.

genisoimage -dvd-video -o dvd.iso dvdmovie

Burn the ISO to a DVD disk.
Now would be a good time to insert your blank DVD.

growisofs -dvd-compat -Z /dev/dvd=dvd.iso

That’s It!
Hopefully that went smoothly for you.  Please feel free to post in the comments section if you have any questions or suggestions for improvement of this guide.

Posted in: How-To's

Pages

  • About Binary Impulse
  • BashBytes

Recent Posts

  • My UBook X Linux Tablet Adventure and how I learned more than I ever thought I would need to know about accelerometer drivers
  • Migrating Proxmox Hypervisor’s Boot Volume ZFS Mirror To New (Smaller) Disks
  • OPNsense Performance Tuning for Multi-Gigabit Internet
  • Reddit Deplatforms Popular Microsoft Software Swap Subreddit
  • Comcast Upgrades Gigabit Pro from 3Gbps to 6Gbps!
February 2016
M T W T F S S
1234567
891011121314
15161718192021
22232425262728
29  
« Jun   Apr »

Recent Comments

  • jasonistre on OPNsense Performance Tuning for Multi-Gigabit Internet
  • Nick on OPNsense Performance Tuning for Multi-Gigabit Internet
  • Kirk Schnable on OPNsense Performance Tuning for Multi-Gigabit Internet
  • nick on OPNsense Performance Tuning for Multi-Gigabit Internet
  • Eric on My UBook X Linux Tablet Adventure and how I learned more than I ever thought I would need to know about accelerometer drivers

Categories

  • How-To's
  • Humorous
  • Musings
  • Newsworthy
  • Other

Meta

  • Register
  • Log in
  • Entries feed
  • Comments feed
  • WordPress.org
© Copyright 2025 - Binary Impulse
Infinity Theme by DesignCoral / WordPress