logo Sign In

Vdub and DVD Flickering

Author
Time
I recently finished a project, and have put it on DVD. Unfortunately,
there is flickering around any objects on screen that have a pattern to
it, as well as in other places to a lesser extent.


Workflow


Export HDV lagrith lossless file,

Downconvert and Sharpen in Vdub,

Encode in Hcenc,

Burn in Encore.


I have tracked the problem to VDub, I have a 30p file, but it
seems to split it into two fields. I have found no way to stop this
from happening, as I cannot seem to adjust field settings in VDub.



I export through Vdub because of the great video quality, since Adobe Premiere does a poor job. Does anyone have any ideas?

I have done this method with 24p files as wall as 60i, and have not had any problems before, its almost as though vdub doesn't recognize 30p.
Author
Time
 (Edited)

How about Filters-> field swap ?

 

If that screws things up, you could try Donald Graft's Reverse Field Dominance filter. (Put it in \VirtualDub\plugins).

 

And if that ain't it, a screenshot is worth at least 50 words... better yet, a screenshot with the downconvert filter, and the same frame without.

What's camera model, and what codec is it giving you? Maybe we could dig up something to parse the file. Have you used this HD camera for all your projects? If it's a different one, is the codec different? Maybe your resize filter, or sharpening filter hate the codec, or resolution, or somethng. Do you know if it's true 30p, or if the camera is playing some tricks, so that marketing can label it 30p? How did you decode the camera's codec into lagarith? Are you using Vdub or VdubMod, or...

Just spitballing, in case I catch your next post late, again. :)

One day I found... 10 years had got behind me. Next day was worse.

 

Download  shows from Cable DVR (Updated! Yes, it needs a rewrite, but it's worth slogging through, anyway).

Author
Time

I'm using the Canon HV30, which is true 30p from what I know.  It uses Mpeg-2 codec, specifically .m2t.   My last project did this as well, that was 30p also.  I did all my editing in premerie pro 2.0 then export an avi file with the lagarith lossless codec. I'm using Vdub 1.8

 

I'll try the filters you suggested, hopefully one will work.

 

I'll also post some screenshots later, thank you.

Author
Time

Yeah, the HV30 is a nice camera. Everwhere I look, they're saying genuine 30p.

 

I hope the filters work, because after that, I'm probably in over my head. :)

One day I found... 10 years had got behind me. Next day was worse.

 

Download  shows from Cable DVR (Updated! Yes, it needs a rewrite, but it's worth slogging through, anyway).

Author
Time

The filters didn't work, they actually caused the same problem, only twice as bad.

 

I'm about out of ideas.  I tried different versions of VDub, I tried different Mpeg encoders, I tried different codec settings. I belive the problem is in Vdub, because when I deinterlace in VDub, the flickering is gone.  Of course, so is half my resolution. 

 

I just tried resizing in After Effects, the same problem, thought to a lesser degree, probably because I didn't sharpen.  I don't understand this at all!  I will try different encoders again, but I had tried Adobe Media Encoder with a vdub file, and it still showed the problem the same as Hcenc.  I am extremely confused.  I'm too tired to continue tonight, but I'll post a video file tomorrow showing the problem.

Author
Time
 (Edited)

The a clip of the "after" would show me the problem. But do you also have a way to clip a piece of the original mpeg, before Vdub resizes it? You could post the clips to mediafire.

 

I have tools that could check the original HD mpeg clip for funkyness. For instance, I'm wondering if Premier is exporting it as 30p, or if it's trying to make it something interlaced. Or the tools may show something else strange. Does the problem show up before you resize? What's it look like when you step through it (unresized) frame by frame? Do you see signs of interlacing? Are you using an mpeg2 plugin for Virtual Dub? What resize method are you using?

 

Anyway, while you're waiting for me, you need to try substitutes for VDub 1.8. Maybe VirtualDubMod or VirtualDubMpeg or just an earlier version. Your's might have a bug that they didn't catch, because, for example, it specificly hits 30p at a certain resolutions.

 

And see if you can get some other way to capture from the camera (a free trial?). I know CapDvhs does some digital video cameras, if there's a "driver" for your camera. (I'd give you the links, but I gotta split).

 

We can figure out what's going on, sooner or later. The problem is, I suspect you're pulling your hair out, right now. You might be on a deadline. And I haven't had any experience with HD cameras, or their files, or Premier, or some the tools that people mention using for their HD cam files. You stand a much better chance of nailing down the problem, quickly, at Videohelp forums . When we blaze new trails in video editing, we go there to solve the numerous obstacles in our way. They are the best video techeads around. (Some of them write video tools). And they have a couple of forums about working with video from HD video cameras.

 

They are more cooperative if you search their forums, before asking. Of course, their search is broken, like most forums that tell you to search first. :) So when you don't get any real search results, repeat with their Google-search link (e.g. "Click here to search for 30p premier m2t using Google in our Forum."), and wade through Google's false hits, and end up with a lot more good hits than their own search engine found. :)

 

