INDEX  F.A.Q.  SEARCH  LATEST POSTS     Rules  Register  Profile  Private messages  Login


Login:   Username:  Password:   Log me on automatically    
Register I forgot my password I forgot my username Resend the activation key

Huge AVI file after mencoder encoding

Forum Index -> Video -> DVD Ripping Printer-friendly version
Reply to topic
Author Message
nickman00
Member


Joined: 02 Jun 2009
Location: Czech Republic

Post Posted: Jun 02, 2009 12:47 Posts Comp View users profile Send private message Reply with quote

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. wink.gif

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... smile.gif ), 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


disturbed1
Member


Joined: 22 Apr 2001
Location: init 4

Post Posted: Jun 02, 2009 13:55 Posts Comp View users profile Send private message Reply with quote

Change the bitrate. You are passing -700000 for a target size which doesn't work all that well sad.gif. 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 smile.gif

--------------- 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/VideoHelp_Bitrate_calculator#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.


nickman00
Member


Joined: 02 Jun 2009
Location: Czech Republic

Post Posted: Jun 02, 2009 16:24 Posts Comp View users profile Send private message Reply with quote

Disturbed, thanks for the advice, I'm trying it now. smile.gif

nickman00
Member


Joined: 02 Jun 2009
Location: Czech Republic

Post Posted: Jun 02, 2009 18:57 Posts Comp View users profile Send private message Reply with quote

About the DivXEnc, it seems a really promising one, however it's something I already have. smile.gif 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.


Reply to topic All times are GMT - 6 Hours
Forum Index -> Video -> DVD Ripping Page 1 of 1





You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



Jump to:  
Display:   
VSO Software ConvertXtoDVD lets you convert any video like AVI,MKV to DVD easily. More info or download trial!
About   Advertise   Forum Archive   RSS Feeds   Statistics