[MPlayer-users] Quality suffering with lavc

D Richard Felker III dalias at aerifal.cx
Sun May 11 01:48:52 CEST 2003


On Sat, May 10, 2003 at 11:28:34AM +0200, Nico wrote:
> [Automatic answer: RTFM (read DOCS, FAQ), also read DOCS/bugreports.html]
> Hi,
> 
> I've been struggling with libavcodec for a lot of time; now it's time to 
> ask the opinion of an expert, possibly Michael's.
> 
> Note: the problem I have persists even when using mpeg4 as codec.
> I use the following script to encode to mpeg1 and I usually run it with 
> bitrate 1150 (quite generous) and with pp=lb.

First of all, you need to explain what you're encoding and show the
output. pp=lb suggests maybe it's interlaced, in which case there are
lots of considerations... Or did you just add that at random?

Also including mencoder's output would be helpful!!

> #!/bin/bash
> 
> INFILE=$1
> BITRATE=$2
> OUTFILE=$3
> EXTRA=$4
> SUBS=$5
> 
> shift 5
> 
> mencoder -nosound -ovc lavc -lavcopts 
> vpass=1:vcodec=mpeg1video:vhq=1:vbitrate=$BITRATE:keyint=16:vrc_maxrate=
> 9500:vqblur=0.0:vlelim=-4:vcelim=-9:dark_mask=0.0:naq:vqcomp=0.7:vqmax=7:mbqmax=12:vqdiff=2:cmp=0:subcmp=0:mbc
> mp=0:trell -of mpeg -sws 2 -vop $EXTRA $INFILE -ofps 25  -o $OUTFILE
> 
> mencoder -nosound -ovc lavc -lavcopts 
> vpass=2:vcodec=mpeg1video:vhq=1:vbitrate=$BITRATE:keyint=16:vrc_maxrate=
> 9500:vqblur=0.0:vlelim=-4:vcelim=-9:dark_mask=0.0:naq:vqcomp=0.7:vqmax=7:mbqmax=12:vqdiff=2:cmp=0:subcmp=0:mbc
> mp=0:trell -of mpeg -sws 2 -vop $EXTRA $INFILE -ofps 25  -o $OUTFILE.2
> 
> (Same effect when using different *cmp and vlelim=-2:vcelim=-5)
> 
> The result is usually impressive, but dark scenese are always very ugly, 
> because dark/black area are always greyish and full of blocks.
> I uploaded this file to mphq to show the problem:
> ftp://ftp.mplayerhq.hu/MPlayer/incoming/BlockyBlack/harry.mpg

Don't use options you don't understand!!! vqblur=0 is certainly
nonsense! Also, it's very possible some of these options don't work
with mpeg1 video encoding! Why not try with just:

-lavcopts vcodec=mpeg1video:vhq:vbitrate=$BITRATE:keyint=16:vrc_maxrate=9500

and see if the problem goes away. Also keep in mind that 16 is
insanely low for a keyframe interval, so it will be hard to get good
quality without VERY high bitrate. And mpeg1 is bad compression to
begin with...

Rich



More information about the MPlayer-users mailing list