LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
LinkBack Search this Thread
Old 08-30-2005, 01:08 PM   #1
ptesone
Member
 
Registered: Nov 2003
Location: USA
Distribution: Debian Sarge
Posts: 77

Rep: Reputation: 15
AVI to DVD


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 seperate 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"/>
         <vob file="dvd_movie_part2.mpg" chapters="0,15:00,30:00,45:00,1:00:00"/>
       </pgc>
     </titles>
   </titleset>
 </dvdauthor>

GOOD LUCK!

Last edited by ptesone; 08-30-2005 at 07:41 PM.
 
Old 08-30-2005, 02:51 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,344

Rep: Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945
you might want to submit this to our linuxanswers subsite to get the best out of this.
 
Old 08-31-2005, 10:46 AM   #3
ptesone
Member
 
Registered: Nov 2003
Location: USA
Distribution: Debian Sarge
Posts: 77

Original Poster
Rep: Reputation: 15
I tried, but didn't see it post. . .

Anyway here's how you add subtitles to your video stream:

1.) download the correct subtitle from http://eXTratitles.to

2.) use a program from dvdauthor called Spumux to add the subtitle text into the DVD video. Just make sure you have a .spumux dir in your home dir and put your fav .tff font in it. I used Vera.tff but any True Type font will do. Open your fav text editor and paste this:

Code:
<subpictures> <stream> <textsub filename="movie.srt" characterset="ISO8859-1" fontsize="18.0" font="Vera.ttf" horizontal-alignment="center" vertical-alignment="bottom" left-margin="60" right-margin="60" top-margin="20" bottom-margin="30" subtitle-fps="29.97" movie-fps="29.97" movie-width="720" movie-height="478"/> </stream> </subpictures>
save as 'subtitle.xml'

3.) Merge the subtitles into the DVD video:

Code:
spumux -s0 subtitle.xml < dvd_movie.mpg > dvd_movie.mpg.temp mv dvd_movie.mpg.temp dvd_movie.mpg
when complete you should now have subtitles in your dvd_movie.mpg

I goto http://cdcovers.cc for all my printing and menu needs. . .
 
Old 08-31-2005, 11:20 AM   #4
tekkieman
Member
 
Registered: Dec 2004
Location: Northern CA
Distribution: Mepis 6.5
Posts: 123

Rep: Reputation: 15
This is good news. More instruction for Avi/DVD. How does this compare with tovid? It seems to use the same tools. I don't know if tovid does subtitle tracks, but maybe there's an opportunity to collaborate...
 
Old 08-31-2005, 11:25 AM   #5
ptesone
Member
 
Registered: Nov 2003
Location: USA
Distribution: Debian Sarge
Posts: 77

Original Poster
Rep: Reputation: 15
never heard of tovid
is that a script?
 
Old 08-31-2005, 02:52 PM   #6
tekkieman
Member
 
Registered: Dec 2004
Location: Northern CA
Distribution: Mepis 6.5
Posts: 123

Rep: Reputation: 15
Several scripts, and an optional GUI. There are several threads here about it. The homepage is here
 
Old 02-06-2006, 07:04 AM   #7
tajo01
Member
 
Registered: Feb 2006
Location: Spain, but I am Italian
Distribution: Fedora Core 3, now Debian sarge
Posts: 31

Rep: Reputation: 15
Hi I am not a expert, so just sorry me if my question it's not appropriate. I am trying to convert my divx to DVD, and I found this tutorial, I download and installed transcode-1.0.2-3.1.fc3.rf, by yum(I am under fedora core 3). I tried to use it in the "ptesone way", but it does not work; the error is the follow below:

Code:
[transcode] warning : [import_ffmpeg.so] frame decoding failed
[export_ffmpeg.so]: INFO: Display aspect ratio calculated as 1.333333
[export_ffmpeg.so]: INFO: Sample aspect ratio calculated as 0.888889
[mpeg2video @ 0xb5a9c5c8]only YUV420 is supported
[export_ffmpeg.so] could not open FFMPEG codec
[transcode] warning : (encoder.c) video export module error: init failed
[transcode] critical: failed to init encoder
I have be trying to understand, but until now I'haven't found no solution. Do you have suggest?
Thanks really much, and sorry for my English, tajo01
 
Old 02-06-2006, 07:16 AM   #8
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,344

Rep: Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945
please don't ask questions in old threads.
 
Old 07-21-2009, 07:49 PM   #9
tsin
LQ Newbie
 
Registered: Dec 2008
Location: Rochester, NY
Distribution: Gentoo, Fedora/CentOS, Ubuntu
Posts: 2

Rep: Reputation: 0
Recent experience?

There must be SW that does this in one step: AVI-> playable DVD
No?
 
Old 07-21-2009, 08:11 PM   #10
unSpawn
Moderator
 
Registered: May 2001
Posts: 26,526
Blog Entries: 51

Rep: Reputation: 2601Reputation: 2601Reputation: 2601Reputation: 2601Reputation: 2601Reputation: 2601Reputation: 2601Reputation: 2601Reputation: 2601Reputation: 2601Reputation: 2601
please don't ask questions in old threads.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
AVI to DVD script bglnelissen Programming 5 10-27-2005 02:00 PM
Avi & Dvd RySk8er30 Mandriva 5 07-04-2005 01:33 PM
avi to dvd converter hongman Linux - Software 2 02-28-2005 03:23 PM
DVD AVI rip to DVD mooreted Mandriva 4 02-20-2005 08:57 AM
AVI on dvd? benne Linux - Software 3 02-05-2005 11:25 AM


All times are GMT -5. The time now is 03:52 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration