Clouds with trees: my 1st time lapse


It was 8 cosine oscillators.

Next time include some feline foley.

Here’s a little explanation of the crossfade command.
ffmpeg -i ~/video/clipA.mkv \
^-- first clip 6 seconds
-i ~/video/clipB.mkv -an -filter_complex \
^-- second clip 17 seconds long
"[0:v]trim=start=0:end=4,setpts=PTS-STARTPTS[firstclip];\
^-- clipA from 0s to (the end-2s)
[1:v]trim=start=3:end=17,setpts=PTS-STARTPTS[secondclip];\
^-- clibB from end of fadein to end of clip
[0:v]trim=start=4:end=6,setpts=PTS-STARTPTS[fadeoutsrc]; \
^-- clipA fade out part / last 2s
[1:v]trim=start=0:end=3,setpts=PTS-STARTPTS[fadeinsrc];\
^-- clibB fade in part 0s to 3s
[fadeinsrc]format=pix_fmts=yuva420p, fade=t=in:st=0:d=1:alpha=1[fadein];\
^-- generates the fadein
[fadeoutsrc]format=pix_fmts=yuva420p, fade=t=out:st=0:d=1:alpha=1[fadeout];\
^-- generates the fadeout
[fadein]fifo[fadeinfifo]; [fadeout]fifo[fadeoutfifo];\
^-- crossfade parts go thru buffers
[fadeoutfifo][fadeinfifo]overlay[crossfade];\
^-- The video is crossfaded
[firstclip][crossfade][secondclip]concat=n=3[output]" -map "[output]"\
^-- three video streams combined to the output
-crf 5 ~/video/AplusB.mkv
^-- the output

1 Like

Here is a longer one with some audio "tom"foolery. Translated, it is my cat’s way of saying “what is this microphone, give me more food.”

1 Like

Nice! Were the clouds on the last framing moving fast when you shoot? What fps did you use when smoothing with gmic?

Thx! The last time-lapse @1:24 is very rapid cloud movement: a mixed/squall front preceding the much larger storm which has drenched us near Mt Hamilton with 6 seconds between exposures. Between each frame there are 4 fade inter-frames from gmic -fade_files capture*.jpg,4,0,-1,1,outputB.jpg . Then the video was created at 60fps in ffmpeg.

I forgot to mention the audio was copied to the video with ffmpeg -i ~/Desktop/timelapses/567.mkv -i ~/Desktop/meows.wav -c copy -map 0:v -map 1:a ~/Desktop/567-a.mkv

1 Like

Humm… maybe I’m missing some math here.
I took 420 frames of a sunset and there were some low, near clouds that were moving fast.
I cross faded with 10 inter frames and stitch them togheter at 50 fps with ffmpeg, but there were still hicups on those clouds movement.
I’m now doing the cross fade again with 30 inter frames.
By your result, it seems that I’m overdoing it…
PS: I’m using the same syntax as you, both in gmic and ffmpeg.
PS2: Forgot to mention: the lapse between frames during capture was 10 seconds.

By my math, which is guesstimation, you want the result somewhat near displaying ~20 shots per second, with interframe fades. With a few fades in between shots, I used 4, I found I could get by simulating motion a little bit slower that is smoothed by the fades at a higher framerate. For longer distances like 10sec -morph_files might be worth a try also.

gmic -morph_files capture*.jpg,4,0.1,4,0,-1,1,output.jpg

Cheers for taking in all of the feedback including the feline foley. It is getting better with each iteration. I noticed some line artifacts about 30s in. I wonder what those are.

@afre Thx, do you mean the birds?

That could be it. The frame was too fast and blurry for me to discern.

I ended up using this

gmic -morph_files IMG*.JPG,13,0.5,4,0,-1,1,gmic/IMG.jpg

and it didn’t perform very well, strange distortions.

I’ll keep the crossfade version as the best one:

1 Like

Nice. I like how the buildings light up at the end.

Digital creativity. :stuck_out_tongue:

… thanks to a Lua intervalometer script that CHDK allows to load and execute. While shooting, it also adjusts exposure and focus accordingly.

Indeed. Look at that:

Were those due to your camera, ffmpeg or gmic? If gmic, @David_Tschumperle.

Looks like the camera was refocusing inbetween…

Could be. Actually didn’t think one iota of the reason why. :blush:

Snow melting w/audio from pure data patch.

conversion to format compatible with the sony setop/bluray units.

ffmpeg -i input.mkv -c:v libx264 -level 41 -pix_fmt yuv420p -preset medium -crf 19 -g 24 -vf setsar=sar=1/1 -threads 8 -x264opts bluray-compat=1:vbv-bufsize=15000:vbv-maxrate=30000 -c:a ac3 -strict experimental -ar 48000 -ab 256k -y output.mkv

If you catch the beginning in HD you’ll see a herd of cattle climbing the hilltop.

1 Like

This scene is closer to what one would expect from a time lapse than your earlier attempts. I like the audio this time. I hear stereo (with my dirt cheap drug store earphones) or is there more than that?