user6095: I want to parse a large set of movie/advertisement mixture in one video file, i.e. some hours of video, and separate not only movie and advertisement, but also split/cut different advertisements into clips (I'm only interested in advertisement clips separated into different files). Is there a tool which allows to do such thing without interaction (most tools, e.g. kdenlive, have great scene recognition, but only split the clips into logical units for editing in the GUI)? Of course, scene detection isn't deterministic and some clips will require cutting, but that shouldn't matter.
The important thing is the separation of clips into files and the automatization (might be done within the program or on the console with Linux command pipes or an API for - lets say - python).
The program should run on Linux and be FLOSS software.

user3295: The only recent tool I know is a plugin for After Effects called Magnum - The Edit Detector. While After Effects isn't exactly the most suited program for these kind of tasks it would do what you want with some sort of control over it.
You can export the resulting clips/layers in After Effects via a script like redefinery's Layer Render script (seems the site is offline at the moment). You can also write your own scripts that suit your tasks in After Effects with the JavaScript based Adobe ExtendScript.
After Effects is very "batch" friendly and allows you to automate a lot of things and many people made cool scripts for similar tasks, so in the automation regard After Effects is definitely a nice tool.
Sadly After Effects isn't running on Linux, only Windows and OSX.
With Wine its running badly or not at all in the recent versions.
There is also a very outdated tool called ScenalyzerLive, maybe it does the job, I haven't really used it but it does auto scene detection and cutting based on that, not sure about mass exporting every scene to a file.

user6095: I found out about melt and created video-splitter which is a command line wrapper around the former. There might even be a very elegant way to do everything in a command pipe with two or three commands or even everything with one melt command.

user24472: I had a similar need as yours - to produce shorter videos with different scenes from a single large video. I came across PySceneDetect which provides two kinds of cutting method:

threshold scene detection (detect-threshold): analyzes video for changes in average frame intensity/brightness
content-aware scene detection (detect-content): based on changes between frames in the HSV color space

More information can be found on their website.

6095: <p>I want to parse a large set of movie/advertisement mixture in one video file, i.e. some hours of video, and separate not only movie and advertisement, but also split/cut different advertisements into clips (I'm only interested in advertisement clips separated into different files). Is there a tool which allows to do such thing without interaction (most tools, e.g. <code>kdenlive</code>, have great scene recognition, but only split the clips into logical units for editing in the GUI)? Of course, scene detection isn't deterministic and some clips will require cutting, but that shouldn't matter.</p>

<p>The important thing is the separation of clips into files and the automatization (might be done within the program or on the console with Linux command pipes or an API for - lets say - <code>python</code>).</p>

<p>The program should run on Linux and be FLOSS software.</p>
 3295: <p>The only recent tool I know is a plugin for After Effects called <a href="http://aescripts.com/magnum-the-edit-detector/" rel="nofollow">Magnum - The Edit Detector</a>. While After Effects isn't exactly the most suited program for these kind of tasks it would do what you want with some sort of control over it.</p>

<p>You can export the resulting clips/layers in After Effects via a script like redefinery's <a href="http://www.redefinery.com/ae/view.php?item=rd_RenderLayers" rel="nofollow">Layer Render script</a> (seems the site is offline at the moment). You can also write your own scripts that suit your tasks in After Effects with the JavaScript based Adobe ExtendScript.</p>

<p>After Effects is very "batch" friendly and allows you to automate a lot of things and many people made cool scripts for similar tasks, so in the automation regard After Effects is definitely a nice tool.</p>

<p>Sadly After Effects isn't running on Linux, only Windows and OSX.
With Wine its running badly or not at all in the recent versions.</p>

<p>There is also a very outdated tool called <a href="http://www.scenalyzer.com/" rel="nofollow">ScenalyzerLive</a>, maybe it does the job, I haven't really used it but it does auto scene detection and cutting based on that, not sure about mass exporting every scene to a file.</p>
 6095: <p>I found out about <code>melt</code> and created <a href="https://github.com/krichter722/video-splitter" rel="nofollow">video-splitter</a> which is a command line wrapper around the former. There might even be a very elegant way to do everything in a command pipe with two or three commands or even everything with one <code>melt</code> command.</p>
 24472: <p>I had a similar need as yours - to produce shorter videos with different scenes from a single large video. I came across <a href="https://github.com/Breakthrough/PySceneDetect" rel="nofollow noreferrer">PySceneDetect</a> which provides two kinds of cutting method:</p>

<ol>
<li>threshold scene detection (detect-threshold): analyzes video for changes in average frame intensity/brightness</li>
<li>content-aware scene detection (detect-content): based on changes between frames in the HSV color space</li>
</ol>

<p>More information can be found on <a href="https://pyscenedetect.readthedocs.io/en/latest/features/" rel="nofollow noreferrer">their website</a>.</p>
