Minimum Bitrate - Need Theoretical Advice

musicvid10 wrote on 7/21/2009, 9:28 PM
I render lots of 2 hr. DVDs.
Max bitrate = 9.3 - 9.5 Mbs
Av bitrate = 4.0 - 4.4 Mbs

Where I have a question is with the collateral effects of raising the Minimum Bitrate in MainConcept. The default of 192 Kbs is way too low, I just can't stand the blockiness in my slow fades, of which there are many. Raising the minimum to 1.5 Mbs is not quite acceptable to me, 2 Mbs seems to work pretty well.

My question: What are the implications of raising the minimum bitrate on the areas where near-maximum bitrate is needed? Obviously, there is a tradeoff, but when does it become detrimental? Common sense tells me that as the minimum approaches the average, the bitrate available for transients is reduced, but to what end? My average and maximum bitrates need to stay as above, as these are compilations from years of previous DVDs I have produced, so being able to smart render everything but my new transitions (mostly ftb-ffb) is almost a necessity.

I'm hoping a couple of "Johns" will see and reply to this.

Comments

ScorpioProd wrote on 7/21/2009, 9:56 PM
From many years of using TMPGEnc, I have always used a minimum bit rate of 2Mb/s for any 2-pass MPEG-2 VBR encoding for DVD that I've done. I do the same with any MPEG-2 encoder I use. There are a number of reasons, all learned from others when I started, and not all personally proven by me, but I've had good luck following their rules, with compatibility and quality, so I continue to follow them.

As for minimum data rates:

1) As you found, keeping the minimum at a decent level prevents things like still images from becoming lower quality than the encoder can realize in its attempts to keep everything at the same quality level during 2-pass VBR encoding.

2) Even in 2-pass VBR encoding, where it knows what's coming, it can't jump the data rate too much above or below average in too short a period of time, otherwise players would choke on the change. So typically, you don't truly get to the extremes of either above or below the average before the scene starts driving the data rate in the opposite direction anyway. But setting reasonable ranges, such as the 2Mb/s min, helps prevent these problems as well.

3) Some older DVD players had compatibility issues with data rates falling below 2Mb/s during playback.

These are the reasons I stick with 2Mb/s for my min data rate.
farss wrote on 7/22/2009, 1:08 AM
The problem with setting minimum too low as noted is too rapid changes in bitrate can cause a player to stall. I've been caught out by this once.
As for the rest of the question. optimising the allocation of the bit budget what I've noticed is the calculations are made over a quite small window. For example the opening titles might need a very small bitrate and that could be saved for say minutes later when there's fast action. This does not seem to happen. The titles will average out to the average even though it's not needed wasting what could have been used laster on.

I suspect this is where encoders capable of hundreds of passes earn the cost of buying them. The other approach is to hand optimise the encode in sections and then stitch the files together. Hardly practical for most of us.

I should say though I've encoded slide shows at very low bitrates and not noticed any loss of image quality. One way to avoid nasties at a cut or transition is to add a marker. If you select the Add I Frame At Markers you may be able to avoid this.

Bob.
musicvid10 wrote on 7/22/2009, 8:54 AM
As I raise the minimum bitrate to say, 50% or more of the average bitrate, at what point would I begin seeing a quality tradeoff in well-lit, high-motion / high-detail scenes?
musicvid10 wrote on 7/22/2009, 9:18 AM
One way to avoid nasties at a cut or transition is to add a marker. If you select the Add I Frame At Markers you may be able to avoid this.

This makes perfect sense. I shall try it.
apit34356 wrote on 7/22/2009, 10:22 AM
One of the big killers of low bit rates, besides lots of moment ;-), is Video NOISE or "changing" colors---- different light sources mixing.

Noise removal from video is a big issue, video noise eats bandwidth. So, after the video noise is removal, one can a very slight blur to "smooth" colors..etc... to help lower bit rate. ;-)

johnmeyer wrote on 7/22/2009, 11:22 AM
Where I have a question is with the collateral effects of raising the Minimum Bitrate in MainConcept. The default of 192 Kbs is way too low, I just can't stand the blockiness in my slow fades ...I would be very surprised if the minimum bitrate made any difference on the pixelization that often happens during fades, smoke, or similar situations.

