digitalFAQ.com Forums [Archives]

digitalFAQ.com Forums [Archives] (http://www.digitalfaq.com/archives/)
-   Video Encoding and Conversion (http://www.digitalfaq.com/archives/encode/)
-   -   Mencoder: Extensive tests without vrc_minrate (http://www.digitalfaq.com/archives/encode/9068-mencoder-extensive-tests.html)

bilu 04-11-2004 05:49 AM

Extensive tests without vrc_minrate
 
Base script:

Quote:

BATCH
====
PAL: mencoder -include settings.ini -lavcopts keyint=15 movie.vob -o movie.m2v
NTSC: mencoder -include settings.ini -vf-pre softpulldown -lavcopts keyint=18 movie.vob -o movie.m2v

SETTINGS.INI
=========
of=rawvideo=1
ovc=lavc=1
nosound=1
noskip=1
vf=yuvcsp
lavcopts=vcodec=mpeg2video:vrc_buf_size=1835:preme =2:precmp=2:ildct=1:ilme=1:vstrict=-1
:autoaspect=1:vqblur=0:vrc_maxrate=9800:vqmin=1:mb qmin=1
:intra_matrix=8,9,12,22,26,27,29,34,9,10,14,26,27, 29,34,37,12,14,18,27,29,34,37,38,
22,26,27,31,36,37,38,40,26,27,29,36,39,38,40,48,27 ,29,34,37,38,40,48,58,29,34,37,38,
40,48,58,69,34,37,38,40,48,58,69,79:inter_matrix=1 6,18,20,22,24,26,28,30,18,20,22,24,
26,28,30,32,20,22,24,26,28,30,32,34,22,24,26,30,32 ,32,34,36,24,26,28,32,34,34,36,38,
26,28,30,32,34,36,38,40,28,30,32,34,36,38,42,42,30 ,32,34,36,38,40,42,44
:vbitrate=3000:vrc_eq=tex:lmin=1
Conclusions: lmin=1 is recommended, scplx_mask + naq is not worthy, lmax is really needed for high bitrate peaks, lmax seem to work better with vrc_eq=1.

Lots of screenshots from 3 different streams coming on the next posts :)

Cheers,
Bilu

bilu 04-11-2004 05:50 AM

Test 1: Dark underwater scene

Conclusion: lmin=1 is recommended. scplx_mask needs naq, but doesn't bring value.

lmin=2.49:vbitrate=3000
http://www.digitalfaq.com/archives/error.gif

lmin=1:vbitrate=1500
http://www.digitalfaq.com/archives/error.gif

lmin=1:vbitrate=1500:vmax_b_frames=2
http://www.digitalfaq.com/archives/error.gif

lmin=1:vbitrate=3000
http://www.digitalfaq.com/archives/error.gif

lmin=1:vbitrate=1500:scplx_mask=0.3:naq
http://www.digitalfaq.com/archives/error.gif

lmin=1:vbitrate=1500:scplx_mask=0.3:naq:vmax_b_fra mes=2
http://www.digitalfaq.com/archives/error.gif

lmin=1:vbitrate=1500:scplx_mask=0.3
http://www.digitalfaq.com/archives/error.gif

bilu 04-11-2004 05:51 AM

Test 2: Clean anime

Conclusion: again the same as in Test 1.

lmin=1:vbitrate=1000
http://www.digitalfaq.com/archives/error.gif

lmin=1:vbitrate=1000:vmax_b_frames=2
http://www.digitalfaq.com/archives/error.gif

lmin=1:vbitrate=1000:scplx_mask=0.3:naq
http://www.digitalfaq.com/archives/error.gif

lmin=1:vbitrate=1500
http://www.digitalfaq.com/archives/error.gif

lmin=1:vbitrate=1500:vmax_b_frames=2
http://www.digitalfaq.com/archives/error.gif

lmin=1:vbitrate=3000
http://www.digitalfaq.com/archives/error.gif

bilu 04-11-2004 05:52 AM

Test 3: High bitrate peaks

All tests done with vbitrate=3000:lmin=1.

Conclusions: lmax is REALLY needed. Can't wait to see vrc_buf_aggressivity working :!:
Lmax values can't be too low or you'll get buffer underflows.
I could get up to lmax=6 in this stream, but I wanted to see how far would the quants go :)
Best combo IMHO seem to be using lmax together with vrc_eq=1, it doesn't overquantize for so much time as with others.

lmax=31:vrc_eq=tex
http://www.digitalfaq.com/archives/error.gif

lmax=31:vrc_eq=1
http://www.digitalfaq.com/archives/error.gif

lmax=10:vrc_eq=1
http://www.digitalfaq.com/archives/error.gif

lmax=10:vrc_eq=1:vmax_b_frames=2
http://www.digitalfaq.com/archives/error.gif

lmax=10:vrc_eq=avgTex
http://www.digitalfaq.com/archives/error.gif

lmax=10:vrc_eq=tex^0.5
http://www.digitalfaq.com/archives/error.gif

lmax=10:vrc_eq=tex
http://www.digitalfaq.com/archives/error.gif

Jellygoose 04-11-2004 07:01 AM

For this last tests, did you use the exact same scene for each BV screenshot :?: 8O

This encoder behaves so much different with different settings... :roll:

bilu 04-11-2004 09:50 AM

Test 1: dark underwater scene from "The Abyss"
Test 2: scene from "Read Or Die" anime
Test 3: intro from "Neo Genesis Evangelion"

Same scene is used during each set of tests.


Bilu

Jellygoose 04-12-2004 06:41 AM

I tried your settings, but they're giving me buffer underflows the whole way down... :roll:
i'm now using the settings from the guide by rds_correia, and so far I have no buffer underruns. I hope I won't get those bitrate peaks... :roll:

Edit: I just encoded 50% of the movie and stopped the process, just to see if the average bitrate would be fine. I encoded with vbitrate=3000... after 50% BV says the average bitrate is 1620kb/sec... Is that normal? I know the ratecontrol doesn't work yet how it is supposed to be...
However bitrate peaks are already above 8000. I fear that when I increase vbitrate I'll get bitrate above 9000kb/sec... :roll:

bilu 04-12-2004 07:28 AM

Don't set vrc_minrate.
About underflows, don't limit max quantizers.

The last settintgs on rds_correia guide were my settings until vmesquita and incredible found out that vrc_minrate screws avg bitrate guidance.

I confirmed it here:
http://sourceforge.net/mailarchive/m...msg_id=6860343


Bilu

Jellygoose 04-12-2004 07:57 AM

Alright, thanks bilu... Now these are the settings I'm using currently:

Code:

of=rawvideo=1
ovc=lavc=1
nosound=1
noskip=1
vf=yuvcsp
lavcopts=vcodec=mpeg2video:vrc_buf_size=1835:preme=2:precmp=2:ildct=1:ilme=1:vstrict=-1:autoaspect=1:aspect=16/9:vqblur=0:vbitrate=3000:vrc_maxrate=9800:vrc_eq=1:vqmin=1:mbqmin=1:lmin=1:lmax=10:intra_matrix=8,9,12,22,26,27,29,34,9,10,14,26,27,29,34,37,12,14,18,27,29,34,37,38,22,26,27,31,36,37,38,40,26,27,29,36,39,38,40,48,27,29,34,37,38,40,48,58,29,34,37,38,40,48,58,69,34,37,38,40,48,58,69,79:inter_matrix=16,18,20,22,24,26,28,30,18,20,22,24,26,28,30,32,20,22,24,26,28,30,32,34,22,24,26,30,32,32,34,36,24,26,28,32,34,34,36,38,26,28,30,32,34,36,38,40,28,30,32,34,36,38,42,42,30,32,34,36,38,40,42,44

according to your recommendations. Do you think I'm on the safe side concerning buffer-underflows using lmax=10? or would you go a little higher with the value? :roll:
Output is KDVD by the way...

Edit: Oh 2 more questions... I get 1 buffer underflow at the very beginning of the movie right before mencoder starts working. is that normal? I get that with every settings I used so far.
And: Is there a way to raise DCT-Precision to 9bit?

bilu 04-12-2004 10:33 AM

Quote:

Originally Posted by Jellygoose
Do you think I'm on the safe side concerning buffer-underflows using lmax=10? or would you go a little higher with the value? :roll: Output is KDVD by the way...

It depends on the source. Right now the minimum lmax value I could achieve was 6, but was trial-and-error to get there.

Quote:

I get 1 buffer underflow at the very beginning of the movie right before mencoder starts working. is that normal? I get that with every settings I used so far.
It's normal, just to say "buffer isn't full yet". ;)

Quote:

Is there a way to raise DCT-Precision to 9bit?
I don't know, that part is pretty much undocumented :?


Bilu

bilu 04-12-2004 10:39 AM

Unexplored territory:

Quote:

ibias=<-256-256>
intra quantizer bias (256 == 1.0)
mpeg style quantizer default: 96
h263 style quantizer default: 0

NOTE: The h263 MMX quantizer cannot handle positive biases (set vfdct=1or2), the mpeg MMX quantizer cannot handle negative biases (set vfdct=1or2).

pbias=<-256-256>
inter quantizer bias (256 == 1.0)
mpeg style quantizer default: 0
h263 style quantizer default: -64

NOTE: The h263 MMX quantizer cannot handle positive biases (set vfdct=1or2), the mpeg MMX quantizer cannot handle negative biases (set vfdct=1or2).

Tip: a more positive bias (-32 - -16 instead of -64) seems to improve the PSNR
My next tests will focus on these, I hope to be able to slow the overquantizing in the Neo Genesis Evangelion stream :roll:


Bilu

digitall.doc 04-12-2004 11:10 AM

bilu,
already tested without minrate, and yes, works (as expected).
I get (in BitrateViewer) min bitrate about 190, with a vbitrate=1500 and maxrate=9800 (KDVD).
I'm afraid that with lower vbitrate and/or maxrate (for KVCD) it will go under 150 (and
with this minimum bitrate my player freezes from time to time).

