[MPlayer-users] Problem Encoding Solid Color Objects With LAVC MPEG4

D Richard Felker III dalias at aerifal.cx
Tue Sep 23 01:39:47 CEST 2003

On Sat, Sep 20, 2003 at 08:41:24PM -0500, Angel wrote:
> [Automatic answer: RTFM (read DOCS, FAQ), also read DOCS/bugreports.html]
> I've reported this problem before but nothing really came of it. I more or 
> less dismissed the problem as being a limitation of mpeg4/bitrate etc. 
> However, I recently encoded the movie Bad Boys and during one of the scenes 
> there is a solid colored background behind one of the characters and it came 
> out looking like an 8 puzzle with large blocks shifting around. I decided to 
> try encoding the movie using DIVX 5.1 and virtualdub just to see how the 
> results would compare. To my extreme disappointment... the DIVX 5.1 version 
> looked 1000% better. The background looks kind of noisy (as it should) and 
> there are no large blocks moving around. Just for the hell of it... I also 
> tried encoding it using mencoder/xvid. The results were very similar to the 
> DIVX 5.1 results. I don't know if I should report this here or to the ffmpeg 
> list. I am willing to upload the source/results if that would be helpful. 
> Just for reference, here are the encoding parameters used:
> LAVC Command Line:
> mencoder stream.dump \
> -oac pcm \
> -ovc lavc \
> -lavcopts vcodec=mpeg4:vbitrate=1500:\
> vhq:keyint=300:trell:qpel:vmax_b_frames=1:mbqmin=1:\
> vqmin=1:vqmax=31:vpass=1 \
> -vf scale=650:-2,crop=640:352:4:5 \

I doubt this is the main cause of your bad quality, but odd crop
offsets in the vertical direction are NOT valid. You will misalign the
chroma plane resulting in bogus output and reducing the effectiveness
of motion estimation. BTW, it makes more sense to crop before scaling
(much faster).

Also you might try getting rid of qmin/qmax. The default qmin of 2 is
much better in most cases. I don't see where you set qmin=1 for the
DivX5 encode, so that might very well be the cause of your problem.


More information about the MPlayer-users mailing list