[Mplayer-advusers] [BUG?] MEncoder/lavc assertion failed in ratecontrol.c:587

Corey Hickey bugfood-ml at fatooh.org
Sat Dec 6 03:52:16 CET 2003


Dominik 'Rathann' Mierzejewski wrote:
> Hello.
> I'm trying to encode the 2001: A Space Odyssey DVD to mpeg4 using lavc
> on to 2 CDs, preserving original audio stream.
> Unfortunately, mencoder seems to be unable to complete the second pass,
> the assertion
> libavcodec/ratecontrol.c:587:
> [...]
>     if(s->flags&CODEC_FLAG_PASS2){
>         assert(picture_number>=0);
>         assert(picture_number<rcc->num_entries);
>         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>         rce= &rcc->entry[picture_number];
>         wanted_bits= rce->expected_bits;
>     }else{
>         rce= &local_rce;
>         wanted_bits= (uint64_t)(s->bit_rate*(double)picture_number/fps);
>     }
> [...]
> always fails on the last frame.
> Even stranger, this happens only if I encode chapters 1-16 or 1-17. If
> I encode only chapter 16 or 17, all is fine.
> 
> I've tried MEncoder-CVS 2003/11/30 and 2003/12/02 (with the same
> libavcodec versions), both exhibit the same behaviour
> 

That sounds somewhat like a problem I reported a long time ago:

http://www.mplayerhq.hu/pipermail/mplayer-dev-eng/2003-August/020145.html

The problem you found differs from mine in two ways:
1. Originally, encoding would crash without b-frames, and corrupt the
2pass log when b-frames are enabled.
2. I could reproduce mine by encoding only the end.

I eventually pestered Michael Niedermayer with a personal email, and he
fixed the problem such that I haven't seen it appear since, but perhaps
yours is related.

Is there any way you can narrow down the options you use until you can
blame it on one particular lavcopt ? I know it takes forever...

If you get Michael's attention, he'll probably fix it.

-Corey



More information about the MPlayer-advusers mailing list