Ubuntu Forums ubuntu.com - launchpad.net - ubuntu help  

Go Back   Ubuntu Forums > The Ubuntu Forum Community > Other Community Discussions > Tutorials & Tips
Register Reset Password Forum Help Forum Council Search Today's Posts Mark Forums Read

Ubuntu 9.10 is out!!!

When downloading Ubuntu 9.10 please consider using bittorrent to get your copy of Ubuntu.

The Ubuntu Developers Summit for Lucid Lynx will be held the week of 16-Nov-2009 till 20-Nov-2009 in Dallas, TX USA. Visit the the Ubuntu wiki for more information about UDS and how to participate remotely.

Tutorials & Tips
The place to find Ubuntu related Tips & Tricks.

 
Thread Tools Display Modes
Old December 17th, 2006   #1
netyire
Just Give Me the Beans!
 
netyire's Avatar
 
Join Date: Dec 2006
Location: No, I'm not out... yet
My beans are hidden!
Ubuntu 9.04 Jaunty Jackalope
Send a message via ICQ to netyire Send a message via MSN to netyire
Mov/Divx/Xvid/Wmv/Etc to DVD (PAL or NTSC)

A Guide To: Making DVDs from Various Formats (Get the script here: http://www.ubuntuforums.org/showthread.php?p=1900382)
Tools Requried:
  1. mencoder
  2. ffmpeg
  3. dvdauthor
  4. genisoimage or mkisofs (pre 8.10 users)

Please note, following this guide will produce a disc without menus.

Step 1: Convert Media to .AVI (Go to the next step, if the file you wish to convert is already in the .avi format)
Okay, the first thing you need to do is to transcode your media into .avi format so that it is accepted by ffmpeg. (I tried using ffmpeg directly to convert a .mov to .mpg. It did not work ) To do so type the following in the terminal:

mencoder <inputfile> -ovc xvid -xvidencopts pass=1 -oac mp3lame -lameopts vbr=3 -o /dev/null

After which type:

mencoder <inputfile> -ovc xvid -xvidencopts pass=2:bitrate=1000 -oac mp3lame -lameopts vbr=3 -o <outputfile>

Okay, now we have a xvid .avi file to work with!

Step Two: Convert the .avi file to a .mpg file

Right, now that you have a file that ffmpeg will accept, enter the following to transcode the file into a compliant .mpg file.

ffmpeg -i <outputfile from the above> -target pal-dvd final.mpg

If you DVD player uses ntsc then replace the 'pal' to 'ntsc'. Or if you want you can type:

ffmpeg -i <outputfile from above> -target pal-dvd -aspect 16:9 final.mpg

This will make the aspect ratio 16:9, see if it works for you.

Now you have your final .mpg file ready.

Step 3: Create the DVD file structure

Enter:

dvdauthor -o DVD/ -t final.mpg


and then:

dvdauthor -o DVD/ -T


Simple and fast, you now have the your DVD structure!

Step 4: Create The .ISO File

Type:

mkisofs -dvd-video -v -o DVD.iso DVD

And you finally have the .iso file ready for burning!

Merry Christmas!

Last edited by netyire; December 8th, 2008 at 03:55 AM.. Reason: mkisofs is included in already installed genisoimage package in 8.10
netyire is offline   Reply With Quote
Old December 18th, 2006   #2
netyire
Just Give Me the Beans!
 
netyire's Avatar
 
Join Date: Dec 2006
Location: No, I'm not out... yet
My beans are hidden!
Ubuntu 9.04 Jaunty Jackalope
Send a message via ICQ to netyire Send a message via MSN to netyire
Post Please Comment

If you find this useful, please drop a comment! I wrote a python program which asks you for the file you want to convert and a few other things like whether you want PAL or NTSC and whether you want the aspect 16:9 or 4:3 and then creates the DVD.iso for you, ready to burn! Please note that you need mencoder ffmpeg dvdauthor and mkisofs (pre 8.10 users, 8.10 includes this in the genisoimage package). You also need python to run the program. To use it just cd to the directory you extracted the file I attached in this post to and type

Code:
python program.py
Oh, and if you do not have any of the required programs installed just type this into the terminal if you are running pre 8.10:

Code:
sudo apt-get install mkisofs ffmpeg dvdauthor mencoder python
or if you are running 8.10 and above:
Code:
sudo apt-get install genisoimage ffmpeg dvdauthor mencoder python
Just make sure you enable their repositories. Oh and please post a comment.

8/12/2008: Updated required packages, thanks smoka! 18/12/2006: Added support for subtitles as requested by Rejser
Attached Files
File Type: gz program.py.tar.gz (2.4 KB, 307 views)

Last edited by netyire; December 8th, 2008 at 03:58 AM.. Reason: Updated attached file to give support for subtitles
netyire is offline   Reply With Quote
Old December 18th, 2006   #3
rejser
Ubuntu Extra Shot
 
Join Date: Apr 2005
Location: Sweden
Beans: 338
Ubuntu Breezy 5.10
Send a message via ICQ to rejser
Re: Please Comment

Great guide, how would I add subtitles to the dvd, from for example an srt file
__________________
Vrooom
rejser is offline   Reply With Quote
Old December 18th, 2006   #4
netyire
Just Give Me the Beans!
 
netyire's Avatar
 
Join Date: Dec 2006
Location: No, I'm not out... yet
My beans are hidden!
Ubuntu 9.04 Jaunty Jackalope
Send a message via ICQ to netyire Send a message via MSN to netyire
Post Re: Adding Subtitles

Howto: Add Subtitles To Your DVD

Ok, this actually just requires you to use the -sub <mysubtitle.srt> switch on pass 2 of encoding of your movie to avi. For example:

Code:
mencoder <inputfile> -sub <subtitles.srt> -ovc xvid -xvidencopts pass=2:bitrate=1000 -oac mp3lame -lameopts vbr=3 -o <outputfile>
In order to change the size add -subfont-text-scale <n> to the output, where n is a number. The smaller the number, the smaller the font. For example:

Code:
mencoder <inputfile> -sub <subtitles.srt> -subfont-text-scale 3 -ovc xvid -xvidencopts pass=2:bitrate=1000 -oac mp3lame -lameopts vbr=3 -o <outputfile>
Cheers!

Ok, I updated the script to give support for subtitles!

Last edited by netyire; December 18th, 2006 at 07:02 AM.. Reason: In accordance to the updated script
netyire is offline   Reply With Quote
Old December 19th, 2006   #5
454redhawk
Day Old Decaf
 
Join Date: Aug 2006
Location: USA
Beans: 163
Ubuntu 6.10 Edgy
Re: Mov/Divx/Xvid/Wmv/Etc to DVD (PAL or NTSC)

Quote:
Originally Posted by netyire View Post
[font="Tahoma"][size="3"][u]A Guide To:

Step 4: Create The .ISO File

Type:

mkisofs -dvd-video -v -o DVD.iso DVD

And you finally have the .iso file ready for burning!

Merry Christmas!
Where is this typed (what dir)?
Where do you input the source into that command?

What is the max size of the first input file to be converted?
What determines the final output size of the DVD and is there any control of it?
How do I know if the file is too big to fit on DVD?

Last edited by 454redhawk; December 19th, 2006 at 09:32 PM..
454redhawk is offline   Reply With Quote
Old December 20th, 2006   #6
netyire
Just Give Me the Beans!
 
netyire's Avatar
 
Join Date: Dec 2006
Location: No, I'm not out... yet
My beans are hidden!
Ubuntu 9.04 Jaunty Jackalope
Send a message via ICQ to netyire Send a message via MSN to netyire
Re: Mov/Divx/Xvid/Wmv/Etc to DVD (PAL or NTSC)

OK, firstly thanks for asking questions!

Quote:
Where is this typed (what dir)?
It is typed in the terminal, in the same directory as where you typed the commands shown in step three. (Creating the DVD file structure)

Quote:
Where do you input the source into that command?
Since the source is not clearly specified, I shall assume that you mean the directory created in step three. That is specified in the synax in this format:
Code:
 mkisofs -dvd-video -o <output iso file> <source directory>
And in this case the source directory is DVD, supposing you followed the guide exactly.

Quote:
What is the max size of the first input file to be converted?
This depends on the capacity of your DVD, please specify if it is a DVD 5 or DVD 9.

Quote:
What determines the output size of the DVD and is there any control of it
Simply put, the final output size of the DVD depends on the what file you want on the DVD. There is control over it (you can do what you want with the files...).

Quote:
How do I know if the file is too big to fit on DVD?
Hmm... perhaps it is possible to do this by multiplying the amount of seconds of playback time your media (file) has by 1000 (the bitrate of the mencoder conversion, but this may not be exact), which would give you the possible (video) file size - then add this amount to the length of audio by the bitrate you are using. Once you have the size for the final one, perhaps you can multiply it according to what ffmpeg's bitrate is for the specifications you use. Maybe this will give you what you want. But if you do find a better, more accurate method, please share it
netyire is offline   Reply With Quote
Old December 20th, 2006   #7
xyz
Chocolate-Covered Ubuntu Beans
 
xyz's Avatar
 
Join Date: Oct 2005
Location: Fribourg,Switzerland
Beans: 2,202
Re: Mov/Divx/Xvid/Wmv/Etc to DVD (PAL or NTSC)

Fantastic! Thank you...it works, it's simple; it's understandable! Thx!
__________________
my JAMENDO * The XY sex-determination system is the sex-determination system found in humans and Z was my donor! * Tarot and Poya Sutra | * # 12755
xyz is offline   Reply With Quote
Old December 21st, 2006   #8
454redhawk
Day Old Decaf
 
Join Date: Aug 2006
Location: USA
Beans: 163
Ubuntu 6.10 Edgy
Re: Mov/Divx/Xvid/Wmv/Etc to DVD (PAL or NTSC)

THANKS!




Quote:
Originally Posted by netyire View Post
OK, firstly thanks for asking questions!


It is typed in the terminal, in the same directory as where you typed the commands shown in step three. (Creating the DVD file structure)


Since the source is not clearly specified, I shall assume that you mean the directory created in step three. That is specified in the synax in this format:
Code:
 mkisofs -dvd-video -o <output iso file> <source directory>
And in this case the source directory is DVD, supposing you followed the guide exactly.


This depends on the capacity of your DVD, please specify if it is a DVD 5 or DVD 9.


Simply put, the final output size of the DVD depends on the what file you want on the DVD. There is control over it (you can do what you want with the files...).


Hmm... perhaps it is possible to do this by multiplying the amount of seconds of playback time your media (file) has by 1000 (the bitrate of the mencoder conversion, but this may not be exact), which would give you the possible (video) file size - then add this amount to the length of audio by the bitrate you are using. Once you have the size for the final one, perhaps you can multiply it according to what ffmpeg's bitrate is for the specifications you use. Maybe this will give you what you want. But if you do find a better, more accurate method, please share it
454redhawk is offline   Reply With Quote
Old December 22nd, 2006   #9
Crube
5 Cups of Ubuntu
 
Join Date: Aug 2005
Beans: 19
Re: Mov/Divx/Xvid/Wmv/Etc to DVD (PAL or NTSC)

How big is the file supposed to be. I'm trying to converts a 700mb video into an mpeg. Now ot's 1,6gigs big and 20 minutes long O.o The original file is 1.20 hours
Crube is offline   Reply With Quote
Old December 23rd, 2006   #10
gspinnada uhu
First Cup of Ubuntu
 
Join Date: Apr 2006
My beans are hidden!
Re: Mov/Divx/Xvid/Wmv/Etc to DVD (PAL or NTSC)

thanks for the guide.
i just have one problem:
step three when i am trying to create the dvd file structure i get this error message:
"WARN: unknown mpeg2 aspect ratio 1"
but not just once it fills up the whole terminal window and doesn't stop. all i can do is close the terminal.
i do not know much about formats and conversions, so i do need some help with this.
the original file was pal divx mpeg-4 version 4, 25fps, 616x488.
after step two, the mpg was ntsc, 200x150. the difference in aspect ratios is probably it.
now, could i run the ffmpeg line and specify 616x488, like you showed with the 16:9 aspect ratio? and if yes, would a dvd with that aspect ratio work allright in a ntsc dvd player with a regular ntsc tv?
gspinnada uhu is offline   Reply With Quote

Bookmarks

Thread Tools
Display Modes

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 On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 08:10 AM.


vBulletin ©2000 - 2009, Jelsoft Enterprises Ltd. Ubuntu Logo, Ubuntu and Canonical © Canonical Ltd. Tango Icons © Tango Desktop Project. bilberry