Log in

View Full Version : Deshaker by Gunnar Thalin


Pages : 1 2 3 4 5 6 [7] 8 9 10 11

guth
7th October 2012, 08:36
any thoughts on how to deshake a VHS content with lots of noise and obviously low resolution? :D
I've never tried it, so I'm not 100% sure.

The thing with Deshaker and noise is that it shouldn't have much trouble with "clean" noise. But if the noise starts to look similar between two frames in the video, Deshaker might find an incorrect match on it. I would guess that the original noise on the VHS is clean in this regard, but if you encode the video with a codec that analyses differences between frames (which means most codecs), or if you use temporal smoothing on the video, the noise will show similarities between frames. So, you'll probably want to use a codec that is either lossless, or encodes each frame (or field) individually, such as MJPEG or DV, when capturing the VHS video. (I'm not sure if MJPEG supports interlaced video, though.)

If you can't avoid noise that looks similar between frames, you can use the Deshaker setting "Discard motion of blocks that have max. pixel diff < X" to discard all blocks that have more noise than real detail. Or you can try using a good spatial denoiser before Deshaker pass 1. Never use a temporal denoiser before Deshaker pass 1, though.

If you can't make it work, you can email me a few frames if you like.

fbs
10th October 2012, 19:35
I'm capturing it with lagarith.. complete lossless.. and no temporal filters before (just one spatial CHROMA denoiser).. the strange thing is that despite using higher values in "max. pixel diff" and "match value" it's matching "invisible block" lol.. look at the shot:
http://i.imgur.com/J9Vee.jpg

guth
11th October 2012, 17:29
the strange thing is that despite using higher values in "max. pixel diff" and "match value" it's matching "invisible block" lol..
What do you mean by "invisible block"? All the motion vectors were found on extremely contrasty areas, so I'm not sure I see what's so strange. (At least not without seeing the previous frame.)
The red vectors are a bit weird, though, but those are because Deshaker has some problems with straight lines. Usually such vectors will be marked bad (red), though, which is the case here too.

wonkey_monkey
11th October 2012, 18:02
Maybe fbs is making the same wrong assumption that I always have, until now - that the vectors shown are from the center of a block. But they're not, are they? They're showing the corners of a block!

This is like when I realised that Superman isn't spinning the Earth backwards, he's just travelling back in time around it (though that doesn't explain why he has to spin it up again).

David

guth
11th October 2012, 18:41
Maybe fbs is making the same wrong assumption that I always have, until now - that the vectors shown are from the center of a block. But they're not, are they? They're showing the corners of a block!
No, the vectors are at the center of the blocks. But if it's the leftmost red vectors you and fbs are wondering about, those are becuase vectors always occur in groups of four when the Scale setting is "Half". Try setting it to "Full" instead.

This is like when I realised that Superman isn't spinning the Earth backwards, he's just travelling back in time around it (though that doesn't explain why he has to spin it up again).
:confused:

guth
18th November 2012, 17:54
There's now (finally) a 64-bit version of Deshaker...

http://www.guthspot.se/video/deshaker.htm

No new features, unfortunately.
Please report any problems.

isidroco
20th November 2012, 18:40
Don't have a 64bit os yet :)

I finished some scripts for deshaking all AVIs in a directory. I found out that it could be very useful that deshaker generates and use LOG files with the same name (and same folder) as AVIs. (though I don't know if filters can ask AVI filename to VDUB)...

guth
20th November 2012, 19:37
(though I don't know if filters can ask AVI filename to VDUB)...
They can't, as far as I know.

djonline
1st January 2013, 14:50
There's now (finally) a 64-bit version of Deshaker...

http://www.guthspot.se/video/deshaker.htm

Thank you!
+20% on first pass, +4% on second pass (using 30 future frames), 1080/60p, i7-860.

WarpEnterprises
1st January 2013, 16:28
I found out that it could be very useful that deshaker generates and use LOG files with the same name (and same folder) as AVIs. (though I don't know if filters can ask AVI filename to VDUB)...

I have similar needs, my solution to this to use AviSynth for at least pass2. This works very well, if the deshaker settings are the same for all files.
I do pass1 and pass2 with the same source script and switch off deshaker when the calling program is VDMod (which I use for pass1, having to enter the log file name manually), but not when the script is called from tmpgenc (which I use for pass2).
The main script is an AVSI in the AviSynth plugin dir, which does the loading of the MOVs and the deshaking:

LoadVirtualdubPlugin("C:\appl\VirtualDubMod\plugins\Deshaker33.vdf", "deshaker3", 1)

function mov43(name)
{
name = default(name, leftstr(scriptfile, strlen(scriptfile)-4))
vdm = (GetProcessName() == "virtualdubmod.exe" || GetProcessName() == "virtualdubavs.exe")
tmpg = (GetProcessName() == "tmpgenc.exe")

QTInput(scriptdir + name + ".MOV", audio=1, color=1)

log = vdm ? "" : scriptdir + name + ".log"
cmd = "18|2|30|4|1|0|1|0|640|480|1|2|500|500|500|0|4|1|6|2|15|30|300|4|" + log + "|0|0|0|0|0|0|0|0|0|0|0|0|0|1|15|15|5|15|0|0|30|30|0|0|0|0|1|0|0|10|1000|1|88|1|1|20|500|100|20|1"

vdm ? nop() : deshaker3(cmd)
tmpg ? normalize().ConvertToRgb24() : nop()
return last
}


That way for each source clip (MOVs in my case) a single AVS with a single line is necessary, e.g. file P1020634.avs for P1020634.MOV
mov43()


Needs helper plugin from here (http://forum.doom9.org/showthread.php?t=166805) and the latest AviSynth to get the name of the script file.

Hope it helps!

lansing
2nd January 2013, 03:39
hi, i have been trying to use deshaker to fix the film weave problem existed in old anime, where there's shakes inside the frame. Like in this example:
http://www.mediafire.com/?b5mh4xf32kzf1mc

i can't get the setting to detect the shake on the purple cloth.

WarpEnterprises
2nd January 2013, 09:18
It seems that the shake is not consistent through the whole frame. Deshaker won't take only "your" foreground object but the WHOLE frame (which is quite unshaky).

lansing
2nd January 2013, 17:24
thanks for the reply, seems like deshaker is not suitable for my case then

bcn_246
7th January 2013, 23:29
Just wanted to take a moment to say thanks for all the work you have done on this filter :)

guth
8th January 2013, 17:19
Just wanted to take a moment to say thanks for all the work you have done on this filter :)
Thanks for your thanks. :)

fvisagie
9th January 2013, 09:50
Just wanted to take a moment to say thanks for all the work you have done on this filter :)

Ditto. I use it fairly regularly now and I never cease to be amazed by the results :).

DESuser
18th March 2013, 06:03
Since mr. Gunnar personally mentioned about "no new features", a new look is quite enough.. But not.
If it is really 64 bit-wise memory handling, i will test it seriously, i ve bought a 32 Gb DDR3 for Z77 chipset, lets see, is this so.
At least such software as APG 303 and PS CS6 64 bit will also take advantage, but i wish to benefit this filter first.
The problems to be repeatedly avoided are still same, these are not to be called features, ... later.
1. Deshaker fails to simulate cam path in the very simple scene with slow left to right motion witn zooming out - a still picture of a distant mountain. Somehow it recognises a part of image as an object and voila - single scene breaks into unsolvable thrashing. Why is it so, see point 2.
2. Deshaker Hundred% fails to properly simulate after very slow panning motion, left and right borders filled improperly loosing all available details to a colourful trace, while in-tests by reducing a frame twice|thrice rate does okay. Also the motion detection, since the times i ve seen AutoPanoGiga 251 and later, is weak. Naturally a half of scenes to be detected with full resolution in both settings. Here comes point 3.
3. VHS videos with low contrast and colour noise, blocky mobile shots are all fall into category of full precision detection. Because scene detection is weak. and because motions detection do NOT have any settings to be changed. Few filters in VD show WHAT they see, like noise removers, here only mr. Gunnar saw all it's intermediates. THUS there needed a colour denoising, wide distance gamma correction, and sharpening. Happily all needed sharpening may be done by msu smart sharpen with mad setting, quite ok. All noises easily removed by Neat Video, it is not free, but even old versions quite enough. But it is after, mostly. Low resolution have a commercial solution called Video Enhancer, and free solution is just to twice resize before deshaker and then sharpen.
4. Low frame rates are okay if feed 25 fps to deshaker, but it FAILS to work after interpolate filter, and a few sequentially incompatible also be named here.
5. A full set of weapons to be handled with DESHAKER are - Fast CPU at least 2 Ghz multicore, next come RAM. And NO lagariths and x264 lossless modes. Usually deshaker thrashing to swap and does something of its matter without 100% load, especially with much of frames in scope, due to weak frame handling. I will not be surprised if they ARE stored in very redundant format, at least twice. Since that a good codec to be used is MJPG at q=1 or MJPG2K, or yes lagarith with size of 640x480 max IF you have SATAiii storage and or raid.
The filters to be used to achieve a good result are - increasing resolution, removing noise, increasing frame rate to NEEDED, and then deshaking. Detection to be done one way, final deshake - hardly another.
6. Last point - Deshaker really will increase resolution with a zooming factor, since most unuqie and rare videos are shot randomly without proper conditions.
7. Save your time - i found that deshaking usual boring panning scenes with nothing that moves is useless. Feed each 5th frame to panorama maker. thats it.
8. Save you nerves - feed hard to detect cuts of 50-200 frames to autopano giga or same level software - you will find it interesting when deshaking by hand the layers of resulting PSB file. A still photo may be pan-zoomed later.
9. Do NOT fear change the settings, since mr. Gunnar optimised it for defaults you may have no choice but to try everything, just read his site and know their initial purpose.
10. Area detection is to be revised. Oh yes.. Nope. None will do it himself.
11. The last solution - Adobe AE with their stabiliser - a wobbly shadow of deshaker, i still wonder - is there hand optimizing available.
I mean area detection fail. sometimes.
Thanks for reading.

fvisagie
28th March 2013, 11:36
Hi Gunnar and everyone,

Say you've analysed your whole input clip in Deshaker but after trimming etc. only some frames are rendered for output, will those frames get the full benefit of [x] Previous and future frames to fill in borders, including from frames not rendered for output? Or would one need to save the complete deshaken clip to an intermediate file to get that benefit?

Thanks,
Francois

guth
28th March 2013, 13:17
Say you've analysed your whole input clip in Deshaker but after trimming etc. only some frames are rendered for output, will those frames get the full benefit of [x] Previous and future frames to fill in borders, including from frames not rendered for output? Or would one need to save the complete deshaken clip to an intermediate file to get that benefit?

If you save frames A to B, Deshaker pass 2 won't use frames before A, but it will use frames after B. So you might want to save to an intermediate file first (preferably using a lossless codec).

But, unless frames A and B+1 are marked as new scenes, the motion of both frames before A and after B will still affect the output of just A to B. This may or may not be what you want.

In general, I would probably either make sure A and B+1 are marked with "n_scene" in the log file, to make sure frames outside A to B aren't used at all.
Or, I would output frames A-50 to B (if you use 50 previous frames in settings) to fully make use all frames. And then remove A-50 to A-1 afterwards.

Not ideal, I know...

fvisagie
28th March 2013, 18:50
Not ideal, I know

But your detailed explanation of what to expect in the various scenarios empowers the user to make informed decisions. :thanks:

In this particular instance, it will be much more straight-forward for me to losslessly save a full intermediate file (as I normally did anyway ;)).

asaleo
7th April 2013, 18:21
This post is part a tribute to the creator of Deshaker and part sharing of settings for "an impossible video"
I have a lot of windsurfing videos taken with a helm camera.
Since frames contains a mixture of shore with sky and other frames with board, sail and water I regarded these videos to be impossible to stabilize.
There is only a static background on the frames with shore line and sky.
Frames without a static background should not be stabilized since they miss static area.

Following settings made it possible to stabilize even these videos.
By restricting analyze area to the upper part of the frame which containes the sky and shoreline and chosing Full scale and All pixels together with some other changes it was possible to get stabilization on shore and sky frames and skipped frames on the other frames.

Pass 1
Block size 20
Scale Full
Use all pixels
..have match values < 133 (1/3 of block)
...move > 2 pixels....
Skip frame if < 5 or 4 % .... I check the white and red arrows in the beginning and decide from what I see.

Since analyze area is reduce you can use full scale and use all pixels without too much analyze time.

Pass 2
Here I have to lower the motion smoothness to 100 in order to reduce the needed zoom factor.
I do not want to use higher zoom factor than 1.05 to 1.1
Thus I reduce motion smoothness to avoid to many black borders.

Sometimes I have used lower values for max correction limits.
I decide how many mm movement of frame I permit on my screen since I do not want to use high zoom value.
I then calculate the percentage to put into the max correction.

Above settings works best on video with clouds on a blue sky. There must be something for Deshaker to fix on to compare frames.
I have not managed to stabilize frames with a blue sky without clouds. A grey sky is also impossible.

Do any of you have settings to share to stabilize difficult videos?
Can I refine my settings?
Regards

guth
7th April 2013, 19:32
Thanks for sharing.
I would also set zoom motion smoothness to 0. Always do that when there's no zooming in the video.
And based on your "match values < 133 (1/3 of block)", I think you misunderstood that setting slightly. It says "match value", without an 's'. It's always a value between -1000 and 1000 indicating how similar two blocks look, regardless of block size.

asaleo
8th April 2013, 10:06
Honored to get answer from you!

I now compared settings for match value < 133 and 300. Luckily for me there were no difference in written logfile.
Zoom smoothness shall be 0 of course in my case.

I have noticed that if I use Tateau quicktime plugin for importing mp4 files into VirtualDub for deshaking it will mostly go wrong when Mode 3 (ICM Decomp) is used. Mode 3 is recomended for mp4
I now use mode 2 (which suites .mov files) for mp4 files to get a proper stabilization. Values for frame number 1 in the logfile created for a mode 2 (decomp sequence) file is identical to frame number 2 in the logfile for mode 3 (ICM decomp) file.

I enter this post as a warning. When I encountered this first time I had to spend a lot of searching for what has happened.

Regards

DESuser
27th November 2013, 04:01
Hello everyone.
Me dont surely aware did anyone stated it, so the question is about using 64-bit version within 32 Gb memory configuration.
There is nothing hard to build such, just get and install. Now it is really cheaper than say 10 years before.
Ive used kingston hypex modules, four plates. Overlocking, if applied, is a matter of fun here.
Ive tried truly big frame sizes, like 6000x2000, but with static renderings @ -1 setting there.
Still, there is an bug which makes static scene to move left or right, depending on internals.
Thats why completely staqtic renders ought to be done within such huge resolutions and then redeshaked.
Rare case, but always have to, if going static. Typical RAM load up to 8-10 Gbs.
With settings i always use, a 2000 frames scope, is enough for full HD videos taking up to 28 Gbs.
Of course, the videos with complex movement may require only even -5 +5 scope to make it a recognizable vision.
It looks fun to see how frames follow real motion, it really increases perceptible vision field.
So conclusion is - it is okay. It works. All the problems same in comparison with, just do know and try.
As the days come by, experience is a key.
What another strange thing are to be met with ?
Say.. The trajectory of calculated motion may suffer from things like river flow or any secondary motion, no cure to this may be found except some corrections to logfile. But how ?
When rendering VGA sizes to HD at scale like 0.75, any camera returns to initial places may and will suffer from displacement. The combined pictutre will be somewhat distorted.
The blur algo is still one core slow-mo at go-wait-an-eternity performance.
May be there are some solutions to log file, like visual correction..
It works.

BabaG
11th January 2014, 23:12
maybe this has been asked and i didn't see it but, is there a way to use deshaker to transfer movement from one clip to another? an example might be to add a hand-held feel to a static scene. it seems to me this could be a useful motion tracking feature. could one do something like run pass one on scene A, then run pass two on scene B, using the scene A tracking log? exactly how might one do something like this?

thanks,
BabaG

guth
12th January 2014, 17:29
maybe this has been asked and i didn't see it but, is there a way to use deshaker to transfer movement from one clip to another? an example might be to add a hand-held feel to a static scene. it seems to me this could be a useful motion tracking feature. could one do something like run pass one on scene A, then run pass two on scene B, using the scene A tracking log? exactly how might one do something like this?
If you just want to add hand-held feel to a static scene, you should be able to do just what you said; run scene A through Deshaker pass 1, open scene B, and run through Deshaker pass 2 without changing the logfile inbetween.
If you, however, want to add exactly the same motion that scene A has to scene B, you could maybe do the following:

Run scene A through Deshaker pass 1.
Open the logfile in Excel or similar and change the values so that the motion is inversed. (You can get an approximate inverse by changing the sign on panning and rotation and do 1/x for zoom).
Open scene B and run through Deshaker pass 2, having the motion smoothness settings set to -1.

I haven't tried this myself, though, so I'm not sure how well it works. It might not work very well at all if there's a lot of rotation or zoom.

BabaG
13th January 2014, 02:02
thanks, guth. it may be a while before i get to try this myself. it's good to know that it may be possible and seems somewhat easy. would be a handy feature, i'd think, were it included in deshaker. would turn it into more of a motion tracker. might be as simple as an 'invert' button.

the thing that got me thinking about it is a sequence i have in something i'm working on that was shot on a set in a static car. i thought i might set up a mount in a moving car and record a couple of minutes of driving with markers on the windows to give good reference for movement. i thought this might be a good way to accurately record the bounces and jiggles of driving. i thought i might, then, try transferring this jiggle to the static image. i used deshaker once as a test to try removing film weave and jitter in some of my transferred material and it worked quite well. having done that, i thought this might be something else useful to try.

thanks again,
BabaG

scharfis_brain
16th July 2014, 23:07
I've a feature request for deshaker.

Let me explain my issue:

I was given a ten years old VHS-tape of a friend, which I try to stabilize.
The video is overlaid with a date/timestamp like we all know it from the VHS-era (bold and ugly)

So I need to remove this timestamp prior to video stabilization, in order to avoid a floating-around timestamp in the stabilized video.
Currently I use a mix of avsinpaint an some global motion compensation (with temporal smoothing) to fill in the area of the timestamp.
This process works only roughly in estimating how to fill the missing parts of the image and it i horribly sloooow.

Now here is my feature request:
- let the user load a mask-file for pass two. the mask file makes the video transparent (ie. black like uncompensated borders) in the parts where to remove a logo or timestamp
- (alternatively I can fill the area with a custom masking color, which I will specify in pass two)
- then the magic of deshaker will apply in pass two. previous and future frames used by the edge compensation will fill the masked area with texture. parts of the masked area which couldn't be filled by the prev/future frames will remain in their masking color(alternatively they can stay black) or they will be filled by the algorithmy deployed in 'extrapolate colors'

raffriff42
16th July 2014, 23:33
So I need to remove this timestamp prior to video stabilization, in order to avoid a floating-around timestamp in the stabilized video...Pass 1 parameters, Ignore Pixels Inside (Left, Top, Right, Bottom)

scharfis_brain
17th July 2014, 00:23
that only affects the motion analysis.
but it doesn't affect rendering of pass two. I need the masked area to be filled with the contents of the previous and future frames.

raffriff42
17th July 2014, 01:13
Oh sorry, I read that wrong. Yes, it's strange to have a stable video with moving titles or whatnot.

guth
17th July 2014, 11:04
Now here is my feature request:
- let the user load a mask-file for pass two. the mask file makes the video transparent (ie. black like uncompensated borders) in the parts where to remove a logo or timestamp
- (alternatively I can fill the area with a custom masking color, which I will specify in pass two)
- then the magic of deshaker will apply in pass two. previous and future frames used by the edge compensation will fill the masked area with texture. parts of the masked area which couldn't be filled by the prev/future frames will remain in their masking color(alternatively they can stay black) or they will be filled by the algorithmy deployed in 'extrapolate colors'

I suspect this maybe won't work quite as well as you image. Usually, there are sections of the video that don't have much shake at all. In these cases Deshaker won't be able to access the image data it needs, because it either doesn't exist at all, or it exists in frames too far away in time (Deshaker stores the frames in memory, which is usually limited). The reason why this still works rather well for borders is that in sections without much shake, there won't be a lot of borders to fill, becasue any corrections made by Deshaker will be rather small.

Have you tried any filters/plugins that remove logos? MSU Logo Remover seems to use motion analysis, for example. I haven't tried any myself, though.

guth
17th July 2014, 11:52
Btw, davidhorman, if you're still reading this thread. Do you remember 7 years ago when you asked in this thread why I didn't use something similar to Gaussian blur to calculate the smooth motion? I basically didn't have a better answer than that my solution felt more "mathematically correct", and that it seemed better to minimize the *squared* corrections. I now finally think I have a better explanation. :)

My algorithm, as said before, minimizes the squared corrections and the motion curvature. If we take an input motion path with absolute positions 10, 20, 30, 40, 50, then blurring these values might give you something similar to 28, 29, 30, 31, 32, which means corrections will be made.
Deshaker, however, will already think that this is as smooth as it gets, since the original motion has curvature (2nd derivative) zero. So it won't make any corrections, which is generally what we would want, right?
Sorry, but I just had to get this off my chest... :)

