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.

  • So you want to automatically cut tv footage by scene and seperate ads from the movies and ditch the movie part? What do you mean "automatic clip creation" in that case? Auto cutting based on scene detection? – PTS Jun 22 '14 at 13:07

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.


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.


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:

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

More information can be found on their website.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.