Quantcast Mencoder: Extensive Tests Without Vrc_Minrate - digitalFAQ.com Forums [Archives]
  #1  
04-11-2004, 05:49 AM
bilu bilu is offline
Free Member
 
Join Date: Jan 2004
Posts: 341
Thanks: 0
Thanked 0 Times in 0 Posts
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=1835reme =2recmp=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
Reply With Quote
Someday, 12:01 PM
admin's Avatar
Site Staff / Ad Manager
 
Join Date: Dec 2002
Posts: 42
Thanks: ∞
Thanked 42 Times in 42 Posts
  #2  
04-11-2004, 05:50 AM
bilu bilu is offline
Free Member
 
Join Date: Jan 2004
Posts: 341
Thanks: 0
Thanked 0 Times in 0 Posts
Test 1: Dark underwater scene

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

lmin=2.49:vbitrate=3000


lmin=1:vbitrate=1500


lmin=1:vbitrate=1500:vmax_b_frames=2


lmin=1:vbitrate=3000


lmin=1:vbitrate=1500:scplx_mask=0.3:naq


lmin=1:vbitrate=1500:scplx_mask=0.3:naq:vmax_b_fra mes=2


lmin=1:vbitrate=1500:scplx_mask=0.3
Reply With Quote
  #3  
04-11-2004, 05:51 AM
bilu bilu is offline
Free Member
 
Join Date: Jan 2004
Posts: 341
Thanks: 0
Thanked 0 Times in 0 Posts
Test 2: Clean anime

Conclusion: again the same as in Test 1.

lmin=1:vbitrate=1000


lmin=1:vbitrate=1000:vmax_b_frames=2


lmin=1:vbitrate=1000:scplx_mask=0.3:naq


lmin=1:vbitrate=1500


lmin=1:vbitrate=1500:vmax_b_frames=2


lmin=1:vbitrate=3000
Reply With Quote
  #4  
04-11-2004, 05:52 AM
bilu bilu is offline
Free Member
 
Join Date: Jan 2004
Posts: 341
Thanks: 0
Thanked 0 Times in 0 Posts
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


lmax=31:vrc_eq=1


lmax=10:vrc_eq=1


lmax=10:vrc_eq=1:vmax_b_frames=2


lmax=10:vrc_eq=avgTex


lmax=10:vrc_eq=tex^0.5


lmax=10:vrc_eq=tex
Reply With Quote
  #5  
04-11-2004, 07:01 AM
Jellygoose Jellygoose is offline
Free Member
 
Join Date: Jun 2002
Location: Germany
Posts: 1,288
Thanks: 0
Thanked 0 Times in 0 Posts
For this last tests, did you use the exact same scene for each BV screenshot

This encoder behaves so much different with different settings...
__________________
j3llyG0053
Reply With Quote
  #6  
04-11-2004, 09:50 AM
bilu bilu is offline
Free Member
 
Join Date: Jan 2004
Posts: 341
Thanks: 0
Thanked 0 Times in 0 Posts
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
Reply With Quote
  #7  
04-12-2004, 06:41 AM
Jellygoose Jellygoose is offline
Free Member
 
Join Date: Jun 2002
Location: Germany
Posts: 1,288
Thanks: 0
Thanked 0 Times in 0 Posts
I tried your settings, but they're giving me buffer underflows the whole way down...
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...

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...
__________________
j3llyG0053
Reply With Quote
  #8  
04-12-2004, 07:28 AM
bilu bilu is offline
Free Member
 
Join Date: Jan 2004
Posts: 341
Thanks: 0
Thanked 0 Times in 0 Posts
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
Reply With Quote
  #9  
04-12-2004, 07:57 AM
Jellygoose Jellygoose is offline
Free Member
 
Join Date: Jun 2002
Location: Germany
Posts: 1,288
Thanks: 0
Thanked 0 Times in 0 Posts
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?
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?
__________________
j3llyG0053
Reply With Quote
  #10  
