[MPlayer-users] info on -cbp -mv0 and -qprd

D Richard Felker III dalias at aerifal.cx
Sat Feb 28 02:16:59 CET 2004


On Fri, Feb 27, 2004 at 03:38:21PM -0600, Wayde Milas wrote:
> On Fri, 2004-02-27 at 14:41, D Richard Felker III wrote:
> 
> > > Darnit, my cut and copy skills arent good today. that line should read:
> > > mencoder dvd://1 -o blah.avi -mc 0 -noskip -skiplimit 0 -oac copy -ovc
> > > lavc -vf crop=www:xxx:y:z -lavcopts
> > > vcodec=mpeg4:vqscale=2:mbd=2:trell:vmax_b_frames=1:v4mv:autoaspect
> > 
> > What are www, xxx, y, and x? Width and height must both be multiples
> > of 16 unless you're going to scale afterwards, horizontal offset must
> > be even, and vertical offset should be even or a multiple of 4. Also,
> 
> I realize this. They are just place holders. I'm obtaining these numbers
> from cropdetect so everything is good.

No, it's not good. cropdetect just gives you the raw values where it
finds the image edges. These will not automatically be aligned.

> > the following options might improve quality:
> > 
> > mv0
> > cbp
> > cmp=2
> > subcmp=2
> > qpel
> 
> mv0 and cbp. cbp might because it looks like its an optimized version of
> trellis, but I'm not sure.. What exactly does it do?

I really don't understand cbp.

> mv0 I'm clueless on.

mv0 can only help. It just always tries encoding with (0,0) motion
vector (texture only) to see if that's better than spending bits
storing a motion vector.

> qpel adds more bits to a q=2 stream (from observation). I've heard
> reports that there is no difference in quality (I cant see any) and the
> stream is larger so....

I agree, qpel seems bad to me. I just said it might be useful.

> maybe its because i havent messed around with cmp and subcmp.

Yes, subcmp should in principle help qpel, but I don't know if it's
enough to make it useful.

> > Further, if you're not using insanely high bitrates, you should
> > probably use the denoise3d filter to remove noise and scale down to an
> > appropriate size (still multiples of 16!) so that there's less
> > information to encode. Otherwise you'll have blocking and/or ringing
> > artefacts.
> 
> As noted above, I'm using vqscale=2. I am using a very high bit rate.

Sorry, I missed that.

> I'm copying my dvd collection onto the house server to distribute to
> setup media boxes. Basicly I could get away with q=3 or 4. I can tell
> the defference between q=5 and 2 so I dont want to go with 5. Since I
> have the room, q=2 seems to be acceptable even though it does generate a
> large bit stream.

Encoding with constant-quantizer is a very bad idea unless it's q=2 or
q=1. Instead you should set qmax=4 and encode with 2pass and a proper
bitrate. This will allow many frames to come out q=2 or 3 (when it
doesn't use many more bits) and only resort to q=4 for really complex
scenes. q=2 is not expensive on simple/still scenes, and these scenes
are where having a low value of q really matters.

> > Finally, I don't see anything about 2pass encoding in your post. 1pass
> > will definitely give you very bad quality unless you use a really high
> > bitrate.
> 
> From everything I've read, 2pass encoding is not needed with a VBR (ie,
> a static q with an uncapped bit rate). Am I mistaken about this?

You're correct, 2pass will do nothing when used with vqscale. I don't
recommend doing this unless you can use vqscale=2, though.

Rich




More information about the MPlayer-users mailing list