View Full Version : Need to deshake panoramic video
mel2000
18th May 2009, 05:20
I used panorama-building software to stitch 8 photos together to form a short panoramic AVI video. Unfortunately the image stutters along from left to right at 10 fps so I would like to know if Virtualdub's Deshaker filter can help stabilize the left-to-right stuttering. Thanks.
scharfis_brain
18th May 2009, 09:17
Just try it....
mel2000
18th May 2009, 17:35
I tried it before posting and didn't see any discernable change using the defaults with pass 1 and pass 2. Most discussions on Deshaker involved videos that shook more up and down rather than across. I posted here to get advice on the appropriate settings to use for my situation.
2Bdecided
18th May 2009, 17:50
If it's 10fps, you need to convert the frame rate. 10fps is 10fps - even after Deshaker it will stutter just the same.
Can't you make whatever software you're using to generate the AVI output a higher frame rate? Or a slower pan at the same frame rate, which you can then simply speed up?
If not, you could try mvtools for frame rate conversion - should work well enough for your source.
Cheers,
David.
scharfis_brain
18th May 2009, 17:57
can you upload the video somewhere?
so we can see what you mean?
mel2000
18th May 2009, 21:44
I initially tried a 25 fps framerate but the panorama moved too fast and still stuttered. I don't think my 3D Photo Builder software has the capability to pan more slowly although that's the exact capability I'm after.
my 10 fps flv file (at photobucket):
http://moourl.com/wgj2a
GodofaGap
18th May 2009, 22:54
Your video is not shaking. This is just a 10 fpa pan with the quite expectable stuttering.
mel2000
18th May 2009, 23:24
Your video is not shaking. This is just a 10 fpa pan with the quite expectable stuttering.
Ok, but increasing the framerate doesn't improve the stuttering. Is there software or a filter designed to fix stuttering?
GodofaGap
19th May 2009, 09:27
The stuttering is an effect of low temporal resolution. You to need to either capture at a higher frame rate (25 or even 50 fps), and/or pan slower.
There are things like frame interpolaters and motion blur, but you should really tackle this at the source.
2Bdecided
19th May 2009, 11:35
my 10 fps flv file (at photobucket):
http://moourl.com/wgj2aIf you're selling that house, or even if you live in that house, I think you should be paying us to fix the problem :D
Cheers,
David.
2Bdecided
19th May 2009, 13:59
MFlowFps makes it look like this...
http://www.mediafire.com/file/urcuydvmcjz/famrm1.mp4
...I think that's smooth enough at 60fps!
Cheers,
David.
smok3
19th May 2009, 14:04
software would be lightwave3d for example;
1. make a ball object
2. apply your texture as spherical image map
3. make the animation (simple rotation)
4. set the camera motion-blur as needed
5. hit render
edit: post the pano image, and ill try.
scharfis_brain
19th May 2009, 15:25
you can also animate the panoramic image with animate() and crop() in avisynth.
motion blur can be simultated by blur()
mel2000
19th May 2009, 17:55
Wow, that mp4 was a massive improvement! I recreated my AVI using 60 fps with 3D Photo Builder but it stuttered just as much. I want to try MVFlowFps but its parameter setup, as well as the creation of motion vectors by MVAnalyse needed for the setup, are not obvious. What parameters did you use for MVAnalyse and MVFlowFps to get your result?
The 8 pics used to stitch the panorama are from sample files included with 3D Photo Builder. I can upload the individual jpegs if anyone wants.
Here is the stitched panorama jpg image (from Photobucket). However I don't want to have to buy Lightwave3d to get smooth motion when Avisynth filters can apparently do the trick.
http://moourl.com/cvg6k
Thanks so much for all the useful replies.
mel2000
19th May 2009, 22:06
you can also animate the panoramic image with animate() and crop() in avisynth.
motion blur can be simultated by blur()
I tried your animate idea and, after some trial and error (including using LanczosResize instead of Crop), the results are so impressive that I won't be using 3D Photo Builder to create AVI panoramas anymore. Problem solved. Thank you so much for that idea.
However, I'm still in need of a way to slow down some swf-to-avi conversions and would like some ideas on using MVFlowFps or another tool for slowing down videos.
I'm listing the panorama scroll Avisynth script for archival purposes:
**********************************
image = "K:\flash\images\fam_rm1.jpg"
numSecs = 15
fps = 60.0
vidWidth=600
vidHeight=400
pano = PanoScroll(fps, image, numSecs, vidWidth, vidHeight)
return pano
function PanoScroll(float fps, string file, int "numSecs", int "vidWidth", int "vidHeight")
{
fps = default(fps, 10.0)
numSecs = default(numSecs, 10)
numFrames = int(numSecs * fps)
vidWidth = default(vidWidth, 320)
vidHeight = default(vidHeight, 240)
pano = ImageSource(file, end=numFrames-1, fps=fps)
return Animate(0, numFrames-1, "LanczosResize", pano, vidWidth, vidHeight, 0.0, 0.0, vidWidth, vidHeight, pano, vidWidth, vidHeight, pano.width-vidWidth, 0.0, vidWidth, vidHeight)
}
2Bdecided
20th May 2009, 13:47
I used...
directshowsource("famrm1.avi")
crop(0,0,-8,0)
source=last
super = source.MSuper(pel=2)
backward_vec = MAnalyse(super, blksize=16, overlap=0, isb = true, search=3)
forward_vec = MAnalyse(super, blksize=16, overlap=0, isb = false, search=3)
source.MFlowFps(super, backward_vec, blend=false, forward_vec, num=60, den=1)
crop(0,0,-8,0)
I think that's the standard script, though I increased the blocksize as there's no actual in-frame contra-movement that needs to be caught with a smaller block size. You'd use smaller blocks and maybe some overlap with real video - it's all on the web site:
http://avisynth.org.ru/mvtools/mvtools2.html
Cheers,
David.
mel2000
21st May 2009, 05:45
2Bdecided I tried your script and the result was outstanding. It certainly simplifies what I read at the MVtools website. However, I'm not sure what the two Crop filters are doing for the procedure. Thanks so very much for your help.
2Bdecided
21st May 2009, 14:44
However, I'm not sure what the two Crop filters are doing for the procedure.What ever codec directshowsource was using to pull in your AVI file on my system, it was giving the wrong frame size - so I was using crop to remove some duplicate pixels down the right hand side of the frame. There were some more visible after the mflowfps, so I cropped again! Just a quick hack.
Cheers,
David.
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.