VideoHelp.com Forum
+ Reply to Thread
Results 1 to 4 of 4
Thread
  1. Member
    Join Date: Jun 2009
    Location: Czech Republic
    Dear All,

    I'd like to ask your help, because I'm a bit stucked with mencoder conversion.

    Previously I used a 3-pass conversion - similar with the below configuration - and however somehow the results weren't around 700MByte, but still between 800-1000Mbyte. The conversion finished in approx 4 hours nicely.

    I reviewed my code to change to 2-pass (since 3-pass is obsolete in mencoder), and at this moment I use:

    Code:
    mencoder example.vob -aid 128 -oac copy -ovc xvid -xvidencopts bitrate=-700000:pass=1 -vf pp=de,crop=X:X:X:X -passlogfile divx2pass.log -o "/dev/null"
    mencoder example.vob -aid 128 -oac mp3lame -lameopts abr:br=128:aq=3:mode=1 -ovc xvid -xvidencopts bitrate=-700000:pass=2 -vf pp=de,crop=X:X:X:X -o "result.avi"
    With the above the encoding time takes 5:30 hours and the bigger problem is that the AVI file becomes huge.

    For example:
    VIDEO: MPEG2 720x576 (aspect 2) 25.000 fps 7500.0 kbps (937.5 kbyte/s)
    AUDIO: 48000 Hz, 2 ch, s16le, 192.0 kbit/12.50% (ratio: 24000->192000)
    Length: 74 minutes
    This above black-white movie in VOB is originally 3.9GByte, the AVI is 2.7GByte.

    An another video
    VIDEO: MPEG2 720x576 (aspect 2) 25.000 fps 9500.0 kbps (1187.5 kbyte/s)
    AUDIO: 48000 Hz, 2 ch, s16le, 192.0 kbit/12.50% (ratio: 24000->192000)
    Length: 110 minutes
    This above black-white movie in VOB is originally 4.1GByte, the AVI is 5.5GByte.

    I'm pretty sure that something is wrong with the above encoding settings - and neither with the videos nor my system - because the 3-pass encoding works smoothly with more realistic AVI sizes (like said above, less than 1GByte, around 800-900MByte).
    The only thing I changed from 3pass to 2pass is adding aq=3:mode=1 to the mp3 conversion...but I'm skeptic that this causes the extra gigs.

    I use Debian/squeeze and the stable packages (mplayer, mencoder, etc) from Debian Multimedia site.

    In general I'd like to make only an AVI backup of my DVDs (I have them at home, while travelling I watch the movies from the AVIs): so an outstanding AVI quality is not expected only a decent one. The output should be around the 700MByte limit (my next question will be why the bitrate=-700000 doesn't work... ), the conversion time doesn't matter too much as I do it overnight.
    But I don't stick to this size, the 1GByte approx size is fine + x264 encoding tips are welcomed.

    Any help is really appreciated.

    thanks,
    nm
    Quote Quote  

  2. Get Slack disturbed1's Avatar
    Join Date: Apr 2001
    Location: init 4
    Change the bitrate. You are passing -700000 for a target size which doesn't work all that well . Pass a bitrate if you are attempting to achieve a certain size. Use constant quant if you are looking for a certain quality. fixed_quant=2 yields great results, the higher the quant number the lower the bitrate, and the smaller the file size, no reason to do a 2 pass encode with fixed_quant either

    --------------- edit -------------

    Just tried it again, been a year or so since I attempted to hit a target size with mencoder.
    Code:
    mencoder dvd://1 -o /dev/null -dvd-device /mnt/tmp/Movie -ofps 24000/1001 -vf scale=624:-11 -sws 10 -aid 128 -oac copy -ovc xvid -xvidencopts pass=1:turbo
    
    mencoder dvd://1 -o /nfs/frontend3/movie.avi -dvd-device /mnt/tmp/Movie -ofps 24000/1001 -vf scale=624:-11 -sws 10 -aid 128 -oac copy -ovc xvid -xvidencopts \
    pass=2:bitrate=-700000:me_quality=6:vhq=4:threads=6:max_key_interval=300:max_bframes=2:bvhq=1:nopacked:noqpel:nogmc:\
    trellis:quant_type=mpeg:nointerlacing:chroma_me:chroma_opt:hq_ac:profile=dxnhtntsc:lumi_mask:nocartoon:closed_gop:autoaspect
    Hit the same size as using fixed_quant=2

    Use a bitrate calculator to find the bitrate needed for your size.
    http://www.videohelp.com/tools/Video...lator#comments

    Since your profile says Debian, you might like one of these programs for xvid, lavc, and h264 encoding http://divxenc.sourceforge.net/
    Linux _is_ user-friendly. It is not ignorant-friendly and idiot-friendly.
    Quote Quote  

  3. Member
    Join Date: Jun 2009
    Location: Czech Republic
    Disturbed, thanks for the advice, I'm trying it now.
    Quote Quote  

  4. Member
    Join Date: Jun 2009
    Location: Czech Republic
    About the DivXEnc, it seems a really promising one, however it's something I already have. I wrote my own program for the conversion; well it's simple yet exactly does all things what I need from put the DVD into the reader until the AVI creation, and many more.

    Only the conversion settings are troublesome, but so far I haven't really prepared the prog for it. It reads all the data nicely from VOBs/DVDs, just the encoding part is somewhat static (as you see in the example).

    I dig up other things - I have a bitrate calculator - so I implement it to the prog; so each movie can be processed individually.
    Quote Quote  




Similar Threads

  1. Trying to Fix a Huge Corrupt .avi File!
    By LPrime in forum Software Playing
    Replies: 33
    Last Post: 17th Apr 2012, 05:01
  2. I need to edit a huge .avi file
    By Hobittual in forum Editing
    Replies: 2
    Last Post: 25th May 2010, 15:40
  3. clip edited from avi-file is huge
    By kjk in forum Editing
    Replies: 2
    Last Post: 14th Jan 2009, 12:45
  4. Huge file after WMV to AVI conversion
    By windranger in forum Newbie / General discussions
    Replies: 8
    Last Post: 8th Apr 2008, 07:32
  5. 2 Small-ish AVI -> 1 Larger AVI = HUGE File. Why?
    By cxp36 in forum Newbie / General discussions
    Replies: 2
    Last Post: 6th Mar 2008, 17:31
Search   Contact us   About   Advertise   Forum   RSS Feeds   Statistics   Tools