Is there an automated process to split a video into sections with motion? 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.
There is a similar question in stack overflow

https://stackoverflow.com/questions/28320004/detect-if-video-file-contains-movement

Apart from OpenCV they also suggest SimpleCV http://simplecv.org/
and "Motion" http://www.lavrsen.dk/foswiki/bin/view/Motion/WebHome