Shot detection for Natron


Hi everyone,
I am trying to develop a plugin or tool for shot detection in a movie for Natron. We already have the algorithm that calculates shot’s boundaries implemented, tested and working in Matlab, so now our next step is to adapt it for Natron and OpenFX. It works as this: for each pair of consecutives frames, the algorithm calculates a certain probability that the latter one is the beginning of a new shot. So then, we take the ones with the highest probabilities and take them as shot cuts.

What do you think would be the best way to do this in Natron? At first we thought of an OpenFX plugin, but we don’t like the idea of a user having to create a node for this, or worse having to play the movie so the plugin can read all the frames. Or are we missing something, and we can read all frames without having to play the whole movie?
For example, we would like to do something as the “Image Statistics” plugin.

Could another option be to use the Python API? We haven’t explored much of the API.

Thank you in advance!


I’m not an expert , but I think doing something like image statistic is the way to go…
You’ll have to make the plugin read the whole movie once, or he’ll try to access all the frame every-time you seek in the timeline.

Another solution would be to calculate the cuts outside Natron and just make a plugin that read a kind of an EDL to expose the cuts to the users…
Or a python script that load each shot as a node based on the kind of EDL…

That’s another issue, once you know all the cut of the movie , how it should work in Natron ? how do you get all these shots in Natron and apply various effect on each of them ?


doesn’t shot detection belong in the NLE?