movimento
Você não diz qual aplicativo você está tentando fazer com essa informação, mas se estiver lidando com uma câmera de segurança, sugiro dar uma olhada no pacote de movimento .
Você pode fazer algo nos moldes em que está perguntando, onde o movimento mostrará o delta entre uma imagem de referência e um feed de vídeo.
Exemplo
avconv
Também encontrei este post no blog que discute um recurso que pode ser útil para solucionar seu problema. O artigo intitulado: Detecção de alterações de cena com ffmpeg (avconv) para extrair miniaturas significativas .
trecho
The good news now are that we can employ automated tools to do just that. Ffmpeg (avconv) has all the stuff we need in its libavfilter library to extract still images from a video not every x seconds but every time the video image significantly changes (what more or less equals a scene change). This magic is commonly known as scene change detection.
One approach is to let the video codec do the hard work. Most codecs employ a “key frame” identification technique, that means “this frame is a new scene” (I-frame) and subsequent images change only slightly from that “master frame” and so the codec can store the difference only (B-Frames) instead of full frames. Now, in ffmpeg Stefano Sabatini’s select filter goes through the video and triggers a save of the respective frame only when it encounters an I-Frame / key-frame (probably the beginning of a new scene)
$ ffmpeg -vf “select=’eq(pict_type,I)’” -i somevideo.mp4 \ -vsync 0 -f image2 /tmp/thumbnails-%02d.jpg
This approach works, but isn’t perfect. That why Clément Boesch added scene, a scene detection subfilter for select. If your build of ffmpeg has this code, you can call it like this:
$ ffmpeg -vf “-vf select=’gt(scene\,0.9)’” -i somevideo.mp4 \ -vsync 0 -f image2 /tmp/thumbnails-%02d.jpg
In case your ffmpeg/avconv complains about “Undefined constant or missing ‘(‘ in ‘scene’” you probably don’t have the scene detection code in your compile of libavfilter/vf_select.c.
Sidenote:
If ffmpeg/avconv complains about “”Missing ‘)’ or too many args in …” you probably used the examples from the docs, with an escaped comma, no surrounding quotes etc. Make sure that you include the whole “filtergraph” in quotes, like -vf “” where has our “select=…” stuff, including single quotes.