filter out on boolean event

Stefan Sauer ensonic at hora-obscura.de
Sun Jan 29 05:44:12 PST 2012


On 01/24/2012 11:50 PM, ctor dtor wrote:
> Hi everybody,
> the problem that I am trying to solve is turning to a more generic one
> so the related discussion maybe of general interest.
> My need started around the "motion" plugin but soon it became
> applicable to its more viable alternative too - the "motiondetector"
> plugin.
> Both these plugins do perform motion detection on a video stream, both
> signaling with a similar message the motion detected/undetected status
> change.
> I was looking for, at least, one of the following features implemented
> via gstreamer plugin or app, on the basis of the "motion detected" status:
>
> a) being able to only filter out video frames where motion is
> detected, resulting in a rebuilt continuous video stream (hopefully
> with no still frames).
> Maybe an example for this is the audio "cutter" filter.
>
> b) writing out a different video file/stream whenever the "motion
> detected" status does change, in the same fashion that multifilesink does
>
> One of the first tries in order for b) was to modify the multifilesink
> code in order to cut output files on the "motion detected" status change.

Wouldn't it work if you simply drop non-motion frames and let
multifilesink split videosequences based on the discont event (your
motion-drop element would need to set the discont flag on the first
motion frame after a still-sequence).

Stefan

> A skeleton pipeline for this could be
>         filesrc ! \
>         (video decoding elements) ! \
> (x)    motion ! \
>         (video encoding elements) ! \
> (y)    multifilesink
>
> Please tell me if wrong, I understood that only a gstreamer
> application building a pipeline can notify (y) on the basis of a
> message from (x),
> so in order for b) writing a plugin derived from multifilesink won't
> suffice.
> Now I am trying to write a gstreamer application, I was able to build
> up the pipeline and manage a bus callback for the "motion detected"
> message,
> but I think I will take a break in writing unuseful code... :)
>
> I believe however that my approach is applicable to any plugin, other
> than motion detection related, that performs an analysis on the video
> stream
> resulting in assigning a boolean value to each frame passed. The final
> sink implementing a) or b) could be far down the pipeline.
> To me it seems a quite generic problem, name it "boolean event filter"
> e.g., so I guess there could be solutions around... any ideas ?
> Thanks everybody for the interest,
>
> Bye
>
>
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20120129/7c5a02c8/attachment.htm>


More information about the gstreamer-devel mailing list