Ocean Entry Lava Video

Video processing with Darktable

Thursday evening I hiked down to the lava’s ocean entry. This video was shot at 24fps 1/50sec 100mm F/2.8 ISO 400.

I split the AVCHD file into png frames using

avconv -i 00000.MTS -ss 20 -t 40 -r 24 -f image2 %04d.png

-i 00000.MTS: is the filename
-ss 20: start at 20 seconds in
-t 40: end at 60 seconds in
-r 24: originally recorded at 24fps
-f image2: needed for png output
%04d.png: 4 digit zero pad output file names

Then I uploaded one of the frames into Darktable and did 2 passes of editing.

First pass exposure with automaticdenoise, shadows & highlights, and lowpass with a large radius, reverse contrast and an overlay blend mode to deal even more with the shadows and highlights.

Second pass shading and edge enhancement with lowpass and highpass filters.

I then used Vangelis Tasoulas’s script for photo deflickering which you can download here.

I then create frames because 1/2 speed @ 24fps = 12, but I need 30fps. Also I want the video to be smooth. Here is my personal code. You can look at what I do and make your own for fun 🙂

typeset -Z6 c
echo -n 'speed (.5): '
read speed
echo -n 'frames (3): '
read frames
echo -n 'rolling window (15): '
read rolling
echo -n 'framerate (30): '
read framerate
echo -n 'length in seconds (all): '
read length
[[ -z $speed ]] && speed=.5
[[ -z $frames ]] && frames=3
[[ -z $rolling ]] && rolling=15
[[ -z $framerate ]] && framerate=30
[[ -z $length ]] && length=9999

rm -fr Deflickered
rm -fr final
mkdir final
cat /dev/null >movie_stack

inversespeed=`echo 1/$speed |bc`
totalvirtualframes=`echo $frames/$speed |bc`

/home/harry/bin/timelapse-deflicker.pl -w $rolling -p 2

ls Deflickered |while read f; do
seq 1 $inversespeed |while read i; do
echo Deflickered/$f >>movie_stack

lines=`wc -l movie_stack |awk '{print $1}'`
seq 1 $lines |while read c; do
head -n $totalvirtualframes movie_stack >frame_stack
convert `cat frame_stack` -evaluate-sequence mean -resize 1920x1080 -quality 100% -background black -gravity center -extent 1920x1080 final/$c.jpg
echo -ne "\e[0K\r$c / $lines"
sed -i '1d' movie_stack

avconv -f image2 -r $framerate -i final/%06d.jpg -aspect 16:9 -b:v 15000k -y video.avi &> /dev/null

Leave a Reply

Your email address will not be published.