r/ImageStabilization • • Feb 13 '14

[TUTORIAL] Image Stabilization using Hugin Panorama Creator

http://imgur.com/a/3qfWQ
293 Upvotes

40 comments sorted by

View all comments

Show parent comments

2

u/TheodoreFunkenstein Mar 28 '14

Well from video, I use ffmpeg like so:

ffmpeg -i unstable.mp4 out%06d.png

This converts a whole video file "unstable.mp4" into out000001.png, etc. If you want a bit more control, you can set start time "-ss", clip duration "-t", and frame rate "-r":

ffmpeg -i unstable.mp4 -ss 00:05:00 -t 5 -vsync cfr -r 100/4 out%6d.png

The two times (start time and clip duration) have to be formatted in either seconds or hh:mm:ss. The "-vsync cfr" option makes sure that your new frame rate is actually enforced. GIFs are made with frame delays in multiples of 1/100 second (not in frames per second), which is why I wrote the frame rate as 100/4 (for a GIF frame delay of 4/100 seconds) instead of 25.


From a GIF, I use ImageMagick:

convert unstable.gif -coalesce out%06d.png

The six-digit output is probably overkill, though: if you're stabilizing anything that requires more than out%03d.png with Hugin, you're going to be miserable.

1

u/goalstopper28 Mar 28 '14

That's too confusing but thanks.