Does V12 know about bitrates?

PeterWright wrote on 8/16/2013, 1:20 AM
I rarely do DVDs these days, but I had to fit 2hr 45 on to a DVD,

I used a bitrate calculator to work out correct rate, about 3700 The resulting file was over 5 Gb, so I reduced the rate and got 4.53 Gb, still too big .... in stages, I took the average bitrate right down to 2,000 and it still came out at 4.53 Gb.

As a last resort I reinstalled V11, set the rate to 2,200 and got a 3.05 Gb file.

Has anyone else had trouble doing this in V12?

Comments

Grazie wrote on 8/16/2013, 1:29 AM
Doing your 2:45 Test now . . . .

I'll report back.

G

Chienworks wrote on 8/16/2013, 5:38 AM
I have noted a bug before where if you render to the same file name as last time and the file is still there, Vegas seems to use the same file header over again, including the same file size. Were you deleting the old rendered file before doing the next one? If not, try deleting before the next render, or at least render to a different file name.
Grazie wrote on 8/16/2013, 7:25 AM
This for a 2hour 45minute Project:-

4.7 ABR
VP12 = 5.8gb
VP11 = 6.03gb

2.0 ABR
VP12 = 2.5gb
VP11 = 2.7gb

So, "fairly" consistent. But the biggie for me is that VP12 is performing similar to VP11 for this ABR of 2.0, if also a tad smaller too. Added to which, I bet I could crank up to 3.5 and get under 4.5gb too.

HTHs

Grazie

PeterWright wrote on 8/16/2013, 9:25 AM
Thanks Grazie and thanks Kelly - I did give each render a new name, so that wasn't it.

As Grazie got the right results, it seems V12 hasn't "lost it". I'm wondering if I had a setting somewhere which somehow made my different average bitrates ineffective..
musicvid10 wrote on 8/16/2013, 9:32 AM
There were lots of complaints when V12 came out (iirc) that the VBR bitrate targets were off. Don't know if this has been addressed in later releases.

2:45 on a dvd is not out of the question, but less than stellar quality. About the same as a US football game.
johnmeyer wrote on 8/16/2013, 10:38 AM
I don't have V12, so I can't test specifically on that release, but for as long as I can remember, Vegas completely fails to compute the bitrate correctly when using single-pass variable bitrate. The size of the file should be precisely predictable by setting the average bitrate correctly, but this does not happen when using single-pass VBR.

The solution, in earlier versions of Vegas, was to use constant bitrate, or else use two-pass VBR. Try that and see if it helps.
Grazie wrote on 8/16/2013, 3:19 PM
. . BTW, I am STILL in awe at just what happened . . Pete is in Western Oz, I'm in London and Kelly, Mvid (?) & John are in the States!

It still amazes me that we can "call" on each other like this and work out an issue . . .

G

musicvid10 wrote on 8/16/2013, 3:24 PM
Yeah, it's only possible because the folks in UK and Oz stay up all night!
Me, I usually fade out before the start of Dave's Top 10 List.

But I'm a little concerned about the state of the States. The folks in northern Colorado are threatening secession over the burning issues of fracking (+), assault weapons (+), same-sex marriage (-), and legal weed (-). Welcome to 1962.

[EDIT] Woops, just found out that g-a-y is a dirty word on these forums. Guess we're already there . . .
larry-peter wrote on 8/16/2013, 4:18 PM
It would certainly be nice if we could experience the type of cooperation here in the States that we see on this forum.

Musicvid10, it's too bad you don't share a border with Texas. There's been consistent rumblings about secession in some circles down there for years. Maybe the two groups could join forces, find a nice island far, far away...
musicvid10 wrote on 8/16/2013, 4:41 PM
Along with French Quebec, maybe?
PeterWright wrote on 8/16/2013, 8:15 PM
> " 2:45 on a dvd is not out of the question, but less than stellar quality. About the same as a US football game."

You're not wrong there musicvid10, and in this case the original footage is an old 4:3 VHS tape. The 2200 render I did in V11 which produced a 3.05 Gb file was so noisy I couldn't use it, so I put the bitrate back up to 3700 and that's just about acceptable.
musicvid10 wrote on 8/16/2013, 10:56 PM
A run through NeatVideo in VirtualDub is still salient advice for that situation.
Can work wonders in some cases.

However, i confess, I usually burn my VHS to MPG directly with my trusty Panny set-top dvd recorder. The noise reduction is quite good, and they will edit in Vegas if i want to do more.
flyingski wrote on 8/16/2013, 11:11 PM
Back to the OP's original problem. If you still have the 4.5 G DVD file you might try running it through the old DVD Shrink freeware program. Shrink does an excellent job and will definitely make the file fit on a DVD. There will be no discernible loss of quality.
Grazie wrote on 8/16/2013, 11:55 PM
Ah! DVD Shrink, what great piece if software. Indy dig it out again. Thanks for reminding me.

Grazie



johnmeyer wrote on 8/17/2013, 1:58 AM
DVD Shrink is a great piece of software, but is the wrong answer to this problem. The correct answer, which has already been given by Musicvid10, is to use noise reduction software on the video prior to encoding. VHS video is full of noise and when video contains noise, most of the bits get wasted trying to chase all those little noise dots around, and very few bits are left over to encode the actual video.

As you reduce the bitrate in order to fit more content on a single disc this problem quickly gets magnified, as you've already found. However, if you do proper noise reduction with a high-quality denoiser, and do this as the last step just prior to encoding, you will get a remarkably better result. If instead you use DVD Shrink on a higher bitrate encode, but without first doing denoising, Shrink will create all sorts of coherent noise artifacts where the noise persists for each GOP (group of pictures), then shifting at the next "I" frame. It is really nasty.

While I am not a fan of Neat Video, most people in this forum swear by it and it would certainly be the right tool to try if you want to explore what noise reduction can do.

I do VHS conversions for clients all the time, and always use noise reduction no matter how much or how little material I am going to put on a DVD.

Finally, if you have access to a higher-quality MPEG-2 encoder, that can sometimes help. For really low bitrates, like what you are attempting, I use the external MainConcept encoder. It has additional very advanced settings that are designed to modify the encoding process when using low bitrates. There are other even better MPEG-2 encoders that permit more than two passes and also let you customize bit allocation so you can ensure that certain critical portions of the video are encoded at the best possible quality.

Grazie wrote on 8/17/2013, 2:22 AM
As always, John, you write with years and years of hard won experience and not a little understanding of where "others" are at in their video careers.

If I had noticed or been made aware of the issue of noise from rendering I would have used NV prior. But less is more with NV - no need for that PanCake look. I can leave that to another FX I have.

Grazie

willqen wrote on 8/17/2013, 2:37 AM
JohnMeyer, Can you tell us what the mpeg-2 encoders are that you use?

I also do VHS conversions for clients and it is a significant part of my business.

Since you do not favor neat video for video noise reduction, what do you use?

I am hoping you will share with us your preferences.

I have enjoyed and respected your advice in these columns for years. You are a great resource for all of us.

Thank you,

Will
PeterWright wrote on 8/17/2013, 7:28 AM
As usual JohnMeyer you're spot on, and you've inspired me to get the "spots" off.

The words that got to me were:

"VHS video is full of noise and when video contains noise, most of the bits get wasted trying to chase all those little noise dots around, and very few bits are left over to encode the actual video."

I haven't done a VHS - DVD job for a while and had forgotten that I have Neat video, so I reinstalled it and I'm now remaking the DVDs from scratch, with noise reduction. Not sure what you use for NR John, but the difference Neat makes is another world. I'm also reducing the length of each DVD to nearer 90 mins so I'm doing 5 DVDs instead of 3.

I'm not even asking the client if they want this - I'll tell 'em!

Thanks again John, and this great forum.
musicvid10 wrote on 8/17/2013, 8:25 AM
"But less is more with NV"

+1

flyingski wrote on 8/17/2013, 10:08 AM
As always John explains it so well. I too would like to know what NR you use.
johnmeyer wrote on 8/18/2013, 4:13 PM
First of all, thanks for all the kind comments.

Second, everyone should take to heart Grazie's excellent comment that when it comes to noise reduction -- especially when done with Neat Video -- less is more. No matter how many times I use noise reduction, I always initially use too much because it is always such a welcome relief to see all that nasty noise disappear. The problem is, that when you start to look more critically, you start to see that the "pancake face" or "clay face" effect that Grazie mentioned, and you may also see other things disappear.

Next, several people asked what external MPEG-2 encoder I use. I have several, but I'm most familiar with the MainConcept external encoder. At its core, it is the same one built into Vegas, but it has a few more settings available. Rather than burden this post with a long description, here is a link to the settings I used for really low bitrate encoding (i.e., less than 3,000,000 bps average):

External MainConcept MPEG-2 Encoder Low Bitrate Settings

And no, you cannot use this with the built-in MPEG-2 encoder.

As for noise reduction settings, I've posted dozens of times in this forum about my "recipe" for improving VHS captures. My technique and technology for doing this has evolved over the years, and I wince every time I think of how crude my original attempts look now. I have tried just about every technique posted in this forum, including the oft-mention Neat Video. My objection to that, since several people asked, is that I think it removes too much detail, even when using relatively modest noise removal settings.

The best discussion about may of the noise reduction approaches happened about two years ago when a bunch of us tried to help Nick Hope with some underwater footage shot with the light available. Here is a thread I started after we were well under way with that effort:

My Latest Denoising Tests (thanks Nick!)

Some of the links in that old thread have disappeared, but here is Nick's original clip (right-click and "Save As" to download the file):

Fish Clip

Here is my attempt to denoise it with Neat Video:

Neat Video De-noising

And here was my best efforts attempt, using a lot of technology, coupled with a lot of beneficial feedback from others on the problems with my earlier attempts:

Meyer Denoising

I recommend lining up all three clips directly below each other on three timelines in Vegas, setting the project properties to match the initial clip (it's a PAL clip), and then muting or soloing tracks while continuously looping the video. Make sure to set the preview window to "Best, Full." Here is a VEG file that does this for you:

Fish Denoising Comparison

As that long thread shows, denoising is a balancing act between reducing the noise and introducing artifacts. Each noise reduction technique introduces artifacts specific to that technique. Spatial techniques reduce detail. Temporal techniques introduce noise coherence (where the noise no longer dances around, but appears to move in unison) or a screen door effect (where the video looks like it was taken through a door or window screen). Frequency domain techniques have their own problems. As described in the thread above, really good noise reduction often requires attention to not only the noise reduction itself, but also related problems like contrast, brightness, and gamma.

Finally, while I have posted this before, the following is the AVISynth script that I use as a starting point for any VHS noise reduction. I never use this script "as is," and always tweak it to best match the problems of my source footage and the time I have to deal with it. The "commented out" sections of the script show some of the settings I use as alternates to the starting points shown.

#Denoiser script for interlaced video using MDegrain2
#John H. Meyer
#Copyright August 18, 2013

SetMemoryMax(768)

Loadplugin("C:\Program Files\AviSynth 2.5\plugins\MVTools\mvtools2.dll")
LoadPlugin("c:\Program Files\AviSynth 2.5\plugins\CNR\Cnr2.dll")
Import("C:\Program Files\AviSynth 2.5\plugins\Film Restoration\Script_and_Plugins\LimitedSharpenFaster.avs")

#The SetMTMode statements are for the multi-threaded versions of AVISynth.
SetMTMode(5,6)
#Modify this line to point to your video file and change field flag to match field order
source=AVISource("E:\fs.avi").killaudio().AssumeBFF()
SetMTMode(2)

#Use chroma restoration for analog source material
chroma=source.Cnr2("oxx",8,16,191,100,255,32,255,false) #VHS
#chroma=source.Cnr2("oxx",8,14,191,75,255,20,255,false) #Laserdisc

#Set overlap in line below to 0, 2, 4, 8. Higher number=better, but slower

output=MDegrain2i2(chroma,8,0,0)
#output=MDegrain2i2(chroma,8,4,0) #Better, but slower

#stackvertical(source,output)
#stackhorizontal(source,output)
#return output.Levels(16, 1, 235, 0, 255, coring=false) #This can help with 0-255 to 15-235 mapping. Always test.

return output

#-------------------------------
#This is the function for reducing noise on an interlaced clip, like a VHS capture

function MDegrain2i2(clip source, int "blksize", int "overlap", int "dct")
{

#Use non-zero values for Hshift (and possibly Vshift) if video has chroma ghosts
Vshift=0 # 2 lines per bobbed-field per tape generation (PAL); original=2; copy=4 etc
Hshift=0 # determine experimentally
overlap=default(overlap,0) # overlap value (0 to 4 for blksize=8)
dct=default(dct,0) # use dct=1 for clip with flicker. This works wonders but is unbelievably slow

fields=source.SeparateFields() # separate by fields

#This line gets rid of vertical chroma halo
#fields=MergeChroma(fields,crop(fields,Hshift,Vshift,0,0).addborders(0,0,Hshift,Vshift))
#This line will shift chroma down and to the right instead of up and to the left
#fields=MergeChroma(fields,Crop(AddBorders(fields,Hshift,Vshift,0,0),0,0,-Hshift,-Vshift))

super = fields.MSuper(pel=2, sharp=1)
backward_vec2 = super.MAnalyse(isb = true, delta = 2, blksize=blksize, overlap=overlap, dct=dct)
forward_vec2 = super.MAnalyse(isb = false, delta = 2, blksize=blksize, overlap=overlap, dct=dct)
backward_vec4 = super.MAnalyse(isb = true, delta = 4, blksize=blksize, overlap=overlap, dct=dct)
forward_vec4 = super.MAnalyse(isb = false, delta = 4, blksize=blksize, overlap=overlap, dct=dct)

#If noise reduction isn't working or "comes and goes," then change thSAD scene detection threshold
MDegrain2(fields,super, backward_vec2,forward_vec2,backward_vec4,forward_vec4,thSAD=400)

#UnsharpMask( clip , int "strength" , int "radius" , int "threshold" )
#strength: strength. The default is 64.
#radius: the scope of the blurring process. The default is 3.
#threshold: threshold. Absolute value of the processing component is greater than the threshold blur. The default is 8.

#unsharpmask(60,3,0) #This can sharpen the VHS video. Look critically for white halos is you use this.

#This is an alternate to unsharpmask. It is slower but can sometimes produce better sharpening results.
#limitedSharpenFaster(smode=1,strength=160,overshoot=50,radius=2, ss_X=1.5, SS_Y=1.5,dest_x=720,dest_y=480)
#LimitedSharpenFaster(strength=150) #Default strength=150

Weave()
} #End function MDegrains2i2

#-------------------------------------
# This function lets you re-size an interlaced clip
function IResize(clip Clip, int NewWidth, int NewHeight) {
Clip
SeparateFields()
Shift=(GetParity() ? -0.25 : 0.25) * (Height()/Float(NewHeight/2)-1.0)
E = SelectEven().Spline36resize(NewWidth, NewHeight/2, 0, Shift)
O = SelectOdd( ).Spline36resize(NewWidth, NewHeight/2, 0, -Shift)
Ec = SelectEven().Spline36Resize(NewWidth, NewHeight/2, 0, 2*Shift)
Oc = SelectOdd( ).Spline36Resize(NewWidth, NewHeight/2, 0, -2*shift)
Interleave(E, O)
IsYV12() ? MergeChroma(Interleave(Ec, Oc)) : Last
Weave()
}

#-------------------------------------
#This is a partially-tested function for removing VHS noise dropouts (tears)

function Remove_Tears(clip source) {

#Create mask
ml = 100 # mask scale
scene_change = 400 # scene change

super = MSuper(source,pel=2, sharp=1)

vf = MAnalyse(super,isb=false) # forward vectors
vb = MAnalyse(super,isb=true) # backward vectors

cf = MFlow(source,super,vf,thSCD1=scene_change) # previous compensated forward
cb = MFlow(source,super,vb,thSCD1=scene_change) # next compensated backward

sadf = MMask(super,vf, ml=100,kind=1,gamma=1, thSCD1 = scene_change)
msadf= sadf.Binarize() # binary inverted forward SAD mask

sadb = MMask(super,vb, ml=ml, gamma=1, kind=1, thSCD1 = scene_change) # backward SAD mask
msadb= sadb.Binarize() # binary inverted backward SAD mask

msad = Logic(msadf,msadb,"OR") # combined inverted SAD mask
msad = msad.Expand() # expanded inverted SAD mask
msadi = Interleave(msad, msad, msad) # interleaved 3-frame inverted SAD mask

Interleave(cf,source,cb) # interleave forward compensated, source, and backward compensated

#Two possible starting points for the DeSpot plugin
#DeSpot(show=0,p1percent=10,dilate=1,maxpts=400,p2=12,mthres=18,p1=24,pwidth=40,pheight=12,mwidth=7,mheight=5,merode=33,interlaced=false,seg=1,sign=1,ranked=true,extmask=msadi)
DeSpot(show=0,p1percent=3,dilate=3,maxpts=400,p2=6,mthres=9,p1=12,pwidth=140,pheight=4,mwidth=7,mheight=5,merode=33,interlaced=false,seg=1,sign=-1,ranked=true)

SelectEvery(3,1)
}


john_dennis wrote on 8/18/2013, 6:18 PM
When I observe your noise reduction efforts, I am most impressed that there actually seems to be more detail than the original. For reference: at 4:15 (time and frames), the spines in the dorsal fin of the fish in the foreground can hardly be seen for the noise, but removing the right amount of noise allows me to make them out.

The Neat version looks like plastic figures.

Good work.
johnmeyer wrote on 8/18/2013, 6:47 PM
there actually seems to be more detail than the original.Yes, that is often the case and is the nirvana of noise reduction.

If you want to see a mind-blowing example of this, take a look at this before and after from a transfer from 8mm amateur film. This is a single frame still shot. On the left is the frame before any noise reduction or other enhancement. On the right is the result of about eight different types of modification, including noise reduction. Look at the vertical support members of the porch railing!



So yes, properly used, these techniques can actually bring out detail that is obscured whereas when badly used they do just the opposite and kill details (watch the spots on the side of the fish in the Neat Video version).

One more thought: for me, noise reduction is NOT about reducing noise, but instead is about making the video more enjoyable to watch. Neat Video actually does the best job of removing noise and I think that is why so many people like it. However, I am not sure the resulting video is more watchable.

Grazie wrote on 8/19/2013, 12:27 AM
John: "One more thought: for me, noise reduction is NOT about reducing noise, but instead is about making the video more enjoyable to watch."

I agree too. I'm all about Outcome over Function - I aint gonna change. That is why I use iZotope RXII for better audio. What I like about iZotope is the User interface. Again, iZo recognises Outcome over Function.

John: "Neat Video actually does the best job of removing noise and I think that is why so many people like it."

Eh? - If I had your approach, in a "Grazie-Proof", iZo-type GUI, I'd be using that! Look at the bridle on that "horse's head"?!? Where did that clarity come from? Look at the "brick-work on that wall? Where was THAT in the "before" image? All of this fab detail adds to our watching experience. We're always looking for details, as it is details that can engage, stir us and ultimately move-us. Presently, for me, it is the "grin" from a long lost relative, just about visible through the murkiness of "early" VHS.

The "job" NV produces, uses a fairly easy GUI to achieve an almost instant attainable result. Now, if I could tweak NV to get the results, getting your approach, that would be the real monster success. But presently, all I can do is marvel and gasp at what you've been able to achieve. For me it's also about the pleasurable-watch too, PLUS the GUI to get me there. I use NV 'cos that's what I can manipulate. Likewise, for audio, I use iZoRXII for that very same reason.

John: "However, I am not sure the resulting video is more watchable."

Again, if I could get in NV what you've achieved, that would be the result I'd be wanting. Though I have a suspicion I will never be able to.

My real point, after all my stuff above, is I also apply the Less-Is-More paradigm to a GUI too.

Oh well, I can only hope . . .

Cheers

Grazie