If you don't find anything by searching, you could post to a forum that seems to fit. Like "Advanced Video Conversion" or "DV / HDV".

They might ask for a sample clip, and you'll already be set. :)

 

Your familiarity with the videocam stuff would make it a lot easier to tell what's going on in their discussions. When I read one like this post, I can see they're talking about an m2v, which is a demuxed mpeg2 video file. But if they hadn't mentioned m2v, I wouldn't know if maybe they were talking about a .dv file. And I don't know if they're talking about editing or capturing.

 

Anyway, I'll try to help if you still need it. But it'll go quicker if we're both searching videohelp and stuff.

And I'd like to know how it turns out. Sometimes I never find out what happened, and it's unsettling, ya know?

One day I found... 10 years had got behind me. Next day was worse.

 

Download  shows from Cable DVR (Updated! Yes, it needs a rewrite, but it's worth slogging through, anyway).

Author
Time

http://files.filefront.com/Receptionavi/;10866783;

 

Here is a link to the uncompressed file, I couldn't upload the whole clip because of file size, but this is a uncompressed conversion (very short to keep file size down).

Looking through the video frame by frame, no sign of interlacing, there are also very little signs of the flickering.  I find the lack of interlaced to point away from it being a frame rate confusion issue, but since its fine when I deinterlace, thats why I wonder if there is an frame rate issue.  When I encode to mpeg 2 in Hcenc, it becomes more obvious, but Hcenc isn't the problem, as I've tried other media encoders with the same problem.

No mpeg 2 plugin for Vdub, just exporting before sending into Hcenc.  I am using Lancoz3 or Precise Bicubic, I never had a preference, both seemed to yield the exact same result.  I tried different versions of Vdub, Vdubmod, and VdubMpeg.  Same story for all of them.

I captured through Firewire, through the program HDVsplit, though I don't think thats the problem.

I'll check out the Videohelp forum, see what I can find.

Thank you for all your help with this. :)

http://files.filefront.com/Hcenc+Encodezip/;108681

Here are the files, in three stages, HD File, Vdub Downconverted File, and Hcenc Encoded File.  I recommend burning the Hcenc file to DVD, the problem seems to show up better on a Tv than computer screen.

Author
Time

You mean like the flickering on the shingles of that little gazebo thingy, and at the edges of white poles and lines?

That looks like "stepping", aka "stairstepping" and it needs some "anti-aliasing" aka "antialiasing".

That should be easy to search up a solution for.

 

That's not an issue of frame rates, or wrongfull interlacing. Although I could imagine how 60i and 24p could help disguize it (in two different ways).

 

It's a common problem with standard definition. The lines, in the patterns, are at angles to the tv's/monitor's scanlines. And the scanlines are "chopped up" into pixels. So the edges, of the pattern's lines look like stairsteps. As the camera moves around, the steps move around - hence flickering. It's still there, in HD, but because there are so many pixels, it isn't noticable.

 

