All the steps below are valid for any Linux, not just Debian and Ubuntu. Simply use your distro’s package manager (YaST, Yum, Rpm, etc.) to install the necessary packages. Creating a flash video from a DVD will allow you to post it on Youtube or on your website.

1. Make sure that you have mencoder installed. Mencoder is Mplayer’s movie encoder and it can convert multiple video and audio formats.

If you have not yet installed it, do it now:

sudo apt-get install mencoder

This will install 4 packages: libfaac0 libmp3lame0 libx264-65 libxvidcore4 mencoder.

2. Run the command to convert the DVD file to FLV. This is a sample command, you will have to change the paths to the input and output files if necessary. In this case the input file is: /media/cdrom0/VIDEO_TS/VTS_01_1.VOB and the output file is video.flv, which is specified after the “-o” option:


mencoder /media/cdrom0/VIDEO_TS/VTS_01_1.VOB -o video.flv -of lavf -ovc lavc -oac mp3lame -lavcopts vcodec=flv:vbitrate=500:autoaspect:mbd=2:mv0:trell:v4mv:cbp:last_pred=3:predia=2:dia=2:precmp=2:cmp=2:subcmp=2:preme=2:turbo:acodec=mp3:abitrate=56 -vf scale=320:240 -srate 22050 -af lavcresample=22050

As you can see, mencoder has a lot of options and you can control just about everything. Check out the man pages for mencoder for more information.

Create Flash video from DVD (DVD to FLV) with Ubuntu

6 thoughts on “Create Flash video from DVD (DVD to FLV) with Ubuntu

  • November 18, 2009 at 4:58 pm
    Permalink

    It helped me alot, I was looking for a script, I found it with you, right away, thanks for share it

  • December 1, 2009 at 11:40 am
    Permalink

    Hey, thanks for the command
    I used it and managed to create a .flv from a .vob, however the .flv doesnt preserve the aspect ratio (the original.vob is 16:9). I tried to skip the part -vf scale=320:240 , and also tried aspect=16/9 but the output.flv is always stretched vertically … (?)
    I’d really appreciate any hint on how to preserve the original aspect ratio
    Thanks
    V.

  • December 1, 2009 at 1:54 pm
    Permalink

    @ Vital,

    If you want the flv file to have a 16:9 aspect ratio, you need to change the “scale=320:240” part. A valid scale in this case would be 640 x 360 or
    960 x 540 or 1280 x 720, etc. The key here is to preserve the ratio, so 16 divided by 9 is 1.777777778. You get the same result when dividing 640 by 360 and 960 by 540 and so on. You get the idea…

    So here is the command for you (I am using the 640 by 360 scale here but you can substitute it with any two numbers as long as the devision between the two yields a result of 1.777777778):

    mencoder /media/cdrom0/VIDEO_TS/VTS_01_1.VOB -o video.flv -of lavf -ovc lavc -oac mp3lame -lavcopts vcodec=flv:vbitrate=500:autoaspect:mbd=2:mv0:trell:v4mv:cbp:last_pred=3:predia=2:dia=2:precmp=2:cmp=2:subcmp=2:preme=2:turbo:acodec=mp3:abitrate=56 -vf scale=640:360 -srate 22050 -af lavcresample=22050

  • December 2, 2009 at 4:53 am
    Permalink

    Cheers Mate!
    Worked out just fine!
    V.

  • Pingback:Ubuntu Linux | Jeeradate's Blog

Leave a Reply

Your email address will not be published. Required fields are marked *

*