[MPlayer-users] libavcodec vbitrate problem

Kresimir Kukulj madmax at iskon.hr
Thu May 9 15:51:14 CEST 2002


Hi

I switched from transcode to mencoder because I heard that libavcodec is
giving good results.

I don't know if this is a bug of my misinterpretation but:

I encode movies as this:
tccat -i /ext/tmp/S -T 1,1-2 -t dvd | mencoder -ovc lavc \
-lavcopts vcodec=mpeg4:vhq:vbitrate=800 -nosound \
-vop scale=704:304,crop=704:416:8:80 -o X.1-2.800b.avi -lavcopts vpass=1 -

tccat is transcode util I am found of :) Basically it will dump first two
chapters from title 1. I use this because it allows me to have DVD copied to
disk with navigational data preserved so I can skip chapters & stuff...
I think mencoder cannot do that ?

I tried vbitrate=800, 1600 and 2000. Corresponding filesizes and actual
bitrate (shown by mplayer) is:

vbitrate|actual bitrate|filesize
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
800     |719.6         |24549218
1600    |883.5         |30101746
2000    |886.0         |30185878

I confused here :) It seems to be stuck around 800kbps (default).
It's not that I am dissapointed by libavcodec quality. I has shown
extraordinary results in first pass (XviD is very blocky on fast moving
scenes). In second pass difference between lavc and XviD is less visible,
I'd say XviD is a little bit more detailed but libavcodec has no (visible)
blocky artifacts at all (nor smearing).

I tried to make a copy of a DVD (2 cd rip with AC3 sound). But files are
much undersized.
If I split the movie with chaplin[1], I get for first part 79357 frames to
encode, and for second 79868 frames. Almost equal.
Results are:
vbitrate|actual bitrate|filesize |actual nr. of frames
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1600    |988.6         |394101166|79343        | this is first pass/CD1
1600    |987.8         |393783226|79343        | this is second pass/CD1
-
1600    |1308.6        |524272990|79837        | this is first pass/CD2
not finished yet :)                            | this is second pass/CD2

As you can see, first CD has only ~ 350Mb video. It is good quality but I
would like it to populate CD more fully.
700 - 170 (for AC3) = 530 left for video. How can I increase the bitrate ?
Second CD has exactly the filesize I want, but first CD is ~150Mb short.
Both halfs have ~equal number of frames. I know that complexity of the movie
can influence filesize but I haven't (till now) experienced this big
discrepancy ? DVD is StarTrek-First Contact, so it has a lot of high action
scenes.

I also have observed that if I start encoding from a point within the movie,
bitrate is usually closer to desired value. (I used short samples for that).

Also, I could use a few tips on AC3 streams. Can mencoder encode with AC3
in .avi ? If it can, how is cutting accomplished ? That is, how can I break
AC3 soundtrack in two halfs correctly (If second CD starts with broken
frame, window$ players may not play correctly AC3 soundtrack).


More information about the MPlayer-users mailing list