[FFmpeg-user] videodetect filter? - equivalentto:https://ffmpeg.org/ffmpeg-filters.html#silencedetect

Mark Hassman mark at hassman.org
Sun Apr 10 23:51:55 CEST 2016


> -----Original Message-----
> From: ffmpeg-user [mailto:ffmpeg-user-bounces at ffmpeg.org] On 
> Behalf Of Paul B Mahol
> Sent: Sunday, April 10, 2016 5:30 PM
> To: FFmpeg user questions
> Subject: Re: [FFmpeg-user] videodetect filter? - 
> equivalentto:https://ffmpeg.org/ffmpeg-filters.html#silencedetect
> 
> On 4/10/16, Mark Hassman <mark at hassman.org> wrote:
> >
> >> -----Original Message-----
> >> From: ffmpeg-user [mailto:ffmpeg-user-bounces at ffmpeg.org] 
> On Behalf 
> >> Of Paul B Mahol
> >> Sent: Sunday, April 03, 2016 11:42 AM
> >> To: FFmpeg user questions
> >> Subject: Re: [FFmpeg-user] videodetect filter? - equivalent 
> >> to:https://ffmpeg.org/ffmpeg-filters.html#silencedetect
> >>
> >> On 4/3/16, Moritz Barsnick <barsnick at gmx.net> wrote:
> >> > On Sat, Apr 02, 2016 at 17:02:19 -0400, Mark Hassman wrote:
> >> >> Any chance someone knows a set of filters to accomplish 
> the same 
> >> >> thing for video as:
> >> https://ffmpeg.org/ffmpeg-filters.html#silencedetect.. i.e.
> >> >> timestamps output for start/end of motion.
> >> >
> >> > While silence would be more like darkness in video ;-) I
> >> get what you
> >> > mean:
> >> >
> >> >> I've looked at:
> >> >> http://www.lavrsen.dk/foswiki/bin/view/Motion/WebHome, 
> but already 
> >> >> transcoding with ffmpeg - hoping to add a simple filter to
> >> accomplish the same.
> >> >
> >> > I too am looking for a filter which can at least imitate simple 
> >> > features of the tool "motion", as motion only does
> >> real-time detection
> >> > from input devices. This would mean replicating "motion"'s
> >> algorithms
> >> > in a filter, or using existing filters.
> >> >
> >> > I once tried, and had come to the conclusion - from reading
> >> the docs -
> >> > that the decimate filter might be close to the right thing.
> >> While the
> >> > docs mention "regular intervals", which wouldn't be
> >> appropriate, they
> >> > also speak of "threshold for duplicate detection" and 
> "detection of 
> >> > [small] movements". I have never gotten the decimate 
> filter to work 
> >> > for anything I needed it for though, which went beyond
> >> motion detection.
> >> >
> >> > For anyone willing to help out, here are the main 
> chaacteristics of 
> >> > "motion"'s features, some of which may not be feasible
> >> within ffmpeg:
> >> > - Detection of motion by observing the number of changed 
> pixels from
> >> >   one frame to the next, and passing this detected frame 
> on to the
> >> >   output. (This could be a percentage or a mean square deviation
> >> >   instead, but "motion" doesn't support that.)
> >> > - Retaining a configurable amount of images before and after the
> >> >   detected event.
> >> > - Optionally visually marking the section of the video
> >> where the change
> >> >   was detected. (This could be in frame metadata instead,
> >> but "motion"
> >> >   doesn't support that.)
> >> >
> >> > At least the first point would be nice to have, but I'd 
> rather not 
> >> > implement such a filter which reinvents the wheel.
> >> >
> >> > In other words: I too would appreciate a hint as how to use
> >> ffmpeg's
> >> > filters to achieve this.
> >>
> >> See singnalstats filter.
> >
> >
> > Thanks for the advice!
> >
> > Using signalstats YDIF, I'm able to derive what I need. 
> However, I'm 
> > unable to get the data out of ffmpeg for parsing/eventing.
> >
> > The drawtext filter has access to all the set_meta values
> > 
> (https://ffmpeg.org/pipermail/ffmpeg-cvslog/2014-June/078245.html) - 
> > injecting the relevant data via graphical overlay works as 
> expected, 
> > but I can't find a way to push into stdout or ascii file.
> >
> > Unsuccessfully, i've been looking for another filter capable of 
> > accessing ffmpeg's internal meta tags to accomplish this. 
> The closest 
> > i've found is showinfo, but i can't specify which meta tags to use.
> >
> > I've also tried the scene filter, but it modifies the video 
> - i need 
> > only reporting.
> >
> > Note: I'm using ffmpeg - not ffprobe as this is a live 
> encode.. ffmpeg 
> > doesn't support -show_entries/frame_tags. Is there any way to 
> > effectively reproduce this with ffmpeg?
> >
> 
> ffprobe or with ffmpeg and metadata filter.
> 

metadata filter
Perfect!!

Thank you!
:-)



More information about the ffmpeg-user mailing list