![]() |
Sample
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:1This is my first encode on FreeBSD :D http://www.kvcd.net/test.m2v Min bitrate is maintained above 300Kbps :cool: -kwag |
@ 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 |
Quote:
|
Quote:
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. |
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?. |
Quote:
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 ...-kwag |
@kwag
your pleasure is mine :-) but ... afais, u set maxrate to 2500. how's that come to this 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? i don't want to 'wipe your smile', just asking ... :-) the bests y |
Quote:
Quote:
Quote:
But after the second pass, I'll either :arrow: :D or :arrow: :cry: if the maximum bitrate doesn't normalize to ~2,500Kbps. -kwag |
Re: Pseudo MIN bitrate with noise?
Quote:
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!!?? |
Re: Pseudo MIN bitrate with noise?
Quote:
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 |
Re: Pseudo MIN bitrate with noise?
Quote:
|
Re: Pseudo MIN bitrate with noise?
Quote:
Sorry Kwag!! <Fluffbutt blushes his furry ears in embarassment> :oops: :oops: :oops: :oops: :oops: :oops: :oops: :oops: 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? |
Here's the log of my mux, after the second pass:
Code:
Scanning video stream for a sequence header and pulldown type ...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: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 |
@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:
nice worx, anyway ! the bests y |
Quote:
Quote:
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, 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:
Quote:
-kwag |
@kwag
things are not so simple (as usual :-)) i found the same for 'high-bitrate' (1500-2500) svcd. Quote:
& ... 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 |
Quote:
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 |
Quote:
|
Quote:
-kwag |
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 BitrateThe 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 |
Site design, images and content © 2002-2026 The Digital FAQ, www.digitalFAQ.com
Forum Software by vBulletin · Copyright © 2026 Jelsoft Enterprises Ltd.