Changes between Version 1 and Version 2 of Ticket #442, comment 1


Ignore:
Timestamp:
Sep 7, 2011, 7:06:07 PM (8 years ago)
Author:
lovelove
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #442, comment 1

    v1 v2  
    66----
    77
    8 "You could store the various first frames of each scene in order to get a sort of photographic storyline of a movie, or you could store the timestamps somewhere in order to use that to automatically cut every movie 'shot' with a video editor. Both options should be possible with FFmpeg+libavfilter." (Stefano Sabatini)
     8"You could store the various first frames of each scene in order to get a sort of photographic storyline of a movie, or you could store the timestamps somewhere in order to use that to automatically cut every movie 'shot' with a video editor. Both options should be possible with FFmpeg+libavfilter." ''(Stefano Sabatini)''
    99
    1010----
     
    1616As 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.
    1717
    18 The sc_detect filter implementation is the tricky part, but a naive implementation shouldn't be too hard to accomplish." (Stefano Sabatini)
     18The sc_detect filter implementation is the tricky part, but a naive implementation shouldn't be too hard to accomplish." (''Stefano Sabatini)''
    1919
    2020----
     
    2626"On the technical side: this has been already discussed on ffmpeg-devel, an underkill solution may be as simple as tweaking the select filter and adopt a simple pixel-per-pixel average difference as metric.
    2727
    28 For images with moving objects that's not a proper solution, and you need motion estimation code, which is already integrated in libavcodec, so the ideal solution would be to refactor the ME code in libavcodec and move it to libavutil. By doing this you may also improve the code itself, and thus improve the codecs using it at the same time." (Stefano Sabatini)
     28For images with moving objects that's not a proper solution, and you need motion estimation code, which is already integrated in libavcodec, so the ideal solution would be to refactor the ME code in libavcodec and move it to libavutil. By doing this you may also improve the code itself, and thus improve the codecs using it at the same time." ''(Stefano Sabatini)''
    2929
    3030----
     
    3232"For ideas/details about how to implement a scene-cut detection, I would suggest looking at the code of shotdetect (Johan Mathe is really nice, and the license is LGPL by the way). His approach is actually really simple and straightforward, and we've now been using it in our long-term archive solution for quite a while and could provide information based on hands-on experience about what to expect from that straight-forwards algorithm.
    3333
    34 I'm mentioning this, because I think Johan's algorithm is merely a variation of a "pixel-per-pixel average difference" and it works surprisingly well - on really different kinds of content." (Peter B.)
     34I'm mentioning this, because I think Johan's algorithm is merely a variation of a "pixel-per-pixel average difference" and it works surprisingly well - on really different kinds of content." ''(Peter B.)''