Log in

View Full Version : How to fix this line shaking problem??


Nosmas
1st September 2011, 04:46
Hi,

I have a source which has the problem "line shaking", I don't know how to properly called it. I don't think it is dot crawl because when you look at each frame independently, it has no problem at all. But when you look at it consecutively then you can see the line is "shaking".

I tried to denoise it but it doesn't help.

I have uploaded 3 sample clips which has the problem. (Unprocessed, No filtering has been done except IVTC and filtered)

the line is shaking very frequently during 00:01 to 00:05
and then after 00:05, you can notice a little bit line shaking by looking at the girl's hair.

Thanks in advance!!

Sample Clip:
Unprocessed original VOB sample: http://www.mediafire.com/?9b8cg4bbhafcpfy
No filtering:http://www.mediafire.com/?mv1o055ois977mk
filtered:http://www.mediafire.com/?q7x62udz0gu6yu3

poisondeathray
1st September 2011, 05:20
I would call it aliasing , and it's probably exacerbated by the resizing you have done (looks like you used a sharp resizer, as there is evidence of oversharpened halos)

One way to treat it is use QTGMC's progressive mode , perhaps apply it only to those sections that need it (maybe divide up using Trim() )

e.g.
QTGMC(inputtype=1 , sharpness=0.3)

Normally you would post an original unprocessed sample, and your avs script, because something you have done may have caused it (you didn't specify how you did the IVTC, or how you resized the video) , and there might be a better way to improve it

Nosmas
1st September 2011, 05:28
I would call it aliasing , and it's probably exacerbated by the resizing you have done (looks like you used a sharp resizer, as there is evidence of oversharpened halos)

One way to treat it is use QTGMC's progressive mode , perhaps apply it only to those sections that need it (maybe divide up using Trim() )

e.g.
QTGMC(inputtype=1 , sharpness=0.3)

Normally you would post an original unprocessed sample, and your avs script, because something you have done may have caused it (you didn't specify how you did the IVTC, or how you resized the video) , and there might be a better way to improve it

Hi,

I used animeivtc(mode=1) to IVTC, and I used nnedi3 to upscale and then used spline36resize to resize to 720p.

The oversharpen maybe because I used msharpen too strong. msharpen(threshold=4, strength=60).

I will post my filtered script and upload the original VOB sample soon so u can analyze my problem better!

And Can you tell me how to apply the section that only needs it? But anyway most of the scene suffers this problem, just some are weak and some are strong.

And one more thing, i thought aliasing is like jaggy edges because of upscale. But I don't see that in my source... Am I understand aliasing wrong?


Thanks!

poisondeathray
1st September 2011, 05:45
I only looked at the 1st video , it was 848x480

To apply a filter to segments, divide up using Trim and use aligned splice to join then

e.g.

Main = Mpeg2Source()

Main
Trim(0,100)
FilterA()
A=last

Main
Trim(200,300)
FilterA()
B=last


A ++ Main.Trim(101,199) ++ B


In this example, "FilterA" is applied to frames 0-100 , and 200-300 , but 101-199 are left unfiltered

Nosmas
1st September 2011, 06:05
I would call it aliasing , and it's probably exacerbated by the resizing you have done (looks like you used a sharp resizer, as there is evidence of oversharpened halos)

One way to treat it is use QTGMC's progressive mode , perhaps apply it only to those sections that need it (maybe divide up using Trim() )

e.g.
QTGMC(inputtype=1 , sharpness=0.3)

Normally you would post an original unprocessed sample, and your avs script, because something you have done may have caused it (you didn't specify how you did the IVTC, or how you resized the video) , and there might be a better way to improve it

Here you go:

unprocessed original sample: http://www.mediafire.com/?9b8cg4bbhafcpfy

My script:

animeivtc(mode=1)
crop( 2, 0, -2, 0)

fluxsmoothST(7,7)
VagueDenoiser(threshold=1.5, method=3, nsteps=6, chromaT = 2)
FFT3Dfilter(sigma=1.5)

msharpen(threshold=4,strength=60)
Tweak(sat=1.25)

nnedi3_rpow2(qual=2,rfactor=2,cshift="spline36resize",fwidth=1280,fheight=720)

aWarpSharp2(depth=20)

#gradfun2dbmod(temp=100)
flash3kyuu_deband(sample_mode=2, precision_mode=3,ditherY=18,ditherC=18)

Nosmas
1st September 2011, 07:16
I only looked at the 1st video , it was 848x480

To apply a filter to segments, divide up using Trim and use aligned splice to join then

e.g.

Main = Mpeg2Source()

Main
Trim(0,100)
FilterA()
A=last

Main
Trim(200,300)
FilterA()
B=last


A ++ Main.Trim(101,199) ++ B


In this example, "FilterA" is applied to frames 0-100 , and 200-300 , but 101-199 are left unfiltered

OK! Thanks a lot! Although maybe I'm too lazy to do that..
I have uploaded the original VOB, can you take a look and see if ur analysis of the problem is correct?

For the first unfiltered video, i just used spline36resize(848,480), it shouldn't be a sharp resizer? (correct me if I am wrong)

I will try the QTGMC filter later to see if it works.

poisondeathray
1st September 2011, 15:05
Yes it works ok. Apply it after the IVTC

Spline36 is fairly sharp, but most of the ringing is probably caused by your msharpen settings .

Adjust your other filter settings, because QTGMC will slightly denoise & sharpen too.

Nosmas
1st September 2011, 16:06
Yes it works ok. Apply it after the IVTC

Spline36 is fairly sharp, but most of the ringing is probably caused by your msharpen settings .

Adjust your other filter settings, because QTGMC will slightly denoise & sharpen too.

Hmm..

I tried it.. It improves a bit but it is still a bit obvious. (maybe my standard is too high) I can still see the hair "vibrating" when I watched my clip... and the clothing also..
encoded clip: http://www.mediafire.com/?sbo6bu0xp1nxe6t

I used your code:

QTGMC(inputtype=1 , sharpness=0.3) after animeivtc. Then just use rest of the filter as above



Is that the best I can do??

poisondeathray
1st September 2011, 19:27
No, I see what you're saying. It's not as obvious if you don't upscale it. QTGMC takes care of the shimmering from the aliasing, but there is a residual "morphing"

There is frame to frame variation in the objects: Objects like hair strands, lines on the wall should be the same size with this linear pan left=>right, but they grow and shrink in size. Those fluctuations are what you perceive as "shaking"

You might be able to use some sort of frame averaging (e.g. ttempsmooth) , but there will be a lot of detail loss to get it to work on this type of defect. Another method might be to replace bad "morphed" frames with mvtools2 with interpolated frames . You can probably do a better job with manual masking sections, maybe with after effects. At least you can limit the damage done by the filters




EDIT:
I played with ttempsmooth and mvtools2, they are too damaging IMO. ttempsmooth requires very strong settings to get average the frames, and it really degrades the image.

I think a better approach to get a clean repair is to motion track the movement, then apply that motion track data to a still good frame and using a rough feathered garbage mask to isolate the area. This eliminates the "morphing" because you're really looking at part of a still frame moving. It's easy to do in AE , it might take a few minutes per scene (each has to be motion tracked sperately). You should be able to do in blender for free which has a motion tracker now.

e.g.
http://www.mediafire.com/?gbaugsh5kghwccq

I don't know how do this in avisynth, it might not be the right type of tool for this type of repair . But I would wait for some of the gurus to reply, there might be some other avisynth approaches

Nosmas
2nd September 2011, 02:19
No, I see what you're saying. It's not as obvious if you don't upscale it. QTGMC takes care of the shimmering from the aliasing, but there is a residual "morphing"

There is frame to frame variation in the objects: Objects like hair strands, lines on the wall should be the same size with this linear pan left=>right, but they grow and shrink in size. Those fluctuations are what you perceive as "shaking"

You might be able to use some sort of frame averaging (e.g. ttempsmooth) , but there will be a lot of detail loss to get it to work on this type of defect. Another method might be to replace bad "morphed" frames with mvtools2 with interpolated frames . You can probably do a better job with manual masking sections, maybe with after effects. At least you can limit the damage done by the filters




EDIT:
I played with ttempsmooth and mvtools2, they are too damaging IMO. ttempsmooth requires very strong settings to get average the frames, and it really degrades the image.

I think a better approach to get a clean repair is to motion track the movement, then apply that motion track data to a still good frame and using a rough feathered garbage mask to isolate the area. This eliminates the "morphing" because you're really looking at part of a still frame moving. It's easy to do in AE , it might take a few minutes per scene (each has to be motion tracked sperately). You should be able to do in blender for free which has a motion tracker now.

e.g.
http://www.mediafire.com/?gbaugsh5kghwccq

I don't know how do this in avisynth, it might not be the right type of tool for this type of repair . But I would wait for some of the gurus to reply, there might be some other avisynth approaches

OIC. your video looks really good. But u said it might take a few minutes per scene?? My source have this problem (mostly) through out the whole video. I don't think I have patience to fix each scene.. Or do you mean it will encode a few minutes per scene??

But anyway, I don't really know how to use AE and you don't know how to do in avisnyth... So I will wait to see if someone can help me..

Thanks a lot though! You spent a lot of time helping me and fixed the problem partially... I'm really appreciated! =]