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. |
1st June 2012, 23:10 | #1 | Link |
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()... I tried a few filters for deinterlacing: Code:
... KernelDeInt(order=1,sharp=true) ... or ... FieldDeinterlace() ... or ... FieldDeinterlace(blend=false) ... or ... TomsMoComp() ... or ... DGBob() ... 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) ..... 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. |
2nd June 2012, 12:53 | #4 | Link |
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) } |
2nd June 2012, 16:08 | #5 | Link |
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. |
4th June 2012, 18:21 | #6 | Link |
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.
|
5th June 2012, 06:09 | #7 | Link |
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) |
10th June 2012, 12:57 | #8 | Link |
Registered User
Join Date: Apr 2007
Posts: 240
|
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.
|
|
|