bilu 04-12-2004 11:23 AM

Quote:

Originally Posted by digitall.doc
I'm afraid that with lower vbitrate and/or maxrate (for KVCD) it will go under 150 (and with this minimum bitrate my player freezes from time to time).

Then you'd better take a look at -vf noise.
Constant noise may be the answer to keep a bitrate over 150 Kbps.

Bilu

digitall.doc 04-12-2004 11:31 AM

Yes, I remember using noise in the beginings of ffvfw encodings (a looong time ago :roll: )
It could be adjusted in a way.
But I didn't like the output (maybe added too much noise).
Do you think that it would be really necessary to add noise to avoid too low bitrate?. Yes, I know
the answer: yes, if I want to avoid too low bitrate, this is a way. My question is: is it the only way?.

bilu 04-12-2004 12:21 PM

If you can't use the encoder's minrate setting then you'll have to prevent "no-motion" situations that would generate bitrates lower than 150 Kbps.

Now imagine you get a stream with a dark stalled part of a few seconds, like a room with the lights out. How can you deal with it to avoid "no-motion"? Noise. It's the only way.


Bilu

incredible 04-12-2004 02:18 PM

And the funny thing is, even if mencoder during encoding reports buffer underflows .... sometimes afterwards inspecting in BV :arrow: Everything is totally normal :?

