[MPlayer-users] [BUG] Mencoder crash with vb_strategy=2

Corey Hickey bugfood-ml at fatooh.org
Tue Sep 26 03:20:36 CEST 2006


Firon Draak wrote:
> I was transcoding an XviD file to an MPEG-1 video and if I use
> vb_strategy=2, it crashes with
> 
> The instruction at "0x0084d8a0" referenced memory at "0x00000002". The
> memory could not be "read".
> 
> 
> The console doesn't offer any information, it happens immediately after
> printing
> Pos:   0.0s      4f ( 0%)  0.00fps Trem:   0min   0mb  A-V:0.011 [0:0]
> 
> It manages to writes a few KB to the target file before crashing.
> 
> I've tried with various sourcefiles, and with and without sound encoding. I
> tried with my own compile (using cpu runtime detection) and with the athlon
> and P3 builds obtained from http://oss.netfarm.it/mplayer-win32.php. I'm
> encoding on Windows 2003 Server with an Athlon XP (if that's relevant).
> 
> The command I originally tried was:
> mencoder "myvideo.avi" -o "target.m1v" -noskip -ovc lavc -lavcopts

This isn't relevant to the bug you found, but bear in mind that mencoder 
will output to an AVI file regardless of what you name it, so you'll get 
an AVI file called target.m1v. If you want to make a different 
container, use the '-of <format>' option.

I've never seen a video called .m1v in the wild, but according to a 
quick bit of googling it's a QuickTime mov file. In that case you would 
have to use '-of lavf -lavfopts format=mov'; however, mencoder and '-of 
lavf' doesn't handle B-frames correctly, so you're out of luck if you 
want that; using ffmpeg directly might work.

Still, as I said before, that's not relevant to your bug.

> vcodec=mpeg1video:vrc
> _buf_size=327:vrc_maxrate=1536:vbitrate=1024:mbd=2:trell:cbp:mv0:dia=4:predia=4:preme=2:last_pred=4:vmax_b_frames=2:vb_strategy=2:cmp=6:subcmp=6:precmp=6 
> 
> 
> I tried simplifying it to make sure the other options weren't causing it:
> mencoder "myvideo.avi" -o "target.m1v" -noskip -ovc lavc -lavcopts
> vcodec=mpeg1video:vrc
> _buf_size=327:vrc_maxrate=1536:vbitrate=1024:vmax_b_frames=2:vb_strategy=2

Thanks for the reduced command--it's helpful. In this case, you can go a 
bit further:

mencoder myvideo.avi -o output.avi -ovc lavc -lavcopts 
vcodec=mpeg1video:vmax_b_frames=1:vb_strategy=2

It appears the fatal combination is mpeg1video, b-frames, and 
vb_strategy=2. That's not too surprising; I don't think anybody ever 
tested vb_strategy=2 with any codec other than mpeg4.

Normally, I would tell you to follow the bugreporting procedures and 
send a bugreport and a backtrace to ffmpeg-devel, but since it appears 
you are using Windows I suspect that would be very difficult for you 
(setting up a decent development environment is much harder than it is 
on Linux). So, I went ahead and reported it myself:

http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/2006-September/045652.html

You can mail me a root beer sometime for my effort. ;)

Meanwhile, try using vb_strategy=1:b_sensitivity=10 ; see here for the 
rationale:

http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/2006-May/011523.html

Also, don't forget to use 2-pass encoding. The effects of the various 
B-frame strategies only effect the second pass.

-Corey



More information about the MPlayer-users mailing list