The newer adaptive zoom smoothing does, however, use (true) Gaussian blur, for various reasons.

wonkey_monkey
17th July 2014, 21:25
I am still reading this thread, and yes, I do remember asking you that 7 years ago - I hope it hasn't been keeping you awake at night all this time!

If we take an input motion path with absolute positions 10, 20, 30, 40, 50, then blurring these values might give you something similar to 28, 29, 30, 31, 32, which means corrections will be made.

I'm trying to remember what I did when I wrote an AviSynth script to test 3D correction using a Deshaker log file. Maybe I took the relative movements - 10, 10, 10, 10 in this case - and smoothed those...

Coincidentally the 3D correction thing has been on my mind again lately. I've been meaning to do more tests, as those preliminary results all those years ago showed it to be good for counteracting the corner wobble on wide angle videos.

David

scharfis_brain
17th July 2014, 21:39
I suspect this maybe won't work quite as well as you image. Usually, there are sections of the video that don't have much shake at all. In these cases Deshaker won't be able to access the image data it needs, because it either doesn't exist at all, or it exists in frames too far away in time (Deshaker stores the frames in memory, which is usually limited). The reason why this still works rather well for borders is that in sections without much shake, there won't be a lot of borders to fill, becasue any corrections made by Deshaker will be rather small.
I am aware of this. But:
1) this video is totally shaky
2) it contains lots of rapid zooms
3) I know that areas which have no camera shakiness will leave the 'hole'. But this can be masked afterwards in avisynth and filled with some inpainting. Alternatively it can be filled using the alorithm you use to extrapolate the colors to the border


