Howto Convert AVI to DVD ISO in Ubuntu
Sponsored Link
Preparing your system
First you need to install following packages
sudo aptitude install ffmpeg mencoder lame dvdauthor lame-extras libtwolame0 genisoimage
Now create a file avi2dvd
sudo gedit /usr/bin/avi2dvd
Add the following contents
#!/bin/bash
output=$1
####################
# avi Function #
####################function avi {
mencoder -oac lavc -ovc lavc -of mpeg -mpegopts format=xvcd -vf scale=352:196,expand=352:240,harddup -srate 44100 -af lavcresample=44100 -lavcopts vcodec=mpeg1video:keyint=18:vrc_buf_size=327:vrc_minrate=1152:vbitrate=1152:vrc_maxrate=1152:acodec=mp2:abitrate=224 -ofps 30000/1001 -o output.mpg "$output"
}####################
# vcd Function #
####################function vcd {
ffmpeg -i output.mpg -target ntsc-dvd -aspect 4:3 output2.mpg
}####################
# rm1mpg Function #
####################function rm1mpg {
rm output.mpg
}####################
# convert Function #
####################function convert {
dvdauthor -o dvd -t output2.mpg
}####################
# rmpg Function #
####################function rmpg {
rm output2.mpg
}###################
# Rename Function #
###################function finalize {
dvdauthor -o dvd -T
}
#####################
# ISO Function #
#####################function image {
mkisofs -dvd-video -o dvd.iso dvd/
}
#####################
# rm2 Function #
#####################function rm2 {
rm -rf dvd/
}
###############
# Script #
###############avi ;
vcd ;
rm1mpg ;
convert ;
rmpg ;
finalize ;
image ;
rm2 ;exit
Save and exit the file
You can download this script from here . This file name is avi2dvd.sh script
Now change this file permissions with the following command
sudo chmod 755 /usr/bin/avi2dvd
place your avi file into a directory of your choice and cd into it
cd /home/someuser/avidirectory
run this comand
avi2dvd *
it takes about an hour but the end result is an iso to burn using your favorate cd burning software k3b, nero etc
You can also use DeVeDe to do this.
Credit goes Here
Or just use Devede 🙂
Why bother? Use Devede and you can convert from avi plus flv, mp4, divx and more. What’s more you just drag and drop the files. I don’t know why people insist that the commandline is easier. This all seems to be wasted effort.
thats a lot of work. DeVeDe makes it easy.
sudo apt-get install devede
I just wanted to echo the opinion of the others above. I have found devede to be very simple to use and would highly recommend it.
I’ll have to check devede out, but I also like knowing how to do this from a command line. Thanks for the article.
Command line is no doubt sometimes more effective than using a GUI. Imagine that you have 100 avi files in a directory and you want to convert them all to separate DVDs. What you need to do if you have the above script:
for p in *.avi; do avi2dvd.sh $p; done
and you go back four days later having 100 DVDs. I think it took much more time opening the 100 files separately and pressing buttons to convert.
Do not fear of command line!
Why not to add a line to burn the DVD using growisofs?
Great Script, because DEVEDE isn’t working for me.
However, is it possible to put more than one avi on a dvd using the command line?
Would be great to have a script, that puts all of the files in the directory to a dvd, shrinking them to fit on one disk and creating a dvd-menu to select them… 🙂
Thanks. No gui for me! I like to use commandline so that I can feel smug.
I would note that a more better quality is achieved by using the following mencoder comment in avi function instead:
mencoder -oac lavc -ovc lavc -of mpeg -mpegopts format=dvd:tsaf \
-vf scale=720:576,harddup -srate 48000 -af lavcresample=48000 \
-lavcopts vcodec=mpeg2video:vrc_buf_size=1835:vrc_maxrate=9800:vbitrate=5000:\
keyint=15:vstrict=0:acodec=ac3:abitrate=192:aspect=16/9 -ofps 25 \
-o movie.mpg movie.avi
(source: mplayerhq.hu)
devede is what i have using for a long time. the first versions were buggy, but now it is cool.
Thanks to the guy who published this info, it is always useful to know how the machine works and not only be a submissive user of somebody else’s SW. At the very end of the article he says ‘…or use devede’. So what is about all those comments to recommend using devede or about feeling rhetorically snug to use the command line.
Thank the guy who taught you something and log off.