Log in

View Full Version : How to avoid those rounded lines?


xara
26th August 2005, 22:20
Hi!

I really did a search for this, but if it was already answered I promise I'll flagellate myself :(

I'm capturing satelite broadcast (PAL-M) with S-Video cape, using AVI_IO, Huffyuy, 720x480 resolution.

Below are 2 samples from VirtualDub/AviSynth:

Input pane:
http://www.duna-design.com.br/p2p/wave-input.jpg (190 kb)

Output pane:
http://www.duna-design.com.br/p2p/wave-output.jpg (160 kb)

My AviSynth script:
AVISource("I:\cap\capture_14.00.avi",...
Trim1=Trim(0,149)
Trim2=Trim(2281,27123)
Trim1+Trim2...
AssumeTFF()
KernelDeint(order=1, sharp=true, threshold=5, map=false)
FFT3DFilter(sigma=3)

Is this a capture issue involving my satelite signal or my tvcard or even the AVI_IO software settings?

Or this is a ordinary problem only solved applying post-processing filters ?
I`ll be thankful if you could point which filter I should use. ;)

thanks in advance http://www.duna-design.com.br/Baboo/thumbsup.gif

Boulder
27th August 2005, 16:01
Try saving a regular snapshot instead of screen capturing. Video->Copy source frame to clipboard and then paste the contents of the clipboard to any image editor. You are probably just seeing something that's caused by VDub's playback (dithering).

xara
27th August 2005, 20:47
This is a frame copy from VirtualDub in the original resolution (720x480):

http://www.duna-design.com.br/p2p/wave-frame-copy.jpg

In this resolution, those weird pattern are barely seen.

But when I play in full screen (WMP or MPClassic) they are there.
The problem only happens in a gradient pattern at full screen, as shown in my first post.

I dont know...I'm quite sure this is some detail's setting in AVI_IO source video, although I have already tried many combinations. This doesnt happened before, when I used to use a Composite cape.

tks for answer

Boulder
28th August 2005, 08:27
Could you upload a short *unprocessed* sample clip somewhere, for example at yousendit.com ? You should also post your capture settings, codec settings etc, they might help.

xara
29th August 2005, 00:25
I try to do that but to reproduce the problem I must keep the aspect ratio and the frame size. For just 5 seconds, the sample reach 19 MB. This is too much.

Anyway, I keep searching and find another post about "colorbanding" and figure out that this problem have no solution.

I have to capture without it. There is no post porcessing solution.
So I'm trying iuVCR that seems to deal better with color space.

Anyway, thank you for your atention.

mic
29th August 2005, 19:27
I think what Boulder was trying to suggest, is that the problem you see is in the windows of VirtualDub only -- not in your captured video. Getting a look at your actual capture would let Boulder confirm this.

For what it's worth, there are different color depths for pictures - a GIF file might have as few as 8 or 16 colors, while a picture taken by your camera might have millions. The picture you posted looks like there are fewer colors used, so you see where one color ends and the next takes over. This can happen in V/Dubs preview windows if set to 16 bit, or it can happen with video files if set to certain codecs & settings.

xara
30th August 2005, 00:25
Ok then. Any help will be appreciated.

Here it is:

Sample Cheetah (http://www.duna-design.com.br/sample_cheetah2.avi) (1,2 MB)

I load de following script in VD:

AVISource("I:\temp\logo_animalplanet_elefante.avi...
Trim1=Trim(0,149)...
Trim1+Trim2+
AssumeTFF()

My AVI_IO settings:

http://www.duna-design.com.br/tvcards/aviio_source.jpg

http://www.duna-design.com.br/tvcards/aviio_format.jpg

And this a VD setting:

http://www.duna-design.com.br/tvcards/vd-color.jpg

It covers 17 sec footage (510 frames, 30 fps)
I have to encode it to XviD (single pass),
You will not see the problem in this sample. At least not as the same as my first post. I dont have any idea why :mad:

Boulder
30th August 2005, 06:42
You will not see the problem in this sample. At least not as the same as my first post. I dont have any idea why :mad:
Try adding ConverttoRGB() at the end of your original script and open it in VDub. Do you still see the banding? If not, then it's just a display glitch as I originally thought (and what mic also said) and no need to worry about as the encoded XviD is just fine.

Inc
30th August 2005, 22:00
It seems that these stairsteps are mostly in the chroma channels.

Do use converttoyYV12.histogram(mode="levels") and watch if there is a constant upndown pattern in the chroma hsitograms, means "histogram lecks".

xara
30th August 2005, 23:10
Thank you guys, it works!

I did convert to RGB and in the input panel there was no change, but in the output panel the banding completely desappear, even if I manualy resize the pane to 1600x200. Assuming that will be the data in output panel that will be encoded... problem solved.

I did convert to YV12 too. And there was a significant improvement. The histogram did show a upndown pattern, though negligible...almost imperceptible, at least to my eyes. But the image still retain some stairsteps in the gradient color.

I'll keep the RGB solution.

I was told that this colorspace swaps ends up in data loss.
I'll see that when I encoded the entire footage to Xvid.

I must say thank you again Boulder, incredibile and mic.
I own you this.

Boulder
31st August 2005, 07:22
You only need to convert to YV12 if you encode in XviD.

We have been trying to tell you that the banding really isn't there, it just shows up in preview. Use ConverttoYV12(interlaced=true) for interlaced material as the last item in your script. Do not convert to RGB because XviD will go for YV12 anyway.

xara
1st September 2005, 01:27
Thanx.
I understood.