Did you use the sharpen filter on downconversion for this clip? That'd make it worse.

 

It sounds counterintuitive, but, in a sense, you have to do something that almost un-sharpens the edges. Which would seem like the last thing you'd want to do for lower-resolution. You need the edges's pixels to be a blend of the two colors on each side of the edge... it's kinda hard to explain without a picture. I'll try to come back and edit in a link. Anyway, the human eye likes it, so it's ok.

 

I could swear I also see a stray blob of color on the shingles for a couple of frames, and maybe along that one tall, white vertical post. (The stepping might be overworking the encoder).

Unfortunately, the encoded clip is just too short for me to watch it on the dvd, it's slightly over a half-second.

Could you post a long, encoded clip, by itself? (If I haven't identified the problem, that is).

 

If I'm seeing the right problem...

 

I'll see if I can dig up a good solution for that. Avisynth might be your best bet, there, but I"m kinda green, on that subject. And there might be something simpler to learn.

One day I found... 10 years had got behind me. Next day was worse.

 

Download  shows from Cable DVR (Updated! Yes, it needs a rewrite, but it's worth slogging through, anyway).

Author
Time

The downconverted clip looked fine to me.

The MPEG2 encode suffered from bitrate starvation (macroblocking) around the bottom of the door; I think there is just too much detail in the image (that's an impressive camera, BTW). Tried my own encode using CCE at 6Mbps and got similar resutls to HCEnc, 8Mbps was slightly better but not much.

It would help if you could point out the exact part of the image you see this "flickering".

Guidelines for post content and general behaviour: read announcement here

Max. allowable image sizes in signatures: reminder here

Author
Time

http://files.filefront.com/Officiantzip/;10881035;

 

Here is a selection of different clips, about four seconds each.  I'll post some longer ones later if you like.

 

Your explanation makes a lot of sense Jaiman, I think your probably right.  Though any idea as to why deinterlacing has an affect on that? 

So I guess I need to dive into some research on stair stepping. 

In some ways this makes me sad, because the sharpening in Vdub was allowing me to retain about 90%-95% of the quality of the HD image.  Regardless, its a relief to have a better idea of what I'm looking at, a thousand thanks to you! Because it is related to the sharpening on downconversion, would it help anything if I sharpen before downconvert or after downconvert ? I guess not, but can't blame me for hoping :)

 

Moth3r, the flickering appears around any patterns or straight lines, but it is not near so visible on a computer moniter.  I must agree, the HV30 takes a beastly picture for the price. :)

Author
Time
 (Edited)

 

Marshallator said:

Here is a selection of different clips, about four seconds each. I'll post some longer ones later if you like.



Yeah, longer clips would help me figure out if we're seeing the same thing.

 

Your explanation makes a lot of sense Jaiman, I think your probably right. Though any idea as to why deinterlacing has an affect on that?

 

I could guess, sortof.... I could be laughably wrong. :)

But first are you deinterlacing to 24p or 30p? I hope it's 30.

I assume you still see some stairstepping on the edges of the vertical, but no flicker?

VDub's Deinterlace filter on "blend fields"?


Well, the big reason folks use a deinterlacer (if going from 30 to 30) is to kill flicker. So it might be that your problem is similar to what triggers a smart deinterlacer. It might resemble the mismatched fields, that they're looking for.


Or it might be that it's blending all the pairs of odd & even lines together. (That's the most common solution for flickering, only less destructive).

If it's being done to the source's lines, then I suspect there'd be no loss of detail. The resizing algorithm would just see softer horizontal lines to start from. OTOH, if it's doing that to the NTSC-sized side, then you're losing half the horizontal detail.

 

So I guess I need to dive into some research on stair stepping.



And I believe it might be called "jaggies", too. But that's not usually in relation to flickering.


I've searched. I didn't find much. Most are aimed at flickering in titles (mainly titles in dvd menus).


1) Gaussian blur - you blend out some of the detail in the HD source, before you resize. That'd take some experimenting to find the right radius.

 

