Project

General

Profile

Feature #8930

Time-Lapse feature

Added by Denis Aludinov about 6 years ago. Updated about 3 years ago.

Status:
Triaged
Priority:
Low
Assignee:
-
Category:
Darkroom
Target version:
Start date:
09/14/2012
Due date:
% Done:

20%

Affected Version:
System:
bitness:
hardware architecture:
amd64/x86

Description

I think feature like time-lapse in Lightroom make this application match better.

video.lua (1.46 KB) Tobias Jakobs, 04/10/2014 11:15 PM

video.lua (1.83 KB) Tobias Jakobs, 04/11/2014 07:29 PM

video.lua (2.5 KB) Tobias Jakobs, 04/13/2014 11:19 PM

video.lua (2.85 KB) Tobias Jakobs, 04/24/2014 10:33 PM

video.lua - without show_status (2.92 KB) Tobias Jakobs, 04/25/2014 07:41 PM

video.lua (2.9 KB) Tobias Jakobs, 06/08/2014 06:50 PM

History

#1 Updated by Tobias Ellinghaus about 6 years ago

  • Status changed from New to Closed: invalid

We already have that, check out the tethering mode …

#2 Updated by Denis Aludinov about 6 years ago

I mean something like this: http://www.youtube.com/watch?v=4Dy0KHlu6Bg
Create time-lapse video with shift feature.

#3 Updated by Tobias Ellinghaus about 6 years ago

  • Status changed from Closed: invalid to Closed: won't fix

Oh, you want to create the final video from within darktable. Well, I guess that's not really the scope of darktable. I would use ffmpeg to assemble the exported frames into a video. From “Post processing” onwards might be interesting here: http://houz.org/2012/07/18/dof-animation-test/

#4 Updated by Christian Tellefsen about 6 years ago

May be indirectly solved by #8496.

#5 Updated by Denis Aludinov about 6 years ago

Thanks, i know this method, but this method is not very useful when using large images, because it does not allow to do the prolonged offset and scaling.

#6 Updated by Tobias Ellinghaus about 6 years ago

I'm not sure what "the prolonged offset and scaling" means. Maybe you could join us in IRC (irc://freenode.net/#darktable or http://webchat.freenode.net/ for webchat, channel is #darktable). I guess that would be faster than going back and forth in here.

#7 Updated by Tobias Ellinghaus about 6 years ago

  • Status changed from Closed: won't fix to New
  • Assignee deleted (Developers)

So, here is a list of wanted features:

  • make exporting to a video file possible from within darktable
  • allow to set the framerate and therefore to stretch the video to the desired length
  • allow to animate the cropping so that animated camera pans are possible from a bigger still image/animation

All of this is a thing for the further future (but nevertheless quite cool). Maybe lua will help once it has landed in master. At least for the backend. The GUI would still be missing.

#8 Updated by Tobias Ellinghaus about 6 years ago

  • Status changed from New to Triaged
  • % Done changed from 0 to 20

#9 Updated by Alexandre Jullien almost 5 years ago

  • Status changed from Triaged to In Progress
  • % Done changed from 20 to 50

Hello !

In fact I've done a tool (based on java) to manage timelapse while using darktable powerful filters !

To do so check at my project home, i've put in the wiki the main steps to produce a timelapse.

http://code.google.com/p/timelapse-darktable/wiki/generateTimelapse

Main features:
  • use of darktable to export each JPG frame (in fact darktable-cli)
  • interpolation of darktable filters between user-define keyframes (linear or spline)
  • deflickering option (when luminosity is "blinking" during the timelapse)
  • produce the final JPG frames and final movie.

=> so it's easy to do an animated crop by defining first frame and last frame crop into darktable and then produce the timelapse with this key-frames and timelapse-darktable !

A lot of filters are already supported, extra filters could added easily if needed.

I will make an example of before/after use of timelapse-darktable to be more convincing.

#10 Updated by Tobias Ellinghaus almost 5 years ago

  • Status changed from In Progress to Triaged
  • % Done changed from 50 to 20

Unless you have started adding this feature to darktable it's just "Triaged" and not "In Progress".

#11 Updated by Alexandre Jullien almost 5 years ago

Ok sorry,
it could be added as a add-on (java JAR) to a future-release without modifying darktable core.

Next step should be to add a GUI.
This could be done also in java in the same project or to have an other panel in darktable (such as ligthtable and darkroom) to handle timelapse parameters, calling the JAR after.

But I don't understand how to develop darktable... and I'm not enough "developper" to do this alone.
I didn't know how to program in java at the beginning also, but I have a friend for support who was very helpful !

#12 Updated by Tobias Ellinghaus almost 5 years ago

Sorry, but I wouldn't like to see any runtime dependency on Java for darktable.

#13 Updated by Tobias Jakobs over 4 years ago

Hi,

I created a simple video export script, that uses memcoder. This script is very simple, it has a fix framerate, fix export path, ... but it fixes the first point from #7:
  • make exporting to a video file possible from within darktable
Now the next steps are:
  • allow to set the framerate and therefore to stretch the video to the desired length
  • allow to animate the cropping so that animated camera pans are possible from a bigger still image/animation
  • interpolation of darktable filters between user-define keyframes (linear or spline)
  • deflickering option (when luminosity is "blinking" during the timelapse)

Every one please feel free to improve this script.

#14 Updated by Tobias Jakobs over 4 years ago

