From subsecret
Revision as of 12:48, 22 May 2014 by Steffen Mikkelsen (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Timelapse from video

Instead of using a camera with native support for timelapse, it is possible to use the normal video recording mode and later convert the video into a timelapse.

Step 1: Extract pictures from video

ffmpeg is very useful for this purpose. You need to specify

-i : Input file path
-s : size of result picture (hd720 and hd1080 are the most common)
-r : The number of pictures to be extracted per second of movie

Example:

ffmpeg -i 00000.MTS -s hd1080 -qscale:v 0 -r 3 imageA-%4d.jpeg

If you want to combine multiple movies into the same timelapse, just change the A in the output name to B or later latter in the alphabet. That way it will be easy to combine them later. Example:

ffmpeg -i 00000.MTS -s hd1080 -qscale:v 0 -r 3 imageA-%4d.jpeg
ffmpeg -i 00001.MTS -s hd1080 -qscale:v 0 -r 3 imageB-%4d.jpeg
ffmpeg -i 00002.MTS -s hd1080 -qscale:v 0 -r 3 imageC-%4d.jpeg

Step 2: Combine jpeg files to movie

mencoder can be used for this. You need to specify

-fps : How many frames per second your timelapse should be shown in (depends on -r option in ffmpeg)

example

mencoder mf://*.jpeg -fps 65 -o output.avi -ovc copy 

Step 3: Transcode the movie from mencoder

Use this guide: Transcoding with VLC