Need help/advice on timer in timelapse

Get answers to your questions about color grading, editing and finishing with DaVinci Resolve.
  • Author
  • Message
Offline

kalain

  • Posts: 115
  • Joined: Wed Apr 01, 2020 10:00 am
  • Real Name: Alain PIERRE

Need help/advice on timer in timelapse

PostSat Aug 06, 2022 7:18 am

Hi,
I have seen a dozen of tutorials about counters or timelapse but didn't find what I would like to do.
Here is the situation.
I get 9000 images with a 10 seconds interval. (25 hours)
As some parts of timelapse are 'boring' (nothing much to see), timeline has speed keyframes like 100%, 800%, 1200%.
Also timeline has zoom keyframes to change a bit point of view.

I'd like to have a variable speed timer (Text+) which display time from 00h00min up to 25h00min and taking account speed keyframe. (Non linear time)

Thanks for any help.

Regards
Offline

Andy Mees

  • Posts: 4113
  • Joined: Wed Aug 22, 2012 7:48 am

Re: Need help/advice on timer in timelapse

PostSat Aug 06, 2022 11:04 am

Hey Alain
You could add your Text+ to the clip in Fusion using an expression for the text value eg 'time' will return the frame number of the composition... you'd have to use some math to present it as a time value eg with a 25 fps source 'floor(time/25)' would create a 'seconds' counter...
Screenshot 2022-08-06 at 12.04.56.jpg
Screenshot 2022-08-06 at 12.04.56.jpg (283.13 KiB) Viewed 3780 times

... but given that, with your source, every frame represents 10 seconds, and your counter also needs to represent hours and minutes then you'd have to do some coding:
Code: Select all
:hours=floor(time/360); minutes=floor(time/6)%60; seconds=floor(time*10)%60; return Text(string.format("%02.f",hours)..":"..string.format("%02.f",minutes)..":"..string.format("%02.f",seconds));
or the simpler
Code: Select all
os.date("%H:%M:%S",(time*10)-3600)

Hope it helps
Andy
Offline
User avatar

Sean Nelson

  • Posts: 891
  • Joined: Sun Feb 07, 2021 9:48 pm
  • Location: Vancouver, Canada
  • Real Name: Sean Nelson

Re: Need help/advice on timer in timelapse

PostSat Aug 06, 2022 1:49 pm

Yeah, Fusion is the way to go here, IMHO. You can superimpose the time stamp on the image as Andy suggested, and then you can feed the timestamped result into a "TimeStretcher" node to speed the composited result up or slow it down where you want. For compressing (speeding up) time you can probably use "Nearest" as the interpolation mode for the TimeStretcher. Note that if you choose "Flow" as the interpolation node you'll also need to add an "OpticalFlow" node ahead of it.
DR Studio 19.1.4 Build 11, Win10Pro x64 22H2/19045.5608
Asus C246 Pro Motherboard, Xeon E-2278G@3.4GHz, 64GB ECC RAM
GeForce 3060 12GB, "Studio" driver 560.81
OS,Library: 1TB NVMe SSD - Project,Cache: 1TB NVMe SSD
Offline

kalain

  • Posts: 115
  • Joined: Wed Apr 01, 2020 10:00 am
  • Real Name: Alain PIERRE

Re: Need help/advice on timer in timelapse

PostTue Aug 09, 2022 8:38 am

Andy Mees wrote:
Code: Select all
:hours=floor(time/360); minutes=floor(time/6)%60; seconds=floor(time*10)%60; return Text(string.format("%02.f",hours)..":"..string.format("%02.f",minutes)..":"..string.format("%02.f",seconds));
or the simpler
Code: Select all
os.date("%H:%M:%S",(time*10)-3600)



Thanks Andy for this example, that's exactly what I was looking for.
I knew for formulas but I didn't know how to implement them and write the code.

In my timeLapse (9278 photos), interval setting of my camera was 10 sec but in reality pictures has been shooted with 11 sec at beginning and 13 sec at the end!!!
An average of 12 sec!!
In my time lapse I have some events that has to be dated correctly.
So doing some calculations with average interval do not match correctly. There is still some time distortion.
I have started a mathematical study using polynomial Lagrange interpolation in order use it in Expression and display correct time in final video.
I will post results when it will be finished.

Another way to do and avoid fastidious mathematical work would be to use directly in Expression Exif time data. I came across Fusion manual but didn't find such thing.

May be it's not possible to use Exif time data in Expression ?
Offline

Andy Mees

  • Posts: 4113
  • Joined: Wed Aug 22, 2012 7:48 am

Re: Need help/advice on timer in timelapse

PostTue Aug 09, 2022 10:40 am

kalain wrote:May be it's not possible to use Exif time data in Expression ?
I don't think that's currently supported Alain.
Maybe you could use something like ExifTool to extract the data and write it to an external file, then use a Frame Render script in the Fusion comp that pulls the required info for each frame? Its not something I've tried myself, but it might be worth investigating.
Offline

kalain

  • Posts: 115
  • Joined: Wed Apr 01, 2020 10:00 am
  • Real Name: Alain PIERRE

Re: Need help/advice on timer in timelapse

PostSat Aug 13, 2022 7:20 pm

So, here is final results in order to display a clock text synchronised with my pictures in timelapse:
Code: Select all
:calcul= (9.24194*1E-13*(time^4) - 2.18266*1E-8*(time^3)+2.19407*1E-4*(time^2)+11.1452*time-11.1454 +29754);  hours=(floor(calcul/3600)%24);  minutes=(floor(calcul/60)%60); return Text(string.format("%02.f",hours).."h:".. string.format("%02.f",minutes).."m")

NB : I had to do this complex formula because interval shooting time was not constant during period of timelapse (31 hours) AND I needed to keep and display a real true (synchronised) time in video.

Thanks all for your help.

Return to DaVinci Resolve

Who is online

Users browsing this forum: Bing [Bot], panos_mts and 334 guests