Find the answer to your Linux question:
Results 1 to 3 of 3
I am trying to burn a avi file to a DVD, so that it can be watched on a regular dvd player. I do not want to use any gui's ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Feb 2006
    Location
    California
    Posts
    1

    Burning avi's using a Bash shell


    I am trying to burn a avi file to a DVD, so that it can be watched on a regular dvd player. I do not want to use any gui's to do it, just cli

  2. #2
    Linux Engineer spencerf's Avatar
    Join Date
    Jan 2005
    Location
    Syracuse, NY
    Posts
    1,144
    you need to use mencoder to convert to a dvd compliant mpeg
    then you need to use dvdauthor or a more powerful program dvdstyler (though I think this only gui not sure though) to author the dvd in proper dvd format structure, i.de video_ts / audio_ts
    then growisofs or cd-record-pro to burn to dvd

    here is a sample mencoder scriptt i've used in the past just copy and past and make executable

    Code:
    #!/bin/bash
    if [ $# -eq 1 ]
    then
    dir="$1"
    else
    dir="$PWD"
    fi
    cd $dir
    for file in *.avi
    do
    mencoder "$file" -of mpeg -vf scale=720:480,harddup -oac lavc -ovc lavc -lavcopts -acodec=ac3:abitrate=192:vcodec=mpeg2video:keyint=25:vbitrate=5000:aspect=4/3 -mpegopts format=dvd -srate 48000 -ofps 30000/1001 -o ${file%%avi}mpg
    done
    where the line starting from "mencoder" to the line starting with "-mpegopts" should all be on the same line

    this script will convert all avi files in the directory into mpg




    hope this helps
    All right, brain. You don't like me and I don't like you, but let's just do this and I can get back to killing you with beer. All New Users Read This!!! If you have a grub problem please look at GRUB MANUAL

  3. #3
    Just Joined!
    Join Date
    May 2006
    Posts
    5
    I've written a script to do exactly this. Please take a look here:

    http://www.linuxquestions.org/questi....php?p=2242797

Posting Permissions

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