Line jitter in HiRes stills

farss wrote on 12/21/2004, 2:48 PM
Just finished off a DVD that's 100s of hi res still. It's 16:9 PAL, going out for replication today so it's a bit late to fix this problem now but would be good to have a definative answer for the next one.
Problem is with fine horizontal detail. On normal TVs this produces very bad jitter on the edges, it also seems to affect the chroma component as well, adding a bit of sparkle to the edges.
Now I know this has come up before and many have posted 'fixes', myself included. I've tried 'Reduce Interlace Flicker' and that has zero impact on the problem, I know dialling in very small amount of Gausion Blur in the vertical direction will also fix the problem but that hardly does much for the image quality.
I was prepared to put up with this issue and deal with it as best I could but now I've got a very high profile client and I need to turn out a serious product, not something fudged up so it sort of works.
I'd really like to see a definative answer as to why this problem exists and how to deal with it, I know I can point a video camera at the same subject and get a rock steady image. Why is Vegas unable to do this when working from the same scene and given a better quality image to start with do I end up with a worse quality image?
And before anyone jumps to the wrong conclusion, I know about moire issues with video, I've seen enough of them to know this isn't the same problem.
Even if there's no official 'fix' at least an explaination that's technically sound would be a good start, these guys pretty well define the standard for broadcasting in this country, so unlike my other clients there's no blinding them with 'science' if you get my drift.
Bob.

Comments

Spot|DSE wrote on 12/21/2004, 4:42 PM
The whole reason this happens is in the downsample. Doesn't matter if it's a high resolution still or a high resolution video file. Capture a Camtasia stream at 1600 x 1024 and see what happens on an external monitor. Same thing. If it contains exceptionally bright color contrasts, it's even worse. It's the nature of the downsample beast, but I think you already know that. Taking a high res still that's say...4k x XXX or higher, and dropping it down to 720 x 576, it's gonna shimmer and moire. Which is why the horizontal blur and unsharp mask tend to help things out a bit. I've also found that putting black behind an image and reducing opacity by 2% helps tremendously in this sort of situation, but it makes for hellious render times.
Another "fix" is to layer the stills on top of themselves, and reduce opacity by half or near half. Doesn't do squat to the image quality, but helps cut the shimmer.
Of course, your problems are PAL, so I don't know if my NTSC fixes are gonna help, and you already know the drills that I know anyway.
It's not just a Vegas thing, it's an AE, Premiere, and most other tools thing too. Read the FCP forums on the DMN, this was recently a "Hot Topic" at DMN as well. For FCP.
One thing you can try, is rendering progressive, and seeing how it looks when interlaced later down the road. Or render to 4:2:2 YUV first, then step down to 4:2:0 for final delivery. Longer render, but stepping the compression drop down a bit should help.
I know this isn't the answer you're looking to give the client, but all in all...it's the truth, but you already knew that.
farss wrote on 12/21/2004, 5:17 PM
SPOT,
thanks a million. As I don't have AE or FCP you've given me what I needed, a point of reference, at least I can look these guys straight in the eye and know that they know I'm not pulling the wool over their eyes.
I was doing OK with the division that I normally deal with but lately they've been calling in the Big Guns from broadcast to look at some of my work. I wasn't worried while it was only being looked at on an 'average' TV but the Big Guns have very serious kit and even though they turn out some total c**p themselves once they know it's not 'inhouse' they'll find ANY defect they can with it.
On top of that I've built a good reputation for myself (and Vegas!) doing a lot of audio work for them, I want to build the same reputation on the video side.

Thanks again for the feedback, makes me sleep a little easier.

Bob.
vicmilt wrote on 12/21/2004, 5:58 PM
One other thing - the single line jitter problem has been with us since the first computer graphics - basically it's a two field trying to resolve a single pixel problem - the fields "dance" -

If this particular situation is in any type of graphic (where it ususaly abides) you can export the frame - thicken the line in Photoshop - and re-import the frame. It will absolutely solve the problem.

Pain in the butt - sure - but that's what you've got to do, to get the respect of the "big boys". Just don't tell them how you did it - say you've got some "proprietory software" that you wrote for the project... and let 'em sweat. If you've got 50 to 100 stills you might give this a try - it'll go a lot faster than you imagine - it's really a matter of your patience, persistance and willingness to do "anything" to keep the client. I'd definitely give it a shot BEFORE the presentation, to see what time it takes. Then I'd present a before and after of a typical frame or two, (proving that you know how to fix it), and a budget based on your time.

