| Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
|
By ptesone at 2005-08-30 14:58
|
|
here's 6 basic steps to convert a .AVI to DVD so you can watch your movies on your home player, not just your computer. . .But first we need to figure out if it's a fullscreen movie or letterbox movie. . .Movies normally come in two sizes: 4:3 (fullscreen) or 16:9 (letterbox) which they call aspect ratio. . .They also come in two formats PAL (Non-US) and NTSC (US). . .The following examples are for NTSC Only!
what you need first:
transcode
mplayer
Mjpegtools
ffmpeg
dvd+rw-tools
Dvdauthor
some hardrive space
in this example I will be using a 16:9 movie.avi for our conversion. . .
1.) Split the .avi file into 2 separate files, one for video and one for audio:
Code:
transcode -i movie.avi -y ffmpeg --export_prof dvd-ntsc --export_asr 3 -o movie -D0 -s2 -m movie.ac3 -J modfps=clonetype=3 --export_fps 29.97
this will make:
movie.m2v (video)
movie.ac3 (audio)
note: if you're doing a fullscreen (4:3) movie then simply change --export_asr 3 to --export_asr 2
2.) (optional) Extract 5.1 Audio:
Code:
tcextract -d2 -i movie.avi -a0 -x ac3 | tcextract -d2 -x ac3 -t raw > movie.ac3
This is an extra step if you know your .avi file actually has 5.1 surround sound. (Step one only produces a stereo .ac3 file !)
How can you tell? Do this first:
Code:
mplayer -vo dummy -identify movie.avi 2> /dev/null | grep "5.1 ("
if you get this output then you have 5.1:
Code:
AC3: 5.1 (3f+2r+lfe) 48000 Hz 384.0 kbit/s
if you don't, just ignore this step!
3.) Put the video & audio file back together:
Code:
mplex -f 8 -o dvd_movie.mpg movie.m2v movie.ac3
this will make dvd_movie.mpg ready for DVD authoring. . .
4.) open your favorite text editor and paste the following:
Code:
<dvdauthor dest="DVD">
<vmgm />
<titleset>
<titles>
<pgc>
<vob file="dvd_movie.mpg" chapters="0,15:00,30:00,45:00,1:00:00"/>
</pgc>
</titles>
</titleset>
</dvdauthor>
save the file as: dvdauthor.xml
in the same directory as your movie files
(you can also change the chapters to fit the times of your movie)
5.) Create a DVD directory where your movie files are and do this:
Code:
dvdauthor -x dvdauthor.xml
this will create two AUDIO_TS and VIDEO_TS directories in your DVD directory. . .
6.) Test it & Burn it:
to test it:
Code:
xine dvd:/full/path/to/DVD/VIDEO_TS/
to burn it:
Code:
growisofs -Z /dev/dvd -dvd-video DVD/
note: I like to use DVD-RW discs for a test before I use a real disc. . .
If all goes well, the above will produce movie with no menus, just the movie that should play when you put in your disc. . .and if there's more than one .avi then simply do this in your dvdauthor.xml file:
Code:
<dvdauthor dest="DVD">
<vmgm />
<titleset>
<titles>
<pgc>
<vob file="dvd_movie_part1.mpg" chapters="0,15:00,30:00,45:00,1:00:00"/>
</pgc>
<pgc>
<vob file="dvd_movie_part2.mpg" chapters="0,15:00,30:00,45:00,1:00:00"/>
</pgc>
</titles>
</titleset>
</dvdauthor>
GOOD LUCK!
|
|
|
|
All times are GMT -5. The time now is 05:28 AM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|
Great exposition for a topics many will be interested in, thanks.
Thanks as well to the people who suggested you to post this.
I explain first my experience and then go on to all links and comments I have.
Your tutorial is coming at the time I am trying to put 20s video clips from my camera together onto a dvd. I first tried with my meagre knowledge of transcode and ffmpeg. Eventually managed to get some mpeg movies, but then dvdauthor complained (something to do with headers of file and padding; I had read about the -f 8 option, but somehow this is not enough to get the header right.). Anyhow, I did more searches, found your thread and some others.
Linux is great there is always more than 1 method. Here are some comments:
- Somebody will ask how to do the conversion to PAL (I will try to figure out for myself)
- "avi to vob" is a keyword you might want to add to your tutorial
"avi to mpeg" as well on top of "avi to dvd"
Possibly none of these "keyword" is absolutely correct,. but it will help newbies' searches (containers, codec, format, this a steep learning curve when one starts)
- I would state in the tutorial that this method does not (does?) work with divx (divx are avi files, are they not?)
- ffmpeg with option pal-dvd worked great to convert camera's avi to mpeg, but still I had this file header problem (the file plays with mplayer but dvdauthor cannot find the first vobu).
There must be some solution to convert avi to dvdauthor compliant file with ffmpeg
(not found it yet fully spelt out with google, need to look)
I suggest you add these links at the end of the tutorial
http://tovid.sourceforge.net/ A army knife video suit
A batch script AVI to VOB (I have not tried yet)
http://inferno.slug.org/cgi-bin/wiki?AviToVob
I have heard of avidemux and did some searches and found (cross-ref with some LQ threads below)
LINUX: AVI to DVD Encoding and Authoring : BASIC (using avidemux)
http://www.videohelp.com/forum/viewtopic.php?t=242455
{edit added QCreateVOB seems to be another solution. Not tried
http://qcreatevob.sourceforge.net/
heard of http://sourceforge.net/projects/kavi2svcd/ as well
<<a GUI for generating VCD/SVCD/DVD-compliant MPEG files from an AVI, MPEG, Quicktime or whatever file using transcode and mplex>>
}
---------- LQ Threads ---------------
A thread about tools
http://www.linuxquestions.org/questi...2avi+to+dvd%22
Thread with links
http://www.linuxquestions.org/questi...2avi+to+dvd%22
---------- Further readings ---------------
http://mightylegends.zapto.org/dvd/dvdauthor_howto.php
http://gentoo-wiki.com/HOWTO_Mencode...Stream_Ripping
---------- Further readings background ---------------
http://www.bunkus.org/dvdripping4linux/single/
(I could net get it to work with 1.0pre6-3.4.3. maybe the feature was just added)
mpegopts is documented in http://mplayerhq.hu/DOCS/man/en/mplayer.1.html
and it all does it in one line ! :-) Good guys at mplayers really
This is the example they give for avi to DVD PAL compliant
http://mplayerhq.hu/DOCS/HTML/en/men...vd-all-pal-dvd
mencoder -oac lavc -ovc lavc -of mpeg -mpegopts format=dvd -vf scale=720:576,\
harddup -srate 48000 -af lavcresample=48000 -lavcopts vcodec=mpeg2video:\
vrc_buf_size=1835:vrc_maxrate=9800:vbitrate=5000:keyint=15:acodec=ac3:\
abitrate=192:aspect=16/9 -ofps 25 \
-o movie.mpg movie.avi
(For NTSC change: Look in the code at STEP 1)
Just made this overnight, some things can be made better and ofcourse you may.
have fun.
bas
othwerise yes to your question.
Just experiment for yourself you will learn, I am sure
original is this:
good luck.
if it does not work, just say it.
bye.
bas
What exactly does one paste? :}
Cheers,
Tink
the actual code is:
[code]
dvdauthor -x dvdauthor.xml
[\code]
this means:
the program: dvdauthor
does option: -x
to the file: dvdauthor.xml
and i suppose that the file dvdauthor.xml is already made earlier in the script.
Good Luck.