Quantcast Mencoder: Pseudo Min Bitrate with Noise? - Page 2 - digitalFAQ.com Forums [Archives]
  #21  
05-11-2004, 09:04 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
Here's a sample, created with vmesquita's temp.conf file, that was created with MencodeME on my WIndows PC.
But I took the .conf file, and send it over to my FreeBSD machine, and encoded it there.
I rebuilt the complete mencoder/mplayer/libavcodec from CVS today.

These are the settings used for this sample:
Code:
vf=yuvcsp,scale=704:356:0:0:60,crop=0:0:-1:-1,unsharp=l3x3:0.6,hqdn3d=3:6:2,unsharp=l3x3:-0.7:c3x3:-1.5,noise=3th,expand=704:480:-1:-1:1
of=rawvideo=1
ovc=lavc=1
nosound=1
sws=2
lavcopts=vcodec=mpeg2video:vrc_eq=tex:vmax_b_frames=2:vrc_maxrate=2500:aspect=1.3333:keyint=24:vrc_buf_size=1835:preme=2:precmp=2:vstrict=-1:autoaspect=1:scplx_mask=0.3:vqblur=0:mbqmin=1:vqmin=1:mbqmin=1:lmin=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=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
ofps=23.976

This is my first encode on FreeBSD

http://www.kvcd.net/test.m2v

Min bitrate is maintained above 300Kbps

-kwag
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
  #22  
05-12-2004, 04:09 AM
Peder Peder is offline
Free Member
 
Join Date: Feb 2004
Posts: 19
Thanks: 0
Thanked 0 Times in 0 Posts
@ kwag : What do you mean by "setting the MIN bitrate in mencoder/ffmpeg just doesn't work correctly" ?

My Pioneer DV-444 doesn't like bitrates under 800 and my mencoder scripts use vrc_minrate=800 w/o any problems. BitViewer also shows that it works.
I know it sort of screws up the KVCD compression gain but a constant 300kbps noise should do the same, right?

I do my encodings with mencoder-1.0pre4 under linux.

- Peder
Reply With Quote
  #23  
05-12-2004, 04:12 AM
vmesquita vmesquita is offline
Invalid Email / Banned / Spammer
 
