You are not logged in.

#1 2008-12-07 13:52:12

scrawler
Member
Registered: 2005-06-07
Posts: 318

converting vob to something not ugly

I just used mplayer to rip a dvd to filename.vob, then tried ffmpeg to convert it, but the quality of the resulting avi (and I tried mpeg) sucked.  so how can I convet while retaining quality?

Offline

#2 2008-12-07 14:14:15

bangkok_manouel
Member
From: indicates a starting point
Registered: 2005-02-07
Posts: 1,556

Re: converting vob to something not ugly

there are some nice tools to do these kind of tasks. easy to use, easy to preview the result and yet quite powerful.
http://www.archlinux.org/packages/extra/i686/dvdrip/
should you want to go cli only, mplayer website is full of valuable info.

Offline

#3 2008-12-07 15:02:41

Daenyth
Forum Fellow
From: Boston, MA
Registered: 2008-02-24
Posts: 1,244

Re: converting vob to something not ugly

The "self-made CLI tools" thread has some stuff on this recently.

Offline

#4 2008-12-07 16:08:23

skottish
Forum Fellow
From: Here
Registered: 2006-06-16
Posts: 7,942

Re: converting vob to something not ugly

scrawler wrote:

I just used mplayer to rip a dvd to filename.vob, then tried ffmpeg to convert it, but the quality of the resulting avi (and I tried mpeg) sucked.  so how can I convet while retaining quality?

FFmpeg can generate as low or as high quality as you want. What was the command line that you used? And out of curiosity, why did you try avi at first?

Offline

#5 2008-12-07 18:54:06

scrawler
Member
Registered: 2005-06-07
Posts: 318

Re: converting vob to something not ugly

ffmpeg -i ttowers.vob -f mpeg -vcodec mpeg4 two-towers.mpeg

I tried avi just because that's what the example in the ffmpeg man page used.

I'm installing dvdrip now to see what that looks like.

what arguments do you supply to ffmpeg?

Offline

#6 2008-12-07 19:32:21

skottish
Forum Fellow
From: Here
Registered: 2006-06-16
Posts: 7,942

Re: converting vob to something not ugly

The quality is bad because you didn't specify a bitrate. The file format switch is unnecessary (-f), and the audio is probably being transcoded to mpeg2.

For starters, try something like this. Raise the bitrate if you want higher quality (3000k instead of 2000k for instance):

ffmpeg -i <your_input_file> -b 2000k -vcodec mpeg4 -acodec copy <your_output_file>.mp4

I'm not sure how well ac3 audio works in mp4 containers, but I believe that it is part of the mpeg4 standard.

If you want high quality video, I'd recommend using x264 as your encoder instead of FFmpeg's internal mpeg4. It can get a little complicated depending on how compressed you want the stream.

--EDIT--

I forgot to add, if you're somewhere like the US that uses NTSC, deinterlace the input by putting -deinterlace before the '-i' command.

Last edited by skottish (2008-12-08 03:40:17)

Offline

#7 2008-12-08 01:57:15

DrZaius
Member
Registered: 2008-01-02
Posts: 193

Re: converting vob to something not ugly

I recommend using ffmpeg-svn and x264-git from AUR.  Development is active in both, but most importantly, recent versions of ffmpeg have libx264 presets which create excellent results.  Once you install ffmpeg you will need to copy the presets from ffmpeg/ffpresets to the .ffmpeg directory in your home folder.

Now you can use the presets.  This is a two-pass example using the fastfirstpass and hq presets:

ffmpeg -y -i input.avi -pass 1 -vcodec libx264 -vpre fastfirstpass -b 512k -bt 512k -threads 0 -f mp4 -an /dev/null && ffmpeg -i input.avi -pass 2 -acodec libfaac -ab 128k -ac 2 -vcodec libx264 -vpre hq -b 512k -bt 512k -threads 0 -f mp4 output.mp4

You will have to add bf=16 to ~/.ffmpeg/libx264-fastfirstpass.ffpreset when used with the normal, max, and hq presets. See FFmpeg libx264 presets for more preset descriptions and usage.

(most of this I just copied from my ffmpeg tutorial)

Last edited by DrZaius (2008-12-08 02:09:58)

Offline

#8 2008-12-08 02:12:15

skottish
Forum Fellow
From: Here
Registered: 2006-06-16
Posts: 7,942

Re: converting vob to something not ugly

DrZaius (and everyone else),

If you don't care about exact bitrate, it's far faster to use one pass crf. You'll achieve just as good results without the extra time. This actually is the recommended method.

Also, faac from the repos doesn't produce mpeg4 audio. After many months of being in the Arch bug tracker, it looks like someone may fix it (the patches are there). It's currently producing either mpeg2 audio, or raw aac.

Offline

#9 2008-12-08 02:21:43

DrZaius
Member
Registered: 2008-01-02
Posts: 193

Re: converting vob to something not ugly

skottish wrote:

DrZaius (and everyone else),

If you don't care about exact bitrate, it's far faster to use one pass crf. You'll achieve just as good results without the extra time. This actually is the recommended method.
...

Where does it say that CRF is the recommended method?  Is it recommended by the x264 developers?  I'm not doubting you, just wondering.

Offline

#10 2008-12-08 02:27:11

skottish
Forum Fellow
From: Here
Registered: 2006-06-16
Posts: 7,942

Re: converting vob to something not ugly

DrZaius wrote:
skottish wrote:

DrZaius (and everyone else),

If you don't care about exact bitrate, it's far faster to use one pass crf. You'll achieve just as good results without the extra time. This actually is the recommended method.
...

Where does it say that CRF is the recommended method?  Is it recommended by the x264 developers?  I'm not doubting you, just wondering.

It was from a dialog that I had with Dark Shikari (x264 and FFmpeg dev) and Lord Mulder (doom9 moderator) at http://forum.doom9.org/. I tried to find the thread, but I'm having a hard time getting doom9 to come up right now.

--EDIT--

The first time that I heard that was from akupenguin (x264 lead developer) also at doom9.

--EDIT 2--

Oh yeah, Robert Swain brings it up in this post:

http://rob.opendot.cl/index.php/useful- … ing-guide/

Last edited by skottish (2008-12-08 02:37:56)

Offline

Board footer

Powered by FluxBB