Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Capturing and Editing Video > Avisynth Usage
Register FAQ Calendar Today's Posts Search

Reply
 
Thread Tools Search this Thread Display Modes
Old 1st June 2012, 23:10   #1  |  Link
Kermit25
Registered User
 
Join Date: Dec 2009
Posts: 27
Video with horizontal shaking - how to fix it?

Welcome.
Several times, I recorded something and video was horizontal shaking (as if every second frame was shifted by 1px the earlier) Strangely, the station logo is stable, but the projected video is trembles. I thought that I was unlucky, but when re-recording - the same effect.

When only the even frame has loaded:
Code:
...SelectOdd()...

or

...SelectEven()...
while watching the picture was stable (ignoring interference from 25fps -> 12.5 fps). It was the same as I left the odd frames. Image is not shaking. When I play, original material - it shakes.

I tried a few filters for deinterlacing:
Code:
... KernelDeInt(order=1,sharp=true) ...
or
... FieldDeinterlace() ...
or
... FieldDeinterlace(blend=false) ...
or
... TomsMoComp() ...
or
... DGBob() ...
interlace is remove correctly, but none removed the shaking

I tried to remove it "by hand":

Code:
#DATA
d2vpath = "sample_shack.d2v"
#audio=NicMPG123Source("sample_shack T01 DELAY 0ms.mpa")

# INTERLACE
mpeg2source(d2vpath)
deint = tdeint()
tfm(d2v=d2vpath,clip2=deint)
#audiodub(video,audio)

#SHACK
converttoRGB24()
odd=SelectOdd()
even=SelectEven()
even=AddBorders(even,0,0,1,0)
even=crop(even,1,0,0,0)
Interleave(even,odd)

.....
Few professional, but the closest to ideal. Tremor is smaller, but still felt.

Does anyone have an idea how to fix a "broken" material? If anyone has an idea, that can be made available readily to a short sample for tests

Thank you for your attention, and ask for help.

Last edited by Kermit25; 1st June 2012 at 23:12.
Kermit25 is offline   Reply With Quote
Old 1st June 2012, 23:58   #2  |  Link
Guest
Guest
 
Join Date: Jan 2002
Posts: 21,901
Post a link to an unprocessed source sample to get proper help.
Guest is offline   Reply With Quote
Old 2nd June 2012, 10:22   #3  |  Link
Kermit25
Registered User
 
Join Date: Dec 2009
Posts: 27
Here it is.
Code:
http://www.sendspace.com/file/rer1st
This untouched source sample
Kermit25 is offline   Reply With Quote
Old 2nd June 2012, 12:53   #4  |  Link
laserfan
Aging Video Hobbyist
 
Join Date: Dec 2004
Location: Off the Map
Posts: 2,461
I've not looked at your sample, but you might want to play with Stab() til someone else helps--I had good luck with it with a movie that had horizontal shake. I think the commented-out lines (#) might be the defaults. I don't remember. But I tested first using Trim on a portion of the video and then let 'er rip and was very happy with the result:

Code:
DGSource("videoIN.dgi",debug=false)

#Trim(0,1729)

Stab()

##############################################################################
#Original script by g-force converted into a stand alone script by McCauley  #
#latest version from December 10, 2008                                       #
##############################################################################

function Stab (clip clp, int "range", int "dxmax", int "dymax") {

range = default(range, 1)
dxmax = default(dxmax, 15)
dymax = default(dymax, 6)

#temp  = clp.TemporalSoften(4,4,8,15,2)
#inter = Interleave(temp.Repair(clp.TemporalSoften(4,4,8,15,2)),clp)
temp  = clp.TemporalSoften(7,255,255,25,2)
inter = Interleave(temp.Repair(clp.TemporalSoften(1,255,255,25,2)),clp)
mdata = DePanEstimate(inter,range=range,trust=1,dxmax=dxmax,dymax=dymax,info=false)

DePan(inter,data=mdata,offset=-1,mirror=12,blur=30,info=false)
SelectEvery(2,0)
}
laserfan is offline   Reply With Quote
Old 2nd June 2012, 16:08   #5  |  Link
Kermit25
Registered User
 
Join Date: Dec 2009
Posts: 27
I want to try Your method, but I have problems.
I had no filter DePan ... I added it.
Although it has problems VitrualDub "DePanEstimate: Can not load FFTW3.dll"

EDIT....
OK. I solved the problem of the missing file FFTW3.dll
But unfortunately, the function did not improve shaking :/

Last edited by Kermit25; 2nd June 2012 at 19:00.
Kermit25 is offline   Reply With Quote
Old 4th June 2012, 18:21   #6  |  Link
Guest
Guest
 
Join Date: Jan 2002
Posts: 21,901
I had a look at the sample. If you compare the top of the frame to the bottom, the bottom is barely shaky while the top is all over the place, with that effect smoothly changing from top to bottom. That means no stabilizer that just translates the picture is going to work. I don't know of any way to fix this, but others may chime in.
Guest is offline   Reply With Quote
Old 5th June 2012, 06:09   #7  |  Link
ajk
Registered User
 
Join Date: Jan 2006
Location: Finland
Posts: 134
The distortion pattern seems reasonably stable, so if you find a plugin that can stretch the fields back into shape, I think finding three different settings would be enough and it probably would not need to be adaptive in any way. I did not test this idea though, and don't really know of such a plugin off hand. The station logo will get skewed, but perhaps you could overlay a slightly larger version of it back on the video or get rid of it in some other way.

A quick way to get stable motion is to pick just one field, eg.:

Code:
Source("Sample.mpg")

SeparateFields()
SelectEvery(4,0)

PointResize(width(),height()*2)
Due to the nature of the animation, I don't think you lose a lot of motion like this. Though if there are lots of pans in the full episode, maybe you do lose too much. And of course vertically this looks pretty coarse, you should use EEDI/NNEDI/whatever kind of better interpolation to do the actual resizing.
ajk is offline   Reply With Quote
Old 10th June 2012, 12:57   #8  |  Link
zee944
Registered User
 
Join Date: Apr 2007
Posts: 240
Quote:
Originally Posted by Kermit25 View Post
Here it is.
Code:
http://www.sendspace.com/file/rer1st
This untouched source sample
You could analyze only the top of the video (cropping most of the frame) with DePan or DeShaker, logging the values (x, y movement etc.) into a textfile, than use DeSkew or Reform plugin with supersampling to balance out the shaking using the data with ConditionalFilter. Then you can repeat the same with the bottom of the video. It would save your video completely, however it's quite time consuming to do, probably doesn't worth it. There must be a better official source for this cartoon.
zee944 is offline   Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 23:56.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.