Join Date: May 2003
Posts: 3,726
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by Peder
@ kwag : What do you mean by "setting the MIN bitrate in mencoder/ffmpeg just doesn't work correctly" ?
It may be fixed now (we haven't tested this in a while), but setting min_rate used to make mencoder don't hit the average bitrate anymore.
Reply With Quote
  #24  
05-12-2004, 05:05 AM
yaz yaz is offline
Free Member
 
Join Date: Aug 2003
Posts: 40
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by vmesquita
Quote:
Originally Posted by Peder
@ kwag : What do you mean by "setting the MIN bitrate in mencoder/ffmpeg just doesn't work correctly" ?
It may be fixed now (we haven't tested this in a while), but setting min_rate used to make mencoder don't hit the average bitrate anymore.
no, it's not fixed (tested w/ 04050 but that harsh 'rate deviating' effect u mentioned is valid only for the low bitrate (~<1500kbps) range. however, minrate settings is (& was) always tolerated. mencoder keeps minrate much better than maxrate! (but sometimes the price is too much for that)
what kwag mentions is also true. i found that in the lb range even the smallest change in minrate affects heavily the q curve distribution. usually in the wrong direction as the q curve becomes quite erratic spanning a much wider range than w/out vrc_minrate.
anyway ... this business is much more complicated.
i've been testing mencoder for weeks & i found that min/max bitrates are heavily dependant on many options. vrc_max/minrate (of course), lmin, vratetol, qmin/max, ... i've tried to do a step-by-step investigation but as all these opts are somehow 'cross correlated' it's very hard to make a 'complete' set of experiment. what i only(?) want is finding a 'robust' & safe setting with which min&maxrate is kept (aimed 250-2500). no success so far. if u're interested i'd put some of my results.
& (just not to be so ot ) insted of adding noise a/o whatsoever why not push maxrate (slightly) downward ? it'd be a kinda bitrate redistribution. sure it worx but i've never tested this aspect.
the bests
y
[EDIT] hmmm ... there must be a hard coded limit of vrc_minrate as if i set it to 0 encoding goes to divx(?) instead of mpeg2(???) mencoder does it when options set outside the limits allowed (say, lmin=0 does the same) maybe, this part is really crappy.
Reply With Quote
  #25  
05-12-2004, 06:11 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
Well yaz,
in the thread I started about vrc_minrate I commented my short experience. Yes, when setting any minrate value, mencoder keeps it OK, but it seems to overquantize, compared with the same encoding without minrate setting. But in my experience this just happens in first pass, in second pass the quantization is "controlled" more, and returns to "normal" values.
I'm following this pseudominrate thread with interest, but still didn't test it. I tested the AVI.fil with added noise (2u if I remember well) but I got low bitrates about 100.
Anyway I think it would be better to be able to use a minrate value. Has anyone else tested this on 2pass?, are min/maxrates respected?, and what about quantizers?.
Reply With Quote
  #26  
05-12-2004, 07:48 AM
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 yaz
what i only(?) want is finding a 'robust' & safe setting with which min&maxrate is kept (aimed 250-2500). no success so far.
Hi yaz,

Try the settings I posted above.
This morning, I woke up to a perfectly encoded MPEG-2
Look at the Mplex log:
Code:
 Scanning video stream for a sequence header and pulldown type ...
    2:3 pulldown detected ...
 
  Scanning video stream for pictures ...
  Found 145568 picture headers.
  Video stream information
    Stream length : 733144815
    Total time (seconds) : 6071
    Sequence start : 6305
    Sequence end : 0
    No. Pictures : 145568
    No. Groups : 6305
    No. I Frames : 6305 avg. size 28655 bytes
    No. P Frames : 42219 avg. size 6249 bytes
    No. B Frames : 97044 avg. size 2975 bytes
    No. D Frames : 0 avg. size 0 bytes
    Horizontal size : 704
    Vertical size : 480
    Aspect ratio : 0.6735
    Picture rate : 29.970 frames/sec,  2:3 pulldown detected
    Bit rate : 312500 bytes/sec (2500000 bits/sec)
    Computed avg rate : 151250 bytes/sec (1210000 bits/sec)
    Computed max rate : 457650 bytes/sec (3661200 bits/sec)
    Vbv buffer size : 229376 bytes
    CSPF : 0
 
  Scanning audio stream for access units information
  Found 232445 audio frame headers.
  MPEG audio stream information
    Stream length : 85008457
    Syncwords : 232445
    Frames : 66413 size 365 bytes
    Frames : 166032 size 366 bytes
    Layer : 2
    CRC checksums : yes
    Bit rate : 14000 bytes/sec (112 kbit/sec)
    Frequency : 44.1 kHz
    Mode : 0 stereo
    Mode extension : 0
    Copyright bit : 1 copyright protected
    Original/Copy : 1 original
    Emphasis : 0 none
 
  Multiplexing information
    Video stream data rate : 312500 bytes/sec (2500000 bits/sec)
    Audio stream 1 data rate : 14000 bytes/sec (112000 bits/sec)
    Total data rate : 348600 bytes/sec (2788800 bits/sec)
 
  Multiplexing file k:\payback.movie.mpg
  Finished multiplexing k:\payback.movie.mpg
  Calculating 6304 SVCD user data scan offsets for file k:\payback.movie.mpg
  Finished calculating SVCD scan offsets for file k:\payback.movie.mpg
No errors whatsoever, and target file size right on the nose (with 1-pass), and not a single under/overflow

-kwag
Reply With Quote
  #27  
05-12-2004, 09:10 AM
yaz yaz is offline
Free Member
 
Join Date: Aug 2003
Posts: 40
Thanks: 0
Thanked 0 Times in 0 Posts
@kwag
your pleasure is mine but ...
afais, u set maxrate to 2500. how's that come to this
Quote:
Computed max rate : 457650 bytes/sec (3661200 bits/sec)
this instance the maxrate obtained is much higher than that set. that's what i always whine for.
i guess u set vbitrate sw to 1150 (in my experience i've found that it's pretty hard to make vbitrate deviate significantly from the setting)
& what about the minrate?
i don't want to 'wipe your smile', just asking ...
the bests
y
Reply With Quote
  #28  
05-12-2004, 09:46 AM
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 yaz
@kwag
your pleasure is mine but ...
afais, u set maxrate to 2500. how's that come to this
Quote:
Computed max rate : 457650 bytes/sec (3661200 bits/sec)
this instance the maxrate obtained is much higher than that set. that's what i always whine for.
Yes I noticed that too, and it's on some peaks. But that was a 1-pass encode. Actually, I am currently running the second pass, just because of that
Quote:
i guess u set vbitrate sw to 1150 (in my experience i've found that it's pretty hard to make vbitrate deviate significantly from the setting)
& what about the minrate?
The MIN bitrate is maintaind at about 300Kbps, because of the parameter noise=3th. I verified that with Bitrateviewer, and it doesn't go below ~290Kbps.
Quote:
i don't want to 'wipe your smile', just asking ...
the bests
y
I'm still smiling
But after the second pass, I'll either or if the maximum bitrate doesn't normalize to ~2,500Kbps.

-kwag
Reply With Quote
  #29  
05-12-2004, 10:23 AM
Fluffbutt Fluffbutt is offline
Free Member
 
Join Date: Apr 2004
Posts: 189
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by kwag
@vmesquita,

Because setting the MIN bitrate in mencoder/ffmpeg just doesn't work correctly, and causes all kinds of side effects (quantization errors, etc.), I have a suggestion. <snip>
-kwag
Umm.. I've done a few cdr's of 110 and higher movies, using 300 900 1850 as the bitrate settings. (and some 180 min season dvd's to two cdr's).

All have come out beautiful, rarely a block to be seen, and then only on vastly differing scenes (eg, a swirly flashing mutli coloured intro to Absolutley Fabulous Season 1)

What are these side effects - what do I need to look for?

<posted ini file for comparison>

of=rawvideo=1
ovc=lavc=1
nosound=1
noskip=1
sws=9
lavcopts=vcodec=mpeg1video:vhq=1:keyint=15:aspect= 4/3:vmax_b_frames=2:vrc_minrate=400:vbitrate=800:vrc _maxrate=1850:vratetol=1000:vrc_buf_size=327:vqmin =2:vqmax=24:mbqmax=20:lmin=1.5:vb_qfactor=1.2:vi_q factor=0.8:vqblur=0.3:vlelim=-4:vcelim=7:lumi_mask=0.05:dark_mask=0.01:naq=1:
intra_matrix=8,9,12,22,26,27,29,34,9,10,14,26,27,2 9,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,7 9:
inter_matrix=16,18,20,22,24,26,28,30,18,20,22,24,2 6,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,4 2,44
vf=scale=352:288
ofps=25

The vf=scale line is changed if the dvd is widescreen, this one is from ABFab - 4/3.
This encodes at 25fps on a p3-800. Direct from vob to mpg.

<edit> and why is my 'quote' never working!!??
__________________
|
Meeow!
Reply With Quote
  #30  
05-12-2004, 10:59 AM
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 Fluffbutt
What are these side effects - what do I need to look for?
Here's one.
From the Mplayer's group manual:

"NOTE: vratetol should not be too large during the second pass or there might be problems if vrc_(min|max)rate is used."
http://www.mplayerhq.hu/DOCS/man/en/manpage.html#GENERAL%20ENCODING%20OPTIONS%20(MENCO DER%20ONLY)

As I now don't set min (only max), I don't see problems.
I'm still on my second pass of my previous encode, to see if the bitrates are distributed, and the max bitrate stays around 2,500Kbps.

-kwag
Reply With Quote
  #31  
05-12-2004, 11:02 AM
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 Fluffbutt
<edit> and why is my 'quote' never working!!??
Because you are "checking" Disable BBCode in this post
Reply With Quote
  #32  
05-12-2004, 11:36 AM
Fluffbutt Fluffbutt is offline
Free Member
 
Join Date: Apr 2004
Posts: 189
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by kwag
Quote:
Originally Posted by Fluffbutt
<edit> and why is my 'quote' never working!!??
Because you are "checking" Disable BBCode in this post


Sorry Kwag!!
<Fluffbutt blushes his furry ears in embarassment>



I've not done a 2 pass yet, and my ratetol is nearly always set at 1000.

Actually that script I posted has been arrived at after about 50 test encodes of a 400 mb file.
They give me the best results yet, speed and quality and size -wise.
I get 105 minutes in about 740mb (inc audio at 128 or 192 kbps (depends on movie size - I'd rather drop audio then lose movie quality)

I'll have to try a 2-pass encode (I can do a 30 min dvd seasonal episode in 30 mins, so 2 pass would be 1 hour?) - Is the increase in quality worth the extra time?
__________________
|
Meeow!
Reply With Quote
  #33  
05-12-2004, 12:23 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
Here's the log of my mux, after the second pass:

Code:
  Scanning video stream for a sequence header and pulldown type ...
    2:3 pulldown detected ...
 
  Scanning video stream for pictures ...
  Found 145577 picture headers.
  Video stream information
    Stream length : 733936489
    Total time (seconds) : 6071
    Sequence start : 6350
    Sequence end : 0
    No. Pictures : 145577
    No. Groups : 6350
    No. I Frames : 6350 avg. size 29081 bytes
    No. P Frames : 42177 avg. size 6109 bytes
    No. B Frames : 97050 avg. size 3005 bytes
    No. D Frames : 0 avg. size 0 bytes
    Horizontal size : 704
    Vertical size : 480
    Aspect ratio : 0.6735
    Picture rate : 29.970 frames/sec,  2:3 pulldown detected
    Bit rate : 312500 bytes/sec (2500000 bits/sec)
    Computed avg rate : 151250 bytes/sec (1210000 bits/sec)
    Computed max rate : 466200 bytes/sec (3729600 bits/sec)
    Vbv buffer size : 229376 bytes
    CSPF : 0
 
  Scanning audio stream for access units information
  Found 232445 audio frame headers.
  MPEG audio stream information
    Stream length : 85008457
    Syncwords : 232445
    Frames : 66413 size 365 bytes
    Frames : 166032 size 366 bytes
    Layer : 2
    CRC checksums : yes
    Bit rate : 14000 bytes/sec (112 kbit/sec)
    Frequency : 44.1 kHz
    Mode : 0 stereo
    Mode extension : 0
    Copyright bit : 1 copyright protected
    Original/Copy : 1 original
    Emphasis : 0 none
 
  Multiplexing information
    Video stream data rate : 312500 bytes/sec (2500000 bits/sec)
    Audio stream 1 data rate : 14000 bytes/sec (112000 bits/sec)
    Total data rate : 348600 bytes/sec (2788800 bits/sec)
 
  Multiplexing file k:\payback.movie.2pass.mpg
  Finished multiplexing k:\payback.movie.2pass.mpg
  Calculating 6350 SVCD user data scan offsets for file k:\payback.movie.2pass.mpg
  Finished calculating SVCD scan offsets for file k:\payback.movie.2pass.mpg
But here's the thing
My 1-pass .m2v, when dragged to BitrateViewer, showed a peak of ~3,800Kbps.
My new 2-pass .m2v, shows 3,425Kbps


And here's something else. Look at the log, when processed with MPEG Validator:
Code:
Begin Video Streams Summary:
*Sequence_end_code NOT FOUND, in Stream E0!!
Video Delay Stream E0 = 213.4 ms
Number of Frames = 145575 -> 4852.50 Sec
Number of Sequence Headers = 6350
Sequence Headers Aligned = Yes
*Horizontal Size = 704
*Vertical Size = 480
Aspect Ratio = 4:3
*Frame Rate = 29.97 fps
P-STD Buffer Size Bound = 230 KB (From System Header)
VBV Buffer Size = 112 -> (224 KB)
Stream Type = MPEG-2 MP@ML VBR
Chroma Format = 4:2:0
Picture Structure = Frame
Intra DC Precision = 8
Top Field First = Yes
*DCT Type = Frame
Quant. Scale = Linear
Scan Type = Alternate
Frame Type = Interlaced
Number of GOPs = 6350
*First GOP Closed = No
Number of Closed GOP = 0
Max. frames per GOP (without first & last) = 30
Min. frames per GOP (without first & last) = 2
Avg. frames per GOP (Total) = 22.93
Max. Frame Size = 55324
Min. Frame Size = 288
Average Frame Size = 5042
Frames I = 6350 -> 4%
Avg. Frame I Size = 112 KB
Frames I Total Size = 184670049 bytes, size 25%
Frames P = 42176 -> 28%
Avg. Frame P Size = 16 KB
Frames P Total Size = 257660592 bytes, size 35%
Frames B = 97050 -> 66%
Avg. Frame B Size = 7 KB
Frames B Total Size = 291719156 bytes, size 39%
Nominal bitrate (Sequence Header) = 2500000 bps -> 2441 Kbps
Average Bitrate = 1180 Kbps
Peak Bitrate (1 sec) = 3550 Kbps
End Video Streams Summary.
Specially Peak Bitrate (1 sec) = 3550 Kbps
Obviousle, that's some kind of a spike
Anyway, the file plays flawlessly on both of my SVCD capable players.

Here's a sample of the muxed 2-pass encode:
http://www.kvcd.net/payback.movie.2pass.mpg.cut.156.mpg

-kwag
Reply With Quote
  #34  
05-13-2004, 03:43 AM
yaz yaz is offline
Free Member
 
Join Date: Aug 2003
Posts: 40
Thanks: 0
Thanked 0 Times in 0 Posts
@kwag
u're the lucky man if u want to play further i'd suggest to lower the maxrate. it's the most effective way of controlling maxrate. some quests :
- why did u set vrc_buf_size to 1835 when u go for svcd (or did i miss sg?)
- what version of mplex do u use ? (mine does not drops that nice transcounted values (bytes/s -> bits/sec) ... ) (what a lazy ppl i'm )
- did u checked the 'compressibility' of ur clip ? i guess it's pretty high. yesterday i played with this limiting bitrate thingy. it seems compressibility is also an important factor concerning limiting bitrates.
Quote:
Anyway, the file plays flawlessly on both of my SVCD capable players.
yeah, here we go ... that's why i always ask how important is this problem (if at all). old(er) standalones were very rigorous about 'standard compliancy' but what about the new(er) ones ?

nice worx, anyway !
the bests
y
Reply With Quote
  #35  
05-13-2004, 08:44 AM
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 yaz
@kwag

- why did u set vrc_buf_size to 1835 when u go for svcd (or did i miss sg?)
You didn't miss anything. I was stupid and I left the DVD setting
Quote:
- what version of mplex do u use ? (mine does not drops that nice transcounted values (bytes/s -> bits/sec) ... ) (what a lazy ppl i'm )
Mplex 0.91. The GUI version.
Quote:
- did u checked the 'compressibility' of ur clip ? i guess it's pretty high. yesterday i played with this limiting bitrate thingy. it seems compressibility is also an important factor concerning limiting bitrates.
Not really, but last night I made a KDVD, and I see a pattern here
I had set MAX bitrate to 7,500Kbps, and the final encoded movie had peaks of ~8,300Kbps. So it seems that there's a constant in there, where the MAX bitrate can go about ~1,000Kbps over the MAX value set. So now I just set my MAX bitrate to 7,500Kbps for KDVD, and I don't have to worry about the MAX, because it will never reach the maximum 9,800Kbps ,which is the limit for DVDs. And 7,500Kbps with mencoder, is more than plenty for action scenes
Quote:
Anyway, the file plays flawlessly on both of my SVCD capable players.
Quote:
yeah, here we go ... that's why i always ask how important is this problem (if at all). old(er) standalones were very rigorous about 'standard compliancy' but what about the new(er) ones ?

nice worx, anyway !
the bests
y
Well, in the two players I tested, one is new (Cyberhome 300), and my other player is much older (JVC XV-F80BK), which is a 2+ year model.

-kwag
Reply With Quote
  #36  
05-14-2004, 03:21 AM
yaz yaz is offline
Free Member
 
Join Date: Aug 2003
Posts: 40
Thanks: 0
Thanked 0 Times in 0 Posts
@kwag
things are not so simple (as usual ) i found the same for 'high-bitrate' (1500-2500) svcd.
Quote:
I had set MAX bitrate to 7,500Kbps, and the final encoded movie had peaks of ~8,300Kbps. So it seems that there's a constant in there, where the MAX bitrate can go about ~1,000Kbps over the MAX value set. So now I just set my MAX bitrate to 7,500Kbps for KDVD ...
controlling max this way is more complicated as the set & apparent max does not show linear relationship (for me)
& ... when i went below 1500 i found the peak-br lower then the max set. here i had to increase max in the setting so as to hit the limit i wanted. in the range round 1200 it meant max=6000(!) for some clips.
anyway, my results are quite uncertain cus i haven't got a reliable stream analyzer. i've tried bitrateview, vd-mpeg2, mplex, mplexgui, ... all gave different(!) results. so what i wrote is rather a tendency.
btw, for such programmers like hanging here around, would it be so hard to write a small app for a simple stream analysis ? sg like statsreader for xvid. say, min/avg/max for br and q would suffice.
the bests
y
Reply With Quote
  #37  
05-14-2004, 02:25 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 yaz
btw, for such programmers like hanging here around, would it be so hard to write a small app for a simple stream analysis ? sg like statsreader for xvid. say, min/avg/max for br and q would suffice.
the bests
y
I'm going to do an analysis, simply encoding at every valid resolution with heavy gaussian noise, to force the encoder into saturation.
This way, I can see the MAX bitrate that the encoder will produce, on a worse case scenarion. Then we can adjust the MAX offset to use, once we know the "Real" peak bitrate that mencoder generates, from the value that is set.
This should solve the problem of the max bitrate going above the set limit.
Once I get the values, I'll PM vmesquita and incredible, so they can integrate the correct values into their applications

-kwag
Reply With Quote
  #38  
05-14-2004, 04:50 PM
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
Quote:
Originally Posted by kwag
Once I get the values, I'll PM vmesquita and incredible, so they can integrate the correct values into their applications

-kwag
Thanx for your test kwag. It would also be nice if you post your results, for those of us that still do some of our encodings with our own command-line (although VM and Inc are making that the number of this kind of encodings is getting smaller every time... )
Reply With Quote
  #39  
05-14-2004, 05:48 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 digitall.doc
Thanx for your test kwag. It would also be nice if you post your results, for those of us that still do some of our encodings with our own command-line
Sure wll

-kwag
Reply With Quote
  #40  
05-15-2004, 02:04 AM
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
Here are the test results.
I used a simple 10 second clip, using the mencoder parameter noise=99th, which causes extreme noise and saturation of the encoder.
What I did was set the MAX bitrate, and then I used an average bitrate of 200Kbps under the MAX setting, so as to keep the encoder working on a worst case scenario, by keeping average bitrate very close to MAX bitrate. As said, this is a worse case scenario, which should NEVER reach these values in reality.
Here are the results. All values in Kbps:

Code:
MAX bitrate                       Average Bitrate                           Peak Bitrate

1,150                               950                                           ~2,936
2,500                               2,300                                         ~2,500
3,500                               3,300                                         ~3,300
5,000                               4,800                                         ~4,700
6,000                               5,800                                         ~5,625
7,000                               6,800                                         ~6,600
8,000                               7,800                                         ~7,566
9,800                               9,600                                         ~9,187
As you can see, all tests produced a bitrate within tolerance and below the MAX bitrate, except on 1,150Kbps test where I assume the encoder tried to maintain quality by pushing the bitrate over the max. The log for that session was full of errors, indication buffer underflows on almost every frame. Obviously, a bitrate of 1,150Kbps is simply not enough for a resolution of 704x480, which is the resolution I conducted all the tests.
The question is, why do we see peak bitrates above the MAX on our regular encodes
Well, they are glitches, and I was able to confirm that even on a VOB from the movie "The Big Hit", which is a SuperBit DVD, and the bitrate peak is over 10,300
That's over the MAX DVD standard of 9,800, but that DVD plays flawlessly on all my DVD players.
So, are these peaks going to cause us problems on our DVD players, playing our KDVD encodes
I don't think so
So vmesquita and incredible, my recommendations are that you can disregard the issue, and leave the MAX bitrate settings as they are, without the need to use a negative correction offset.
Could this stability result be caused by the use of noise=3th on the settings
Maybe, but I didn't make any more tests, because I'm very happy with the current results.
Anyway, there's really no need to set mencoder MAX bitrate above 8,000Kbps, because even at 720x480 at ~7,500Kbps, the quality results are BEYOND CCE or TMPEG at 9,800Kbps, and that's a fact
mencoder (libavcodec) is way WAY ahead of them.
And that's my humble opinion, after doing many many tests.

-kwag
Reply With Quote
Reply




Similar Threads
Thread Thread Starter Forum Replies Last Post
Mencoder: Using Bitrate Viewer maurus Video Encoding and Conversion 11 06-07-2004 12:00 PM
Mencoder: Move the noise parameter to the beginning of your script! kwag Video Encoding and Conversion 74 06-03-2004 04:54 PM
Mencoder: Question about average bitrate... black prince Video Encoding and Conversion 3 06-02-2004 06:53 PM
Mencoder: Predicted and bitrate maurus Video Encoding and Conversion 2 05-28-2004 03:00 AM
noise from the VHS tape caused the encoder to need more bitrate? Learner Video Encoding and Conversion 3 05-12-2002 11:51 AM

Thread Tools



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