Ryanhafer.info thumb

High Quality FLV encoding from DVD

10/28/09

Tonight, I was faced with the task of cutting high quality .flv video clips from a DVD. The best method I have found so far involves, the oh so powerful FFMPEG application. I run a Windows OS on my workstation so this was the first obstacle in my path.

I was eventually able to find the windows binary distribution at the following the link:

http://sourceforge.net/projects/mplayer-win32/files/FFmpeg/

I unpacked the program to a folder I created: C:\ffmpeg\.

Next, copy the *.VOB from the DVD disc to your hard drive. Open up a windows explorer and right click on your dvd drive, mine was D: drive, then click on the option to explore. Navigate to the TS_VIDEO directory; this is where you will find the .VOB files. You can just copy and paste these files in a directory of your choosing.

To leverage the full feature set of ffmpeg, you must use the command line. So start a command prompt, and change to the directory of ffmpeg. In my example that would be the following command: “cd C:\ffmpeg”.

Through much effort, I came to using the following commands. Each one seems to vary a little bit. So you will have to find out what quality you are looking for and potentially, what your server can stream to viewers.

ffmpeg.exe -i [INPUT FILE] -ss [START POSITION IN SECONDS] -t [DURATION OF CLIP IN SECONDS] -ab 48k -ar 44100 -vcodec flv -b 400k -g 160 -cmp 3 -subcmp 3 -mbd 2 -y [OUTPUT FILE]

ffmpeg.exe -i [INPUT FILE] -ss [START POSITION IN SECONDS] -t [DURATION OF CLIP IN SECONDS] -ar 22050 -ab 56 -r 25 -f flv -b 400 [OUTPUT FILE]

ffmpeg.exe -i [INPUT FILE]-ab 48k -ss [START POSITION IN SECONDS] -t [DURATION OF CLIP IN SECONDS] -ac 2 -ar 44100 -f flv -deinterlace -nr 500 -s 640x420 -r 30 -b 270k -me_range 25 -i_qfactor 0.9 -qmin 8 -qmax 8 -g 500 [OUTPUT FILE]

Example replacements:

[INPUT FILE] = C:\ffmpeg\in\VTS_01_2.VOB

[START POSITION IN SECONDS] = 729

[DURATION OF CLIP IN SECONDS] = 51

[OUTPUT FILE] = C:\ffmpeg\out\output.flv

I also wanted to pull an image thumbnail from the videos, Here's a quick and simple command line that I used:

ffmpeg.exe -i [INPUT FILE] -y -f image2 -ss [CAPTURE POSITION IN SECONDS] -sameq -t 0.001 -s 320*240 [OUTPUT FILE – ie: screenshot2.jpg]

The end result can be seen at http://www.shaepeppler.com

UPDATE:

Handbrake is an excellent tool for ripping DVD to various more common video formats like mp4, avi, etc.

http://handbrake.fr/

Read Comments

Post A Comment

 
Switch themes | © 2017 RyanHafer.info. All Rights Reserved
xhtml validated css validated