I created a new version with a little bit code clean-up and a new option for the framerate.
I have no idea how to solve the now still open ToDos. Perhaps someone can have a look into it.

Done:
  • make exporting to a video file possible from within darktable
  • allow to set the framerate and therefore to stretch the video to the desired length
ToDo:
  • allow to animate the cropping so that animated camera pans are possible from a bigger still image/animation
  • interpolation of darktable filters between user-define keyframes (linear or spline)
  • deflickering option (when luminosity is "blinking" during the timelapse)

#15 Updated by Roman Lebedev over 4 years ago

Tobias Jakobs wrote:

ToDo:
  • deflickering option (when luminosity is "blinking" during the timelapse)

This is WIP by me for some time now.
By now it is partially implemented and merged to master in PR 433
Complete implementation, suitable to be used for timelapses is already implemented in my branch, and awaits review.
It hopefully will be available in 1.6 release.

#16 Updated by Tobias Jakobs over 4 years ago

I have a new version with:

  • Better default for the export directory. (xdg-user-dir VIDEOS) With an option in the preferences to set the directory.
  • An option to play the video after creating it.

@Roman
Nice to see someone is working on it.

#17 Updated by Jérémy Rosen over 4 years ago

cool little script... a couple of remarks, though

  • you still have some dt.print for debug. no big deal, but you can get rid of them. you can pass nil to register_storage and get rid of show_status
  • os.execute will block lua until the command finishes execution. This is usually a bad idea. you should usually replace these calls with coroutine.yield("run_command",<command>) this should do the same thing but with a lua yield in the middle that allows other lua threads to run.

that last point is particularly important when you run the video at the end.

Apart from that, this all looks good. I don't think you can do your current TODO items simply with lua but I am slowly adding the complicated features. in particular

  • i'm mid-way in letting lua manipulate iop parameters. with that in place lua scripts would be able to interpolate between two images
  • I have started looking at adding UI elements with lua. Your exporter would be able to have its own UI elements in the main window instead of having them in prefs, but again it will take some time.

Great work

#18 Updated by Tobias Jakobs over 4 years ago

Thanks for reviewing the script.
Changes in the new version are:
  • I changed all "os.execute" to "coroutine.yield"
  • I changed the codec from libavcodec to x264, because it looks like there is a problem with libavcodec the new Ubuntu 04.14 to which I switched yesterday.
  • I removed one dt.print for debug on startup

I didn't remove the "show_status", because if you create a timelaps video you usually export >100 images and it is nice to have some kind of progress indicator.

#19 Updated by Jérémy Rosen over 4 years ago

doesn't the standard job progress bar provide enough info ?

#20 Updated by Tobias Jakobs over 4 years ago

I didn't know, that there is an standard job progress bar. I'll search for it at the weekend. I think I haven't seen it because I always close all panels that aren't needed.

#21 Updated by Jérémy Rosen over 4 years ago

I meant the standard "processing image x out of y" popup that is standard to all exports..

#22 Updated by Tobias Jakobs over 4 years ago

Without the show_status there is no pop-up to show the progress, just the progress bar in the lower left corner. (That I haven't seen till today. ;)) Perhaps I'm doing something wrong. I've attached a version without the show_status, please review it.

#23 Updated by Tobias Jakobs over 4 years ago

Just some string changes.

#24 Updated by Rudolf Martin about 4 years ago

Jérémy Rosen wrote:

I don't think you can do your current TODO items simply with lua but I am slowly adding the complicated features. in particular

  • i'm mid-way in letting lua manipulate iop parameters. with that in place lua scripts would be able to interpolate between two images
  • I have started looking at adding UI elements with lua. Your exporter would be able to have its own UI elements in the main window instead of having them in prefs, but again it will take some time.

These improvements will be very appreciated.

A main task within time-lapse processing is to smooth out jumps that are the result of manual exposure adjustments during shooting. This happens mainly at shootings of sunrise or sunset. You have to adjust the exposure value between two keyframe-images.

My first thought was, to adjust the keyframes, get the image numbers and write a bash-script to manipulate the exposure-values in the xmp-files of all images between two keyframe-images. Then reimport the xmp-files in darktable. This is somewhat cumbersome and error-prone.

A much better way is to use lua within darktable. For this, the named improvements are necessary.

Advantageously lua should be able to manipulate linear modules, such as exposure, white balance, crop and rotate, contrast brightness saturation, local contrast, vibrance. (These proposed controllers I found in puplications of G.Wegner)

#25 Updated by Tobias Jakobs about 3 years ago

A short update:

The latest version of the Video.lua script is available on GitHub:
https://github.com/darktable-org/lua-scripts/blob/master/contrib/video.lua

At the moment it doesn't work on Ubuntu, because Ubuntu removed mencode from it's repro.
------

I asked on IRC, if we will have this two thing in the next darktable version:
1. deflickering
2. using lua to manipulate iop parameters

<LebedevRI> i really hope i will release 1. this time, in next release :)
<boucman_work> tobias_, no, that one is complicated, I have protoyped something using houz's introspection that allowed me to dump all iop in text format, but integrating into DT proper is tricky...

<boucman_work> you can add UI elements with lua, though... that part is done
------

So we will hopefully get some improvements with the next darktable version.
------

And for everyone who is interested, rwh86 is working on time-lapse integration directly into darktable:
https://github.com/darktable-org/darktable/compare/master...rwh86:dttl

But don't expect something useable here in the near future.

Also available in: Atom PDF