Results 1 to 2 of 2

Thread: How I make DVDs from the command line

  1. #1
    Join Date
    Oct 2010
    Location
    Sweden
    Beans
    799
    Distro
    Ubuntu 14.04 Trusty Tahr

    How I make DVDs from the command line

    I tested this on Ubuntu 12.04 with .mp4 and .avi files.
    The DVD will not have a menu or chapters, but will play in a DVD player.
    At least it works in my player connected to my TV
    The DVD will only have the default audio track.
    If you want to change audio tracks you need to do that before running this script.
    I use mencoder for specifying audio tracks.
    Call the script by putting it in PATH (Don't forget to make this script executable.)
    I named the script makedvd

    Change: Fixed the problem of spaces in the .iso file name

    Code:
    #!/bin/bash
    # by GrouchyGaijin September 28, 2013
    #I tested this on Ubuntu 12.04 with .mp4 and .avi files.
    # The DVD will not have a menu or chapters, but will play in a DVD player.
    # At least it works in my player connected to my TV
    # The DVD will only have the default audio track.  
    # If you want to change audio tracks you need to do that before running this script.
    # I use mencoder for specifying audio tracks.
    # Call the script by putting it in PATH (Don't forget to make this script executable.)
    # I named the script makedvd
    
    
    ## REQUIRED PROGRAMS ##
    # ffmpeg
    # dvdauthor
    # growisofs
    
    
    #Change: Fixed the problem of spaces in the new DVD name 
    
    
    
    
    echo "This script is for making a DVD "
    echo "Start in the folder containing the master video."
    read -p "Enter the name of the master video file: " master
    read -p "Enter the name for your DVD: " new_name
    
    
    echo "Shall we convert the video into the correct format?
    If so type yes."
    read x
    if [ "$x" = "yes" ]
    then
    # I chose PAL change this to the correct format
    ffmpeg -i $master -aspect 4:3 -target pal-dvd dvd.mpg
    
    
    else
    echo "OK, come back when you are ready"
    fi
    
    
    echo "Now we make the DVD files."
    dvdauthor -o dvd/ -t dvd.mpg 
    
    
    echo "Here we set the region to PAL"
    #Change this as needed
    VIDEO_FORMAT=PAL dvdauthor -o dvd/ -T
    
    
    echo "Ready to make the iso file? 
    If so type yes."
    read x
    if [ "$x" = "yes" ]
    then
    mkisofs -dvd-video -o dvd.iso dvd/
    else
    echo "OK, come back when you are ready"
    fi
    mv dvd.iso "$new_name".iso
    
    
    echo "Want to try to burn one?. 
    If so type yes."
    read x
    if [ "$x" = "yes" ]
    then
    # I have a crappy old laptop so I burn at 2x. You can probably go faster.
    growisofs -speed=2 -dvd-compat -Z /dev/dvdrw=$new_name.iso 
    else
    echo "OK, come back when you are ready"
    fi
    
    echo "Clean up?
    If so type yes"
    read x
    if [ "$x" = "yes" ]
    then
    rm -r dvd 
    rm dvd.mpg
    else
    echo "OK, Don't forget to do it later"
    fi
    
    
    echo "Finished and all according to plan more or less!"
    Last edited by GrouchyGaijin; September 28th, 2013 at 03:08 PM. Reason: fixed an error

  2. #2
    Join Date
    Apr 2012
    Beans
    4

    Re: How I make DVDs from the command line

    nica tutorial dude

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •