Bob (Farss)... on the right track... (avchd)

blink3times wrote on 7/11/2009, 4:33 PM
A while back I mentioned that I was having trouble encoding avchd in lower light.... lots of compression artifacts, blocking, and shearing noise.

I thought it was purely the fault of the encoder while on the other hand you mentioned lighting and such..... You were sort of the right track.... I think it's a bit of both.

The blocking and other noise shows up mostly on non moving, solid colored things like back walls and such... which is where video noise is most recognized in lower light shooting.... and it's the noise that's tripping up the encoder. I've come to notice that if I apply just a touch of Gaussian blur to the clip (thereby blurring the noise), the blocking and compression artifacting dissipates to an almost unnoticeable state.

Comments

farss wrote on 7/11/2009, 4:58 PM
I didn't earn the nickname "The Noise Nazi" for nothing.

Noise confounds encoders and motion trackers. It steals bandwidth.
In your case I suspect the problem is further compounded by the macroblocking in the source. If the blocks do not align between the source and output things can get real ugly real quick.

Using GB is a crude way to reduce noise and feather macroblocks. Another crude tool I've used to fix noise and other problems is Motion Blur. Only works if there's little to no motion.

For a more advanced and free solution Mike Crash's denoiser is pretty good. Beyond that you need to pay. I think there's also some tools that will smooth macroblocking around.

To give you a simple example of how much noise impacts any codec that uses temporal compression. I've found it difficult to get a good outcome transferring really noisy VHS to DVD at 8Mbps CBR without a good noise reduction plugin and even then,,,, On the other hand I've encoded kiddie football with plenty of fast motion at 2.5Mbps and it looked just perfect. Difference is it was shot with a 1/2" SD camera.

Bob.
LivingTheDream wrote on 7/11/2009, 7:06 PM
Sorry to jump in as I know you were directing your post to Bob. Just wanted to mention that I've gotten some good results using Sony's Median filter to deal with video noise in dark AVCHD footage. The preset "light noise reduction" seems to work pretty good.

Steve
musicvid10 wrote on 7/11/2009, 7:36 PM
I've had good luck rendering AVC with Handbrake and using its Denoising filter at "weak."
Effective at reducing macroblocking in near-black areas.
Handbrake also encodes 25% faster than MC in my tests using identical settings.
Beware that the "Deblocking" filter in HB is pre-render only, so you would use it if your original MPEGs (or whatever) have the problem.
blink3times wrote on 7/12/2009, 5:34 AM
Thanks guys.

I've played around with various denoisers with varied results. But I have found what works reliably (and best) is plain old Gaussian blur set for vertical/horizontal at 0.003. This setting also seems to work best in PP.

Bit of a shame though.... if you set the track up for a G blur... you knock out ANY chance of "no re-compress" render

A question arises though....
The project preset comes with a blur setting where you can set up various blur types. Does this setting only affect the preview playback, or is it supposed to have an effect on the final render?

If it's supposed to end up on the final render...... it isn't.
farss wrote on 7/12/2009, 6:30 AM
The blur setting I think you're referring to in the project is for Motion Blur. You will notice the difference although it is subtle. In those settings the Gaussian refers to the shape of the fall off over the set of frames.
It has zero to do with Gaussian Blur.

To use motion blur you have to add a MB envelope to the Video Buss Master track and then set that for how many frame of it you want.

Bob.

PS, best noise reduction plugin I've found is a light :)
blink3times wrote on 7/12/2009, 8:09 AM
"PS, best noise reduction plugin I've found is a light :) "

Good advise Bob.... and thanks for the info.

I wonder though.... The mainconcept mpeg2 encoder doesn't seem to be anywhere near as sensitive to noise. In fact I almost never have to worry about the noise affecting the mpeg2 encodes. They ALWAYS come out cleaner than with the avc encodes. This is also true with the encodes in Premiere pro.... it's all pretty much a carbon copy between Vegas and premiere. The resulting encodes (and remedies) in PP are almost exactly the same as in Vegas. It can't be strictly an encoder issue since I'm using MainConcept in PP and Sony avc encoder in Vegas.... all with the same outcome. Could it simply be the avc compression scheme itself that is responsible for such lousy response to video noise?
MPM wrote on 7/12/2009, 4:14 PM
FWIW something I observed when Real & WinMedia were new kids on the playground that I think apply to their distant cousin AVC.

The way the compression schemes work, they tried to eliminate redundant data, more or less just like mpg2 recording changes in P & B frames, ignoring static data between I frames. Before post processing became normal for playback, they tended to be very aggressive too, & today it's still possible, particularly with winmedia, to see blockiness where it doesn't record changes that it should -- a key frame shows up & bam, you've got a jump, with all that change happening in 1 frame, then nothing till the next key.

There were/are 3 ways to ('least partially) cure it encoding, & maybe 2 to prevent it that I was ever aware of. One way to prevent it, at least partially is plenty of light, since it's the light & most importantly shadows that usually creates the motion on the backgrounds to begin with. Another that helps is recording more data to start with.

When it comes to encoding, one reason for the history lesson was that Real decided the best way to fight it was to soften the backgrounds -- you can see it today & it works well enough that Vegas has traditionally always softened wmv it encodes. Real in effect masks the main subject in the frame & blurs the rest.

Another way that's been partially incorporated into wmv encoding over the years, is to lower the max & up the minimum bit rates, since those jumping backgrounds are the result of a too aggressive encoder. Won't help with the Sony, but the MC at least gives you average & max. Freeware normally gives you average & max.

And the 3rd way was/is more appropriate for web video than HD, but looks better than jumping blocks at any rate, & that's to add enough motion that the encoder says hey, I better record that. How you add motion is up to you, but I found something more like random particle noise better than other sorts, perhaps a very small amount of film grain? If the background's in one part of the scene, there's always masks &/or keying. Before Vegas was born I used to use an intermediate encode with PicVid set to lower quality. ;-)

Noise is motion is always less efficient. The encoder creates blockiness dumping data, recording less data to make a smaller file. When you have blockiness it figures (wrongly) that the background wasn't changing enough to warrant the bandwidth to save it, & that bandwidth would be better used elsewhere. OTOH, forcing the encoder to save the background isn't any less efficient than if it had recorded it's motion to begin with. Best remedy is to shoot in only perfect environs with perfect equipment -- since few ever get that, you'll not have any video to work with, so no problems what-so-ever. ;?P
farss wrote on 7/13/2009, 12:41 AM
Pretty much in line with what I see happening.
Just getting back to Blink's issues. I believe that Vegas and Ppro both use the same MC codecs so no great surprise that they perform similarly.
Worth mentioning that the thrust of development for the later mpeg codecs was not to improve maximum quality, rather it was to get good quality with lower bandwidth. The rider I would add is this is the Motion Picture Engineering Group. Their focus would be on the pointy end of town i.e. encoding high quality images so they could be delivered as cheaply as possible.
I suspect that what happens with AVCHD cpmpared to mpeg-2 is it's efforts at trying to reduce macroblocking is thwarted by the noise and the end result is worse than if it hadn't tried at all. With mpeg-2 as MPM has noted what can end up happening is you get a frozen noise pattern for the duration of the GOP. I find this quite visually distracting.

One avenue you could also try to reduce your noise / blocking problem is crushing the low lights / blacks using the color curves. I've had some joy with this and old stage shows recorded to ancient VHS.

With you camera you may get some benefit by forcing the exposure a bit lower. If using auto exposure try offseting that down by -1 or -2
or if your camera has it switch to Spotlight mode.

Bob.