[FFmpeg-user] Help with deshaking video from seaship

Francois Visagie francois.visagie at gmail.com
Fri Oct 25 12:05:52 CEST 2013


> -----Original Message-----
> From: ffmpeg-user-bounces at ffmpeg.org [mailto:ffmpeg-user-
> bounces at ffmpeg.org] On Behalf Of Andrey Utkin
> Sent: 24 October 2013 21:25
> To: ffmpeg-user at ffmpeg.org
> Subject: [FFmpeg-user] Help with deshaking video from seaship
> 
> We have videorecordings from seaship, and we need the recordings to be
> viewable at ~100x fast motion.
> This is a sample of recording with 120x fast motion without filtering:
> http://whdd.org/portovy-101-front__21oct_12m_from_videodump.mp4
> The big problem is that on daytime the skyline shakes a lot, which is
> extremely uncomfortable to watch at.
> So i tried applying deshake filters. I tried vidstab* filters, and
deshake.
> Currently i got better result with deshake:
> exactly with such filter string: http://whdd.org/deshake.ts
> 
> =25,unsharp,unsharp,deshake=rx=64:ry=64:x=500:y=0:w=480:h=250:edge=cl
> amp
> fps decreases framerate from 50 to 25 Hz which improves deshake results,
> unsharp smoothes image so deshake better recognizes actual motion.
> Magic numbers at deshake parameters mean following: we limit motion
> detection to center of skyline, if we have skyline fixed we get most of
> objects fixed.
> But the result is still not quite good, a lot of details lost at
> blurring, and shaking is still not fully eliminated. Not counting the
> blockiness, which is possible to avoid by reencoding from original video
> (still fetching it from the ship to try).
> Any ideas on better filters combination?
> AFAIK there's no morphing filter available for ffmpeg or another FOSS
> tool?

I had a quick look at this and I think the biggest problem is large motion
between frames. This is caused by the 120x pre-decimation - if you look at
the timestamps, these frames are 2-3s apart. That means the decimation
reduced motion smoothness/introduced motion jumps. This makes accurate
motion analysis very difficult.

You'd do much better deshaking the untouched footage, if possible, and then
decimating for viewing afterwards.

I tend to agree, poor quality introduces lots of false motion which
contributes to making motion coherence decisions between frames impossible
much of the time. Aggressive smoothing to the extent that the horizon
becomes mostly the only remaining detail might therefore help. I'm not
familiar with ffmpeg's deshake filter, but Gunnar Thalin's VirtualDub
Deshaker makes it possible to analyse a proxy (a heavily smoothed one in
this case), save the analysis and apply that to the untouched original.

You may also want to check at Videohelp's Restoration forum
(http://forum.videohelp.com/forums/41-Restoration) - some real subject
matter experts there.



More information about the ffmpeg-user mailing list