04-12-2004, 10:33 AM
bilu bilu is offline
Free Member
 
Join Date: Jan 2004
Posts: 341
Thanks: 0
Thanked 0 Times in 0 Posts
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? 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
Reply With Quote
  #11  
04-12-2004, 10:39 AM
bilu bilu is offline
Free Member
 
Join Date: Jan 2004
Posts: 341
Thanks: 0
Thanked 0 Times in 0 Posts
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


Bilu
Reply With Quote
  #12  
04-12-2004, 11:10 AM
digitall.doc digitall.doc is offline
Free Member
 
Join Date: Jul 2003
Location: Valencia (España)
Posts: 741
Thanks: 0
Thanked 0 Times in 0 Posts
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).
Reply With Quote
  #13  
04-12-2004, 11:23 AM
bilu bilu is offline
Free Member
 
Join Date: Jan 2004
Posts: 341
Thanks: 0
Thanked 0 Times in 0 Posts
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
Reply With Quote
  #14  
04-12-2004, 11:31 AM
digitall.doc digitall.doc is offline
Free Member
 
Join Date: Jul 2003
Location: Valencia (España)
Posts: 741
Thanks: 0
Thanked 0 Times in 0 Posts
Yes, I remember using noise in the beginings of ffvfw encodings (a looong time ago )
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?.
Reply With Quote
  #15  
04-12-2004, 12:21 PM
bilu bilu is offline
Free Member
 
Join Date: Jan 2004
Posts: 341
Thanks: 0
Thanked 0 Times in 0 Posts
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
Reply With Quote
  #16  
04-12-2004, 02:18 PM
incredible incredible is offline
Free Member
 
Join Date: May 2003
Location: Germany
Posts: 3,189
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to incredible
And the funny thing is, even if mencoder during encoding reports buffer underflows .... sometimes afterwards inspecting in BV 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.
(But CCE 2.50 does still have problems with patched matrixes ... well in my case... if std. CCE is used, everything results perfect)
Reply With Quote
  #17  
04-12-2004, 03:43 PM
Jellygoose Jellygoose is offline
Free Member
 
Join Date: Jun 2002
Location: Germany
Posts: 1,288
Thanks: 0
Thanked 0 Times in 0 Posts
Did anyone experience some kind of a pulsing video with mencoder?
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!
__________________
j3llyG0053
Reply With Quote
  #18  
04-12-2004, 04:19 PM
rds_correia rds_correia is offline
Free Member
 
Join Date: Apr 2003
Location: Chinese Democracy starts now!
Posts: 2,563
Thanks: 1
Thanked 0 Times in 0 Posts
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
Reply With Quote
  #19  
04-12-2004, 04:20 PM
rds_correia rds_correia is offline
Free Member
 
Join Date: Apr 2003
Location: Chinese Democracy starts now!
Posts: 2,563
Thanks: 1
Thanked 0 Times in 0 Posts
Hmm,
Could it be a very looonng GOP size??
Just a thought.
C ya
Reply With Quote
  #20  
04-12-2004, 05:41 PM
kwag kwag is offline
Free Member
 
Join Date: Apr 2002
Location: Puerto Rico, USA
Posts: 13,537
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by Jellygoose
Did anyone experience some kind of a pulsing video with mencoder?
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
Reply With Quote
Reply




Similar Threads
Thread Thread Starter Forum Replies Last Post
Mencoder: Vrc_minrate and vratetol maurus Video Encoding and Conversion 1 05-27-2004 07:24 AM
Mencoder: Is ratecontrol not working with vrc_minrate yet? digitall.doc Video Encoding and Conversion 11 05-07-2004 11:48 AM
Set of 4 Mencoder tests: mind loaning us some CPU cycles? bilu Video Encoding and Conversion 38 04-04-2004 02:27 PM
AAC audio tests GFR Audio Conversion 1 06-18-2003 01:28 PM
KDVD PAL tests Tachyon Video Encoding and Conversion 0 06-16-2002 04:03 AM

Thread Tools



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