[MEncoder-users] mencoder ignoring bitrate?

jason wieland astoneded at gmail.com
Tue Apr 11 00:29:38 CEST 2006


On 4/10/06, Guillaume POIRIER <poirierg at gmail.com> wrote:
> On 4/10/06, jason wieland <astoneded at gmail.com> wrote:
> > Hello Group,
> >
> > I'm using cvs HEAD (current 4/10/2006) of mplayer/mencoder and ffmpeg.  I
> > must be doing something incorrectly.  I'm trying to encode a raw avi file
> > into a flv at about 500kbits/s
> >
> > I'm using this command:
> > mencoder -quiet -ovc lavc -lavcopts vbitrate=500 -oac mp3lame -lameopts
> > abr:br=80 -srate 22050 -of lavf -lavfopts
> > i_certify_that_my_video_stream_does_not_use_b_frames -o ./small_wmv.flv
> > ./temp/small_raw.avi
> >
> > However mencoder does not seem to respect the vbitrate=500.
> > mencoder output reports:
> > Video stream:  293.274 kbit/s  (36659 B/s)  size: 957650 bytes  26.123 secs
> > 26332 frames
> >
> >
> > Changing the vbitrate to something else, vbitrate=800 it does not change the
> > output video bitrate at all.
> > Video stream:  293.537 kbit/s  (36692 B/s)  size: 959060 bytes  26.138 secs
> > 26332 frames
>
> Looks like your source just compresses too well. Lavc doesn't add some
> padding to meet the bitrate if it doesn't reach the target bitrate,
> which seems cool with me.
>
> Guillaume


The source video has much better quality then the flv produced by
mencoder. I assumed increasing the bitrate could fix this but I can't
get anything better then a little shy of 300kbits.

So I might be taking the wrong approach.  I'm dealing with uploaded
user generated video content from a variety of formats/codecs.  I need
to transcode these incoming videos into a couple different codecs,
mainly h.264 (via x264), flv7 (via ffmpeg), vp6 (via On2 crap).

I thought the right approach would be to take the incoming videos and
transcode them to a raw format and make it as lossless as possible.  
So I do this:

mencoder -oac pcm -af resample=44100:0:1 -ovc raw -vf format=yv12 -of
avi -mc 0 -o test.avi samples/incomimg_test.wmv

(I've noticed some artifacts from yv12 on some mpg4 videos so I go
back and forth to yuy2)

>From here I transcode into my destination formats.  Since I'm dumping
all the videos to a raw uncompressed format I thought all my
transcodes would encode at my set bitrates.  But this is not the case.

When I dump Dixv avi video I can re-encode at a fairly high bitrate
without a noticeable difference in quality.  However when I dump a
wmv9dmo wmv I can only reencode at a fairly low bitrate making the
encoded video look fairly poor compared to its original source.

Is there a better raw format I should be dumping videos to?

Thanks for you time,

jason




More information about the MEncoder-users mailing list