Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Desktop
User Name
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.


  Search this Thread
Old 01-11-2007, 02:19 PM   #1
Registered: Sep 2004
Location: Melbourne, Victoria Australia
Distribution: Support those that support you :)
Posts: 872
Blog Entries: 12

Rep: Reputation: 30
Converting DVD to x264 w/ Mencoder out of sync?

i'm trying to backup my dvd to x264 with ac3 sound however sound become out of sync by 5 seconds

Is the a better way?

#here i export to the ac3 sound
mplayer k9-1.vob -aid 129 -dumpaudio -dumpfile k9-1.vob.ac3

#my first encoding pass
mencoder -v\
        -vf pullup,softskip,crop=720:448:0:16\
        -ovc x264 -x264encopts subq=4:bframes=3:b_pyramid:weight_b:turbo=1:pass=1:psnr:bitrate=1200\
        -of rawvideo\
        -o k9-1.vob.264

#my second encoding pass
mencoder -v\
        -vf pullup,softskip,crop=720:448:0:16\
        -ovc x264 -x264encopts subq=4:bframes=3:b_pyramid:weight_b:turbo=1:pass=2:psnr:bitrate=1200\
        -of rawvideo\
        -o k9-1.vob.264

#the MP4 container doesnt support ac3 so just the video is added to an MP4 video container below
MP4Box -add k9-1.vob.264 k9-1.vob.264.mp4

#Matroska supports Mp4 video and x264 in the same file 
#below is where i create the final Audio Video file.
mkvmerge -o k9-1.vob.264.mp4.mkv k9-1.vob.264.mp4 k9-1.vob.ac3
Old 01-12-2007, 07:04 AM   #2
Senior Member
Registered: Apr 2004
Location: Potchefstroom, South Africa
Distribution: Fedora 17 - 3.3.4-5.fc17.x86_64
Posts: 1,540

Rep: Reputation: 101Reputation: 101
Hmm - I don't know what is causing your problem, but if you are willing to try MP3 encoding, try this commandline with MEncoder to rip the DVD and see if the resulting file has better audio performance (this is a single pass type setup, and requires LAME):

mencoder dvd://1 -alang en -o output.avi -oac mp3lame -lameopts vol=8 -ovc lavc -ffourcc DX50 -lavcopts vcodec=mpeg4:aspect=1.78/1:vbitrate=1800:vrc_eq=tex:naq:ilme:trell:cbpreme=2:subq=8:keyint=132:mbd=1:qns=3:vme=4:dia=3 -noskip

If you find that the resulting file is too "loud" make -lameopts vol=8 something less (like -lameopts vol=6) or if it is too "soft" make vol = 8 something even higher.

I'm willing to bet the above has a good change of solving your audio problem. I've never used two pass ripping or splitting off of the audio track - why exactly do you want to do it that way?


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

Similar Threads
Thread Thread Starter Forum Replies Last Post
A/V out-of-sync while convert a rmvb to flv using mencoder tclwp Linux - Software 0 08-08-2006 09:29 AM
Converting mpeg4 to mpeg1 using mencoder not working slothpuck Linux - Software 4 10-25-2005 02:24 PM
mencoder mpegopts "not an option" format=dvd (converting avi to dvdauthor compliant) Emmanuel_uk Linux - Newbie 1 09-16-2005 01:52 PM
mencoder problem converting *.jpg to .avi whistl Linux - Software 9 06-29-2005 01:32 PM
trouble with mencoder converting wma to mp3 TheOneAndOnlySM Linux - Software 0 11-01-2004 09:26 PM > Forums > Linux Forums > Linux - Desktop

All times are GMT -5. The time now is 10:55 AM.

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