[FFmpeg-user] Scene detection
Mark Himsley
mark at mdsh.com
Sun Aug 7 16:47:15 CEST 2011
On 07/08/2011 15:16, lovelove wrote:
> Hi, can someone please help a desperate soul like me?
>
> I am in the same situation as Fori Pepe
>
>
> Fori Pepe wrote:
>>
>> I would like to export/extract images from videos at every scene changes.
>> Is it possible to use ffmpeg to create images on scene changes?
>> It would be the most comfortable to use it like this:
>> ffmpeg -i test.mpg --detect_scene_changes newscene[00-99].png
>>
>
> ... i.e. export first frame of each new scene as an image. This effectively
> generates a storyboard.
> It also would be an enormous help in identifying added and deleted scenes
> when comparing 2 videos.
>
> this was the last answer in that thread:
>
>
> Stefano Sabatini wrote:
>>
>> The fake syntax for a lavfi filter [...] would be something of the kind:
>>
>> ffmpeg -i in.avi -vfilters "[IN] split [SC_DETECT] [OUT], [SC_DETECT]
>> sc_detect=PARAMS, process_sc_frames=PARAMS" /dev/null
>>
>> As you see you would need two filters, one detecting scene changes and
>> outputting the detected scene change frames to the output, and a
>> filter to furtherly processes the information of the frames, for
>> example it could print to a file the timestamp of the file or to
>> render as an image file the processed frames.
>>
>> The sc_detect filter implementation is the tricky part, but
>> a naive implementation shouldn't be too hard to accomplish.
I wonder if any code from the BBC R&D's open source (LGPL) Video Shot
Change Detector could be used?
http://www.bbc.co.uk/opensource/projects/shot_change/
--
Mark
More information about the ffmpeg-user
mailing list