Sign up ×
Video Production Stack Exchange is a question and answer site for engineers, producers, editors, and enthusiasts spanning the fields of video, and media creation. It's 100% free, no registration required.

I have some video files with a reasonably static background and the occasional movement in the scene. I would like to edit down the footage to just the sections with movement in. As there are several hours of footage I would rather not do it by hand.

I hoped to find a script or utility that I could pipe the media into and get segments with motion out the other side. My limited searching has not suggested anything that could do this, unless I can get VLC to use its motion filter somehow to tag things.

I would rather use a free or FOS system, as I am cheap. If that is not an option then I will consider paying. I am happy for the software to be Windows or Linux based. I would rather not dump all the frames as stills, run a diff and re-encode but if that is the only way then I can probably work with that. I can do coding in C, C++, Ruby and a couple of other scripting languages if pushed. I don't mind spending a bit of time to write something if nothing is available and others might find it helpful. I don't have a background in media processing though, so although I understand the concepts I would be rather lost at picking libraries to use as a starting point and so on.

Video is of a bird feeder with a hedge and fence behind it. There is some slow shadow travel as the sun moves but otherwise the background seems stable. I think about 5% of the frame will be filled by the movement I need to pick up on. I only mention that because I have setup ZoneMinder motion capture in the past so I am familiar with its filter settings.

Even if someone cannot give me a complete answer, I would be grateful to some hints, suggestions and keywords that help me carry this forward.

share|improve this question
I would start by researching opencv. Perhaps there is an open-source application that uses it and already does what you want. –  kazanaki Jun 4 at 7:35
Also I think that imageMagick can process video and it includes a diff function that compares too images. Perhaps you can instruct to discard frames where the diff is 0 and keep frames when there is an actual difference –  kazanaki Jun 4 at 8:07
Bit of clicking though lead to something helpful sounding "Look here in order to find use on your video stream algorithms like: motion extraction..."… Sadly it seems there is no tutorial there yet. I'll see about either finding or setting something up with OpenCV though, then maybe add some notes there. Thank you for the suggestion. –  TafT Jun 4 at 13:52

1 Answer 1

There is a similar question in stack overflow

Apart from OpenCV they also suggest SimpleCV and "Motion"

share|improve this answer
If you add a downvote, at least add a comment on why. Otherwise how can I improve this answer? –  kazanaki Jun 5 at 22:11

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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