2) Vertical filtering. (Broadcasters actually do this for 1080i). One guy suggests:
"Try a MOTION BLUR filter, with Angle = 90° and Distance = 1...4 pixels (depending on the strength of Twitter correction)."

 

3) Resizing from a large format to a small one.

You're already doing that, though. :)


You can also drop the contrast, but it looks, to me, that your contrast and gamma are great, now, for the overall picture. (I'm not as eagle-eyed as some people, though). The contrast trick is aimed at titles, anyway.


I was hoping to find some sort of intellegent filter, that would only operate on the flickering...


But you might be on that path, with deinterlace!

There are smart deinterlacers that detect flickering, and only work on the lines that need it. Also they "interpolate", instead of simply "blend". Bet you could find some as VirtualDub plugin filters. If you have trouble searching them up, I could take a crack at it.

I could be wrong about what interpolation is, it might make a mess. Or there might be settings that'll do what you need. And, as far as I know, it might, possibly, take some tweaking to get it to trigger on your problem. It'd sure be worth a try, anyway. (Settings often tend to be poorly documented, though).

 

I suspect you'd be blazing a new trail, so there could be some tedious experimenting involved.

 

In some ways this makes me sad, because the sharpening in Vdub was allowing me to retain about 90%-95% of the quality of the HD image. Regardless, its a relief to have a better idea of what I'm looking at, a thousand thanks to you! Because it is related to the sharpening on downconversion, would it help anything if I sharpen before downconvert or after downconvert ? I guess not, but can't blame me for hoping :)



Well, SD has a lot of limitations, and compromises. And, NTSC has a lousy picture, compared to PAL.


It's really something, to see how much you were able to pack into such a weak format, though.

Seems to be a tradeoff, though. Moth3r pointed out that even the encoders don't seem to be totally ready for the detail (although the effects seem minor, at least to my non-eagle eyes).

One day I found... 10 years had got behind me. Next day was worse.

 