The two MOST IMPORTANT thing to do to minimize these problems are filtering (which Bob already mentioned) and using 2-pass encoding. If you are doing one-pass encoding, then the minimum and maximum bitrates really don't get used that much, because all optimization is done over the course of a few frames.

You MUST do 2-pass.

I have just done several dozen DVDs using average bitrates as low as 3,200 kbps. They look really good (all things considered). I used a minimum of 512,000 and a maximum of 8,200,000. One of the DVDs was an old SVHS capture of a concert, captured off the air. Part of the concert had rapidly flashing strobe lights, probably the cruelest test of MPEG-2 encoding possible. I used a motion-compensated FFT noise removal filter, which I did separately on the even frames and odd frames, then weaving them back together. The encoder held up remarkably well to this well-filtered input.

So, use filtering (Neat video, while not as good as the filtering I use, is far more accessible to most people, and is what I recommend). And ALWAYS use 2-pass if you encode below 6,000,000 average.

[Edit]

For those who might be interested, here is the AVISynth script I use. It is slower than snail snot, but it really works well.

#This script denoises using the original MVTools motion compensation plug-in prior
#to the FFT3D filter. It works on each field separately, and then re-combines fields.

#Serve YUY2 from Vegas and convert back to RGB32 in this script if going into the external Mainconcept MPEG encoder.
#Check the RGB 16-235 box in the Mainconcept encoder.

loadPlugin("c:\Program Files\AviSynth 2.5\plugins\CNR\Cnr2.dll")
loadPlugin("c:\Program Files\AviSynth 2.5\plugins\fft3dfilter.dll")
Loadplugin("C:\Program Files\AviSynth 2.5\plugins\MVTools\mvtools.dll")

#Modify this to point to the video file you use. Killaudio for MainConcept encoding.
source=AVISource("E:\frameserver.avi").KillAudio().assumebff()

#Chroma Cleanup
chroma=source.Cnr2("oxx",8,16,191,100,255,32,255,false) #VHS
#chroma=a.Cnr2("oxx",8,14,191,75,255,20,255,false) #Laserdisc

denoised=ApplyInterlacedFilter(chroma, "MotionCompDenoise")

#Use the following if going to MainConcept MPEG-2 encoder
denoised=denoised.ConvertToRGB24(interlaced=true)

return denoised

#-----------------------------------------------------
function ApplyInterlacedFilter(clip v1, string filter)
{
v2 = separatefields(v1)
selecteven(v2)
even = Eval(filter)
selectodd(v2)
odd = Eval(filter)
interleave(even,odd)
return weave()
}


function MotionCompDenoise(clip chroma)
{
#Motion Compensation
bl=8 #block size
ov=4 #overlap
sh=2 #sharp
vf=chroma.mvanalyse(pel=2,blksize=bl,isb=false,idx=1,overlap=ov,sharp=sh,truemotion=true)
vb=chroma.mvanalyse(pel=2,blksize=bl,isb=true,idx=1,overlap=ov,sharp=sh,truemotion=true)
vf2=chroma.mvanalyse(pel=2,blksize=bl,isb=false,idx=1,delta=2,overlap=ov,sharp=sh,truemotion=true)
mocomp=interleave( mvcompensate(chroma,vf2,idx=1,thSCD1=600) , mvcompensate(chroma,vf,idx=1,thSCD1=600) , chroma , mvcompensate(chroma,vb,idx=1,thSCD1=600))
FFT3DFilter(mocomp,sigma=2, sigma2=3, sigma3=6, sigma4=10, bt=4, bw=16, bh=16, ow=8, oh=8, dehalo=1, sharpen=1, degrid=1,interlaced=false)
return selectevery(4,2)
}



musicvid10 wrote on 7/22/2009, 12:13 PM
All good points of view.
It looks like a combination of approaches is going to be best.
Trying to save rendering time by smart rendering all but the transitions; maybe would use two-pass on the really important projects.

Keeping my eyes open for more advice here, already picked up some great tips.