VideoHelp Forum
+ Reply to Thread
Results 1 to 7 of 7
Thread
  1. Does anybody know a faster way to collect scene change infos?

    Looking at:
    38.77 showinfo

    Show a line containing various information for each input video frame. The input video is not modified.

    The shown line contains a sequence of key/value pairs of the form key:value.

    It accepts the following parameters:

    ‘n’

    The (sequential) number of the input frame, starting from 0.
    ‘pts’

    The Presentation TimeStamp of the input frame, expressed as a number of time base units. The time base unit depends on the filter input pad.
    ‘pts_time’

    The Presentation TimeStamp of the input frame, expressed as a number of seconds.
    ‘pos’

    The position of the frame in the input stream, or -1 if this information is unavailable and/or meaningless (for example in case of synthetic video).
    ‘fmt’

    The pixel format name.
    ‘sar’

    The sample aspect ratio of the input frame, expressed in the form num/den.
    ‘s’

    The size of the input frame. For the syntax of this option, check the "Video size" section in the ffmpeg-utils manual.
    ‘i’

    The type of interlaced mode ("P" for "progressive", "T" for top field first, "B" for bottom field first).
    ‘iskey’

    This is 1 if the frame is a key frame, 0 otherwise.
    ‘type’

    The picture type of the input frame ("I" for an I-frame, "P" for a P-frame, "B" for a B-frame, or "?" for an unknown type). Also refer to the documentation of the AVPictureType enum and of the av_get_picture_type_char function defined in ‘libavutil/avutil.h’.
    ‘checksum’

    The Adler-32 checksum (printed in hexadecimal) of all the planes of the input frame.
    ‘plane_checksum’

    The Adler-32 checksum (printed in hexadecimal) of each plane of the input frame, expressed in the form "[c0 c1 c2 c3]".
    source: https://www.ffmpeg.org/ffmpeg-all.html#showinfo

    I see multiple options, but I can't get how to extend my call:
    Code:
    ffmpeg -i "Path to input" -an -sn -vf select=gt(scene\,0.4),showinfo -f null -
    to only get the 'n', 'iskey', 'type' and 'pts_time' info and no other.

    Cu Selur
    users currently on my ignore list: deadrats, Stears555
    Quote Quote  
  2. Member vhelp's Avatar
    Join Date
    Mar 2001
    Location
    New York
    Search Comp PM
    Code:
    ffmpeg -hide_banner -i "e:\video.mpg" -vf "showinfo" -f null -
    or, when creating a new video, save time and do in one shot.

    Code:
    ffmpeg -hide_banner -i "e:\video.mpg" -vf "showinfo" -y "video_showinfo.mpg
    use GREP to filter only what you want to see.
    Quote Quote  
  3. a. That way I would loose the info whether the frame is a scene change according to the threshold (0.4 in my case) since showinfo itself doesn't contain this info.
    b. using grep doesn't tell me how to understand and use the documentation of ffmpeg
    users currently on my ignore list: deadrats, Stears555
    Quote Quote  
  4. It says the filter doesn't take any arguments when you actually use it, so you probably have to use them all (you can't just limit it to displaying a select few). Perhaps the documentation isn't worded properly, because it doesn't accept any parameters
    Quote Quote  
  5. Member vhelp's Avatar
    Join Date
    Mar 2001
    Location
    New York
    Search Comp PM
    i was going to say that the documentation is a little missleading.. not to mention doesn't give example usage.
    Quote Quote  
  6. Member vhelp's Avatar
    Join Date
    Mar 2001
    Location
    New York
    Search Comp PM
    grep won't work for listings like that ffmpeg -vf showinfo -f null - produces.

    it is mainly effective when you have consistent "series" type lists, like the one's that ffprobe produces.

    so it looks like you will have to custom parse the list for the { 'n', 'iskey', 'type' and 'pts_time' } criteria you mentioned in post # 1.
    Quote Quote  
  7. parsing isn't the problem
    btw. created an entry in the ffmpeg bug tracker: https://trac.ffmpeg.org/ticket/3850

    ---

    Update: they adjusted their documentation, showinfo doesn't have any parameters.
    Last edited by Selur; 15th Oct 2014 at 04:49.
    users currently on my ignore list: deadrats, Stears555
    Quote Quote  
Visit our sponsor! Try DVDFab and backup Blu-rays!