Have you tried any filters/plugins that remove logos? MSU Logo Remover seems to use motion analysis, for example. I haven't tried any myself, though.

I've tried them. They won't work as advertised.
MSU just will move some blocks along its crappy motion estimation/compensa tion. It is not aware of scene changes. It looks really ugly no matter how I set the parameters.
ExInpaint will create a chaotic bocky result, cause it copies random image blocks into the masked area.
The only solution feasable was AVSInpaint. But It completely lacks image texture. So I tried DepanInterleave with AVSinpaint and some heavy temporal smoothing. This works kinda, but it is horribly slow. The more direct approach would be deshaker with a masking feature which makes parts of the image transparent.

If you've got some time it would be nice, if you could inpement something to make parts of the video transparent. eg by a mask file or by a keying color.

guth
18th July 2014, 21:11
scharfis_brain, I just sent you a PM with a test version that does color masking.

guth
18th July 2014, 21:18
Maybe I took the relative movements - 10, 10, 10, 10 in this case - and smoothed those...
Hmm... indeed, that seems to fix that little problem.
But just wait... in another 7 years I'll come up with more arguments! :)

As for 3D correction... that would be nice. But I still don't think I will attempt it. I believe I gave reasons before, such as needing FOV etc. Too many problems and too much work. :)

wonkey_monkey
16th August 2014, 23:36
Hey guth... I did it (http://forum.doom9.org/showthread.php?p=1690146#post1690146) :)

As for the smoothing problem, I got around it this time by "reflecting" values beyond the first and last frames, so your example of 10, 20, 30, 40, 50 becomes [-40], [-30], [-20], [-10], [0], 10, 20, 30, 40, [50], [60], [70], [80], [90] (or as wide as it needs to be for the amount of smoothing specified). I haven't tested this much, but it does result in uncorrected first and last frames.

David

guth
17th August 2014, 13:32
Hey guth... I did it (http://forum.doom9.org/showthread.php?p=1690146#post1690146) :)
Cool!
I seem to struggle a bit with it, though. First I had problems that the video wasn't stabilizing properly at all. It turned out there was a frame mismatch because I had a blank line first in the logfile. (I guess you ignore the frame numbers in the logfile?)
After that, it was pretty smooth, but it still didn't look very good, partly because of rolling shutter, but there appears to be something else that's strange with the geometry too. Maybe I'm doing something wrong. I just took an ordinary video camera (Panasonic HDC-SD900) and filmed at max wide angle (and shutter speed 1/250s) though my window, while waving the camera. I used fov=54 degrees, because that's what I *think* it should be after googling a bit, but I tried other fov values too. I used smoothness values 100.
I didn't have time to test everything I could think of to make it work better, though. And I'm afraid my time for testing is pretty limited the upcoming weeks. Just so you know.
I hope others will test it meanwhile.

wonkey_monkey
20th August 2014, 22:35
but there appears to be something else that's strange with the geometry too.

Hard to say really, although I neglected to mention that Deshaker3D is only really meant for rectilinear input (maybe your camera is slightly fish-eye-y at it's widest angle?). Rolling shutter is obviously an additional problem, though from reading your description of your solution for Deshaker, it shouldn't be hard to implement in Deshaker3D.

Would you be able to share the video (quality doesn't have to be good) and logfile?

Thanks,

David

guth
14th September 2014, 17:59
Deshaker 3.1 is released...
http://www.guthspot.se/video/deshaker.htm

fvisagie
15th September 2014, 12:06
Congratulations, and thanks!

Just to confirmThe ranges of some settings have been extended - this is a range extension and not a resolution increase, correct? In other words, current value x has the same effect as previous value x?

Gargamel
15th September 2014, 14:39
Thank you, Guth !

guth
15th September 2014, 16:44
Just to confirm - this is a range extension and not a resolution increase, correct? In other words, current value x has the same effect as previous value x?
Correct. x is still x. :)
(Via script you have always been able to go outside the normal range on many settings, so this is really nothing more than looser restrictions in the GUI.)

fvisagie
15th September 2014, 17:23
Correct. x is still x. :)

Thanks for the confirmation!

PhotoCat
18th October 2014, 15:44
Hi Guth!
May I say thank you to u once again! Your amazing deshaker app is absolutely essential to my video editing workflow :)
Just 1 feature request:
For infinitely smoothness "-1" for pans, currently deshaker would try to make all the frames the same as the 1st frame in the video.
Would it be possible to allow us to choose any frame in the video as a reference? (i.e. not just the 1st frame)

This would be useful in a case where there is a little bit of panning to the right for example to centre the subject during the first few seconds of the
clip. Therefore, using the 1st frame as a reference for infinitely smoothness "-1" may not be optimal.

Thanks a lot!

guth
19th October 2014, 10:47
For infinitely smoothness "-1" for pans, currently deshaker would try to make all the frames the same as the 1st frame in the video.
Would it be possible to allow us to choose any frame in the video as a reference? (i.e. not just the 1st frame)

You can get the same effect by adding an offset to the logfile for the frame before the first real frame, i.e. usually for frame 0. Like this:

0 200 100 0 1

Adding that line to the logfile should offset the whole video 200 pixels to the right and 100 pixels down when using "-1" as smoothness.
Let me know if you can't make it work.

PhotoCat
20th October 2014, 03:04
Wow Guth! You are awesome!
This simple frame "zero" worked wonders!

Don't know how u did it!!
In my case, I used:
0 120 0 1.0 1

I only needed an x-offset of 120 to perfect the
composition of the video. It worked beautifully!
I was so excited and then I also tried to correct the slightly tilted camera angle by 1.0 degree and it also worked!!
So I set H & V panning to -1, as well as rotation to -1 for
"infinite" motion smoothness.

Now not only is my video corrected for composition, but it
is also corrected for tilt!

Kudos to you Guth and thanks again!

:thanks:

PhotoCat
20th October 2014, 18:34
Hi Guth,

Greetings!
I am using fixed zoom in pass2 to get rid of borders.
I shoot with prime lens and I prefer a non-zoom look
to my videos. Therefore I am trying to avoid the adaptive zooms,
which zooms in and out repeatedly, giving an amateur look.
The fixed-zoom is great except it eats up potentially beautiful backgrounds. Furthermore, in my previous example, an offset
of 120 in the horizontal direction would give a black border on
the left for the initial 15 seconds or so.

I have also tried the "fill-in-borders" from previous/future frames with no edge compensation but it can't go too many frames out or it would be very slow or simply not working.

Here is another feature request:

Wondering if the user can specify the source of the fill-in frames. e.g. for video frames 1-6000, the fill-in frame source would come from frames 15000- 15100 only. Note the fill-in frame range is only 100, which is much less than the 6000 frames needing edge filling. The assumption is that the background is still.

Is this possible? Thanks once again!

guth
20th October 2014, 19:51
Fixing that isn't trivial. For example, Deshaker only compares each frame to the previous. So, if we used a frame 1000 frames away, any error in this comparison would be multiplied by 1000.
Also, I doubt a lot of people would use that feature. (At least I wouldn't, and since Deshaker is freeware, that counts. :)))
So, I'm afraid it probably won't happen. Sorry...