If your thin dancing line is in live stuff, and not on a tripod, well... you are stuck.

In the "big time" we'd use a Flame ($250,000 and UP to buy - or $750/hr to rent) or we'd even rotoscope the scene to fix it. That's how you get the "look" of professional footage and also, how you get the average TV commercial 30 second spot to cost $217,000 - EACH.

I've seen what you've been writing on this site for a long time. Don't be scared - the in-house boys don't know MORE than you - and probably don't know as much. Don't admit any problems unless confronted, and then just say that's an NTSC (or video) problem. DO NOT POINT OUT THE PROBLEM and then mumble some crap about - well, anything. That's the hardest part of being a "real" pro - just keeping your mouth SHUT.

If they INSIST on fixing the problem, tell them you need the budget, and quote the $750/hr rate. (If you're really scared about losing the client over this... check out a local "high end" effects shop and get an estimate in writing - bring it along, and present it at the appropriate moment.The problem will immediately disappear.

Good luck - you'll be fine!
Laurence wrote on 12/21/2004, 8:03 PM
I get around this problem by working on the photograph in photoshop rather than messing with it in Vegas. Here's what's going on and what to do:

The problem is horizontal detail which shows up on one line but not the next. When it is interlaced on the TV, that means that it disappears and reappears as the interlacing alternates between odd and even lines and that detail disappears and reappears. The problem is always just on isolated areas of the picture and not the whole thing, so when you blur the picture you lose detail on the rest of the picture where you're not having problems.

The fix is easy: open the picture in photoshop. Duplicate the single layer so you have two identical layers. Blur the bottom layer a little vertically. Use the erase tool to erase just the problem areas of the top layer. Merge the two layers and open the new picture in Vegas. Voila, a picture that looks almost exactly the same but is blurred a little on just the problem areas. Using a TV as a second or mirrored monitor makes this process really easy. It also makes color correcting photos for video really easy as well.
Laurence wrote on 12/21/2004, 8:06 PM
Another way to do it. Instead of blurring the bottom layer, use the "deinterlace" line doubling filter on the bottom layer. Then erase the problem areas of the top layer, merge layers, save as a new file and import that edited picture into Vegas.
Laurence wrote on 12/21/2004, 8:13 PM
Another place you have this problem is with photos shot on fixed focus cameras, like the disposables a lot of people use on vacations and mission work. The problem is that detail like leaves on trees in the background is in focus and flickers during zooms. Again in Photoshop, make a second layer. This time blur the bottom layer with a gaussian blur so that the whole picture looks a little out of focus like the background would be on a good 35 mil shot. Erase everything but the subject in the forground of the top layer. Merge the two layers, save the file and import the new picture into Vegas. Not only will the background flicker be gone, but the photography will look better.
Laurence wrote on 12/21/2004, 8:45 PM
In the initial post Bob mentions that he can "point a video camera at the same source" and not have the flickering problem. That is true and here's why: Interlaced cameras average odd and even lines to get a little more gain. They do this at the price of horizontal resolution though. The line averaging is done to brighten the image but it also acts like a little (25%) vertical blur. That is why you'll never get this problem with interlaced video footage. What about progressive scan footage? The only interlacing is done with the 3:2 pulldown algorythm so you don't need to worry about it either. It's only hi res scanned photographs, and it really isn't Vegas's, or any other Video editing software's fault. The only reason it is prominant in Vegas is because Vegas was the first (and still the best) at manipulating still photos. As other editing software catches up, it is running into the same problem.
farss wrote on 12/22/2004, 5:10 AM
That's a very good point, I knew about the line averaging from a Panny technical paper, never thought about it in this context though. You can certainly run into major problems with real video footage, I saw one a only last week. For some reason this school performance had all the kids dressed in this reflective material that had some ferringbone pattern in it and the whole shot of the big finale just exploded into a mass of moire patterns. The result was so dramatic as the camera zooms in I was thinking you'd never get the effect if you wanted to, quite amazing.
However what I'm seeing happen with still images is a somewhat different effect, pardon me for pushing this point but something doesn't quite add up here. If this is simply an interlacing artifact issue the it should be occuring at the field rate, for PAL 25Hz. But I'm seeing artifacts with a much, much lower period than that, possibly seconds in duration. Now this could be a human factor throwing my observations off, I really cannot be certain. But I'm seeing a sparkling effect that isn't even particularly regular in nature.
Now this maybe a bit more complex, it may well go to how the composite video signal is encoded and then decoded by the TV/monitor. The chroma component is a fairly narrow bandwidth signal, phase encoded against the color burst from the little I know. I do know that this process isn't goof proof. The decoders can be fooled unless they're well designed, by high frequency luminance components, into thinking there's chroma information and this gets decoded as such.
Just getting away from the specific issue, I think this is why sometimes a completely black and white can end up being displayed on a TV as having colored fringing.
Putting all this together, perhaps this isn't just as simple as progrssive scan Vs interlaced. We don't see the issue on the internal monitors for two reasons, firstly because they're not interlaced, but also because the signal isn't going through a composite feed.
So I'm going to try an experiment tomorrow, hook my better DVD player up to the TV via RGB and see if that makes any difference. What SPOT had to say really got me thinking. He says this issue also affects downsampled HiDef footage and I think he's right. But, much of the content down here is shot in HiDef and downsampled for the SD channels. I've not see a single pixel out of place in any of this footage. Now there's two factors at play in this scenario. Firstly our decoder feeds RGB to the TV and secondly the downsamplers that the networks cost very large sums of money. I'm betting the guys who designed those boxed knew about this issue and have a lot of smarts to take care of it, something way more complex than just simple smoothing.

So I just tried this DVD going RGB from player to TV. The chroma twinkles have gone, I'm now just left with bad strobing and not just with horizontal detail either. One photo is of a lava flow and pretty well the whole frame strobes badly, I'm going to try to fix this, before I though the issue was a minor annoyance but looking at it now with a better setup what I'm seeing is plain unacceptable.
I'll try some of SPOTs ideas, going through each still when there's 100s of them isn't really an option given the time constraints and I can see no rhyme or reason to which one are affected.
Bob.
Laurence wrote on 12/22/2004, 7:31 AM
100s of photos - I can see your point. I wonder if some of the deinterlacing filters or techniques would help.
farss wrote on 12/22/2004, 7:32 AM
I've tried SPOTs suggestion of lowering the stills opacity to 98% over black and it helped a little. Tried Gaussion Blur in Vegas but at the lowest setting (.001) it stills hits the image quality pretty hard. This is odd, it seems the FX is applied after downsampling, maybe this would work if I ran the project as 1080 and then downsampled that. Might give it a try.
Tried using blur in PS at 1.1 px and 2.0 px on original HiRes jpg. 1.1px reduces it by about 50%, at 2.0px problem is gone completely.
Time to sleep on this one, just checked emails and client wants us to run 500 copies asap, yipes, I've only got a 3x tower and a 1x printer, looks like the family will be working shifts over Xmas. Did I mention my trusty reference DVD player just died as well? Years of reliable service and just snuffed it in the middle of testing this DVD.
Actually that's good news, something always dies in the family around Xmas, at least I can replace a DVD player.
Bob.
imageshoppe wrote on 12/23/2004, 3:52 PM
The simple answer is to apply your blurring vertically only. Programs like AfterEffects and Digital Fusion can separate the horizontal and vertical blurring parameters. I do this all the time with hi-rez stills, and it's the perfect solution.

This should be standard issue in Vegas, as so much work is done with still montages with this program, and would be a pretty simple coding change.

I brought this very point up to the Sonic Foundry guys back at NAB 2 years ago when they introduced support for the Panasonic DVX-100, as this camera can shoot with full rez vertical detail, which can buzz on fielded video displays.

Now with Vegas so useful for doing down-converts from HDV, this feature is a must have for the next release.

Regards,

Jim Arthurs
farss wrote on 12/25/2004, 6:47 PM
Just reading some very technical posts, DV has a limitation of 360 cps . This has to be enforced by either the CCD/optics or low pass filters. I've had a DVD for some time that has footage downsampled by the mpeg-2 converter, that was taken on HDCAM and Varicam, shot by a good cameraman too.
It is simply stunning, anyone who thinks that SD DVD is ho hum needs to see this stuff out of a top line player going RGB into a good monitor, it's stunning.
Anyways, the point here is there's not a single bit of aliasing, not a pixel out of place. So it CAN be done, you don't have to fudge it throwing away resolution. In fact from what I read the more resolution you have to start with the better, not the worse, as seems to be common wisdom. The more resolution you have, the better the filters that can be employed and yes the final output will look better.
This make sense to me, if I feed an image at 3000x2000 thats 4:4:4 into Vegas and encode to mpeg-2 it should look as good if not better than downsampled HiDef and should look way better than anything out of a Varicam, glass not withstanding. I've been able to do it with much higher res stuff from extremely high res targa files and apart from V4 nearly having a seizure the results were stunning and again no aliasing but the display device was progressive scan.
So I think the question really is does Vegas use low pass filters when downsampling, if so how good are they? I'm well aware it's pretty likely every other NLE doesn't cope with this any better, if not worse, than Vegas but if the Sony guys can crack this one I think that'd be a huge boost to it's reputation. Perhaps all that's needed is a new FX, a 2D low pass filter for video. It'd probably be a monster to code and render very slowly but if you want quality, it comes at a price.
Bob,
Rain Mooder wrote on 11/12/2005, 6:43 PM
I've been annoyed with the shimmering with the lines in Vegas and
it just dawned on me what was going on. Vegas (and premiere and ...)
aren't doing any anti-aliasing when the crop or Track motion is used.

Anytime you use a high resolution source (still photography/HD) it's
going to be slightly wrong until real anti-alias filtering is done in Vegas.

Somebody at Sony needs to read an intro text on resampling theory!
Or at least Wikipedia http://en.wikipedia.org/wiki/Anti-aliasing_filter

You can't just bicubicly resample the input pixels into the output without
doing some anti-aliasing. The problem is worse with 3D Track effects that spin a still/video about the x/y axis because then they should be doing anisotropic or trilinear filtering too.

If you are not doing 3D track effects, you can simulate an anti-alias filter by
using a gaussian blur but how much you should be blurring is dependent on
some math which is a bit subtle and that someone should come up with a
rule of thumb for.

Or just add blur until the aliasing goes away. The blur will make things less contrasty at first, then it will be about right and if you continue you might go overboard and blur it too much. If you are doing a zoom change effect (and
not just a pan and scan) the amount of blur to use depends on how zoomed
in you are. The less you are zoomed in the more blur you will need.

Maybe I can find another program that does antialiasing right to use on my
montages. I bet that Shake etc. does. Not surprised that Premiere doesn't
but After Effects ought to.
Rain Mooder wrote on 11/12/2005, 7:05 PM
It gets worse.

If you use the event crop to pan/zoom your stills, the pan resampling is
applied before the event effects. So there is no way for one to add a blur (a pseudo anti-alias) before the crop/zoom/pan resample.

So you have to add your blurs manually to the high rez source footage through photoshop or equivalent. If you place your blur as an event effect you are just bluring a shimmering/twinling un-antialised muck and that doesn't
do anything to solve the underlying sampling problem other than to make
the output result blurry.

If you are doing your pan/zooming using track motion you are still good, just
add the blur as an event effect and it will be pseudo anti-aliased before it
gets to the track motion resampling.
johnmeyer wrote on 11/12/2005, 7:13 PM
This is definitely an area where Vegas could be improved significantly. In the meantime, rather than spend hours (for 100's of photos) blurring them etc., my recommendation is to downsample the photos, outside of Vegas, prior to importation. You should downsample to a resolution that exactly equals your project resolution, multiplied by the maximum zoom amount you plan to use for any given photo.

For instance, suppose your camera creates 3000x2000 images (like my Nikon D70). My projects are all NTSC DV, so my project setting is 720x480. Now, if I didn't plan to zoom, I'd want to reduce the resolution by about 4:1. If I was planning to double the size of some images, through zooming in Vegas, then for those images, I'd only reduce the resolution by 2:1. Remember, most photo programs have two controls: one reduces resolution, the other merely changes the "dpi" setting. The latter doesn't change the files size, and so is NOT the one you want to use.

I have found that by doing this step, I can eliminate about 90% of the flicker. On problem pics, I then apply the lowest level of Gaussian Blur, and only in the vertical direction (no need for horizontal, no matter what blur you use). I also apply Reduce Interlace Flicker to all pics using a script. I used to think that this didn't help, but I did some tests many months ago and found that it really did help, and didn't seem to have any major downside.

Improving the downsample for stills is number one on my Vegas 7 feature request list. There sure have been a lot of posts about this over the years.
farss wrote on 11/13/2005, 3:50 AM
I think two issues have been confused here, line twiter and aliasing are not the same thing.
Line twiter is only an issue with interlaced video, hopefully a problem that will die along with interlaced video. This isn't a problem unique to Vegas, I watch a lot of off air video that's HD downsampled to SD and I still this problem despite the downsample being done in hardware boxes that cost about as much as my house.
Downscaling the res of stills is really a bit of a cludge, that's a bit like applying a 1st order low pass filter to audio just so you don't hit the Nyquits frequency, yes it'll stop aliasing but it'll throw your highs for a six as well. Audio design gets around the problem by oversampling so that very sharp digital filters can be used.
This could be done with video as well, problem is render times increase by orders of magnitude.
The aliasing issues with 3D track motion I don't think are solveable, you can only apply AA during vector to raster conversions. It could (should?) be done on the edges of the 3D objects but I don't see how it could be made to work on already rasterised images such a stills. Starting with still images at a higher res would help but then as noted you hit other problems. Where it should work and work well is on things like text that's generated within Vegas however here I think there's an issue, the text is rasterised and then that frame remapped in a 3D space.
For me that's why I never understood the logic of implementing all that gee wizz 3D stuff in V5, I tried it once and it looked so horrid I had to wonder why it was done at all. I've seen a whole promo reel someone did down here in Vegas that made extensive use of 3D track motion and on a big plasma it looked just ghastly, thankfully I think only they and I knew it was done in Vegas.
If Microstuff can kill of Mr Clip, maybe in V7 they can either get this 3D stuff right or take it down to the back paddock and...
Bob.
aldo12xu wrote on 12/29/2005, 8:50 AM
I've tried the various suggestions on this and other threads on how to correct the jitter within Vegas. (I haven't tried the Photoshop remedies.) Minimal vertical guassian blur seems to be the easiest and most effective method, with reduced resolution being the downside.

What I've tried was duplicating the photo track, applying minimal gaussian blur to the lower track and then I used the cookie cutter over the problem area(s) within individual photos. That way resolution outside the problem area is unchanged.

The only thing is that I can only locate the problem areas within the individual photos on the rendered .avi file. Is there anyway that the problem areas can be identified without rendering to .avi?
farss wrote on 12/29/2005, 1:03 PM
Yes,
hookup an external monitor.
Also I haven't tried this since V6 but in V5 running the project as 1080 adding the vertical blur and rendering directly to PAL mpeg-2 gave pretty stunning results with minimal loss of resolution.
V6 seems to have made some changes to how things work internally so I may need to revise my workflow post V6.
Bob.
aldo12xu wrote on 12/29/2005, 4:48 PM
Well, I'll be damned! Forget about going to .avi, just go directly to MPEG-2. When i did that, the end result was perfect......and that's without applying gausian blur or any of the remedies mentioned above!

So, out of curiosity, why would the .avi show the jittery motion when the even more compressed MPEG-2 does not?
musicvid10 wrote on 12/29/2005, 10:06 PM
Bob,
In addition to the excellent discussion, I wanted to add that I've always had the best luck sizing my stills precisely to the video output dimensions before adding them to the project, thus saving the variable of the editor's resizing algorithm. In fact, I ran some definitive tests on a competitor's product a number of years ago, and got pristine reproduction with exactly sized input, and mushy crap when the input files were even 4px off in one dimension. Not to say that Vegas is that bad at resizing, just that it's probably better to let Photoshop do what it's best at, and let your NLE do what it's best at (which doesn't necessarily include downsampling photos).
Also, while your at it, at little blur can do wonders for those shimmering horizontal lines, unless you've got true progressive from project through display.
farss wrote on 12/30/2005, 1:05 AM
Been there, tried that, nope, 5000 x 3000 res stills straight to mpeg-2 look sharper than downscaling in PS first. To be honest the very best of these stills just coming off DVD (RGB to TV) look ever bit as good as the off air material that's HiDef originated.
What makes my task a little more complicated is that not all of these stills are the same res or size and I am doing a little animation / croping on the T/L as these go into 16:9 projects. And yes these DVDs are for commercial sale and there's about 1,500 stills per DVD.
Line twitter isn't the only problem though, I've had a few stills that even spin out progressive renders, ever seen a still 'blink' at 1 Hz, that was a dramatic effect.