Download  shows from Cable DVR (Updated! Yes, it needs a rewrite, but it's worth slogging through, anyway).

Author
Time
 (Edited)

My first question is what the aspect ratio should be. I'm guessing you are resizing to 720x480 (anamorphic 16x9), but it's a bit hard to tell if that's right from the sample.

The MOST important question is what are you using for your resize filter? If you are using something like bilinear you are getting aliasing artifacts from that (stairstepping along diagonal lines). Try the Lanczos3 resizer (it's the same as avisynth's Lanczos4resize), it produces a much cleaner result.

Finally, what sharpening filter are you using and why? I would never add a sharpen filter to this clip, it is absolutely beautiful. You are downscaling HD, you can't get much more detail into it than that. It will only cause more stairstepping and ringing artifacts.

 

Really just open it in VDubMod, add a resize filter (Lanczos3), 720x480 and frameserve right to your encoder. Don't do anything else and I think you'll like your results better.

Dr. M

Author
Time

I agree, I personally would not apply any sharpening.

When you say the flickering occurs around straight lines, do you mean lines that are near horizontal? If so, then the flickering might be introduced by processing in your display.

The Digital Video Essentials DVD includes a test pattern for checking that the full progressive resolution can be displayed:

This pattern is frame based and is one of several patterns in the program with full progressive video resolution. It will likely challenge the capability of many processors to up convert it to a true progressive image. If you see flicker in the progressive output of a processor it is most likely not set up to handle this much vertical detail. There should be no flicker in the progressive output if the processor can deal with full resolution in the interlaced image.


I have tested this pattern on various setups, one LCD TV I tried cannot handle it and does produce flicker. Can you describe how your player/display are set up and connected?

The simple alternative is to use AviSynth's blur command in the vertical direction only. (Generally, studio-produced DVDs are filtered, and do not have the full progressive vertical resolution - because some customers would complain about flickering. This is why HD downconversions can sometimes look better than the official DVD. Superbit DVDs are the exception, because they are aimed at buyers with higher-end AV equipment.)

Guidelines for post content and general behaviour: read announcement here

Max. allowable image sizes in signatures: reminder here

Author
Time

I have a progressive scan DVD player and a progressive projector (10' screen), so that is likely not the problem.

I have tried downconverting with both Lancoz03 and Bilinier, all have the same results. 

I did the downconvert without sharpening, tested it out, there is less flickering, but still a noticable amount.

Flickering takes place around both horizental and vertical lines.

When I deinterlace, the video is still 30 fps.  I'll post a video of how it looks after deinterlaced.  It seems a lot softer than what I would expect (i used blend fields).  Though since it is a 30p file, I'm not sure what the deinterlacer is doing.

I tried a gaussian blur on the video, it did help, but washed out a lot of detail.  I'll try the vertical blur later on.  I'll also look into other deinterlacing methods.

I'll continue to test various file settings, and I will post results from various tests as I do them. I'm going to be out of town for a week, but will do some more exploring when I get back.

I appreciate the help guys. :)

Author
Time
Marshallator said:

I have a progressive scan DVD player and a progressive projector (10' screen), so that is likely not the problem.


Just a quick test: whack THIS as a DVD-video onto a re-writable disc or something and try playing it. See any flickering?

Guidelines for post content and general behaviour: read announcement here

Max. allowable image sizes in signatures: reminder here

Author
Time

Since your source is progressive, deinterlacing is a waste of time.  Hmm.  You've got a real headscratcher.

I'd like to see you do a straight downscaling and post a dvd clip so we can see what's going on, rather than you just describing it to us.

Dr. M

Author
Time

http://files.filefront.com/SD+Standardzip/;1104988

Here are downconverted files, both with and without sharpening for comparison.

 

I tried the pattern file you sent me Moth3r, there was no flickering.  Also, flicker only appears to happen around motion, whether it be subject motion or camera motion.

I'll try a few more bluring type tests, but I'm running out of ideas.

 

 

Author
Time
 (Edited)

Is this what you're talking about?

If so it's called mosquito noise and it's a compression artifact. You can filter all you want, but it's coming from your encoder not your source.

Try lowering your quantizer characteristic (or your encoder's equivalent).

 

Mosquito noise, a.k.a. Gibbs effect
Mosquito noise is most apparent around artificial or CG (Computer Generated) objects or scrolling credits (lettering) on a plain coloured background. It appears as some haziness and/or shimmering around high-frequency content (sharp transitions between foreground entities and the background or hard edges) and can sometimes be mistaken for ringing Unfortunately, this peppered effect is also visible around more natural shapes like a human body. The VIRIS project (a Video Reference Impairment System) defines mosquito noise as follows: "Form of edge busyness distortion sometimes associated with movement, characterized by moving artifacts and/or blotchy noise patterns superimposed over the objects (resembling mosquito flying around a person's head and shoulders)."

 

 


View full size
Mosquito noise

 

It occurs when reconstructing the image and approximating discarded data by inversing the transform model (iDCT).

"Mosquitoes" can also be found in other areas of an image. For instance, the presence of a very distinct texture or film grain at compression will also introduce mosquito noise. The result will be somewhat similar to random noise; the mosquitoes will seem to blend with the texture or the film grain and can look like original features of the picture.

(From http://www.videsignline.com/howto/180207350)

Dr. M

Author
Time
 (Edited)

There does seem to be some mosquito noise, but that isn't really the problem that seems to appear on the projector screen, at least to my eye. What is a quantizer characteristic exactly?

 

http://files.filefront.com/Wedding+Ceremony+A+Camera2zip/;11075637;/fileinfo.html

 

Here is a video of the projector playing the video clips. The flickering artifacts are an accurate representation, not an artifact of the camera filming the screen. (Look at the officiants forehead, and the car's hood)

 

I will try a vertical blur next, and see what results that brings.

Author
Time

FUNKY! :O

I have NO idea what that is.

Dr. M