BTW ... I did yesterday some comparisons to CCE 2.50 and there the Q curve behaves exactly as it should do in mencoder. 8O
(But CCE 2.50 does still have problems with patched matrixes ... well in my case... if std. CCE is used, everything results perfect)

Jellygoose 04-12-2004 03:43 PM

Did anyone experience some kind of a pulsing video with mencoder? :roll:
because when i look at my mencoded movies they look like they have some kind of pulsing/flashing effect. It's hard to explain, but artifacts do appear in the background in certain intervalls. It also seems like the picture gets darker and lighter... weird huh?
I'll post some samples tomorrow!

rds_correia 04-12-2004 04:19 PM

Hey J3elly,
I haven't experienced such an issue with mencoder but I must say I have seen something like that
being posted on the forum long ago and it wasn't mencoder we were testing back then.
Could it be not using B frames??
I think we need kwag or jorel to look at your post.
They'll remember for sure.
Cheers

rds_correia 04-12-2004 04:20 PM

Hmm,
Could it be a very looonng GOP size??
Just a thought.
C ya

kwag 04-12-2004 05:41 PM

Quote:

Originally Posted by Jellygoose
Did anyone experience some kind of a pulsing video with mencoder? :roll:
because when i look at my mencoded movies they look like they have some kind of pulsing/flashing effect. It's hard to explain, but artifacts do appear in the background in certain intervalls. It also seems like the picture gets darker and lighter... weird huh?
I'll post some samples tomorrow!

Yep. I've seen it and it has to do with the size of the VBV buffer.
If you are encoding at high resolutions, you must use a larger size for VBV buffer.
Look a the man page of mencoder, and search for "vrc_buf_size".

-kwag


All times are GMT -5. The time now is 05:26 AM  —  vBulletin © Jelsoft Enterprises Ltd

Site design, images and content © 2002-2024 The Digital FAQ, www.digitalFAQ.com
Forum Software by vBulletin · Copyright © 2024 Jelsoft Enterprises Ltd.