VideoHelp Forum
+ Reply to Thread
Results 1 to 5 of 5
Thread
  1. How can I detect black frames and add keyframes at the detected black frame in single FFmpeg process?
    Quote Quote  
  2. Member
    Join Date
    Aug 2013
    Location
    Central Germany
    Search PM
    Many modern codecs detect scene changes on their own if you allow them to manage GOPs freely.
    Quote Quote  
  3. Originally Posted by LigH.de View Post
    Many modern codecs detect scene changes on their own if you allow them to manage GOPs freely.
    Is GOP more efficient? Right now, Im forcing keyframe every 1 second in the video, which is making the video size excessive. Can it detect ads and place a keyframe at the start of the show?

    Thanks
    Quote Quote  
  4. Member
    Join Date
    Aug 2013
    Location
    Central Germany
    Search PM
    Do you even know what GOP means? ... Wikipedia: Group of pictures

    Modern video formats always have GOPs in any way. Even if they contain only I-frames, then the GOPs are only 1 frame long. Some commercial media formats add restraints, e.g. on a DVD Video or a Blu-ray video, GOPs must not exceed a specific length to allow fast-forward playback and other convenient functions even on a slow-seeking optical medium. But they may be shorter if a scene change is detected.

    Video encoders may add a shorter GOP when a scene change is detected in the middle of one. But not all do that, some stubbornly make GOPs of a fixed length no matter which content appears. It may depend on the options how the encoder is set up. The x264 encoder, for example, by default allows the encoding of rather long GOPs, possibly several seconds continuously; if it is set up to encode with Blu-ray compatibility, it restricts GOPs to a maximum of 1 or 2 seconds, depending on some video attributes, but they may still be shorter, when a scene change is detected. This usually happens when the content of the whole video frame changes so much that hardly any similarity to the previous reference frames can be detected, so it would not be efficient to encode that frame as P or B frame (as difference to one or more previously encoded frames).
    Quote Quote  
  5. Originally Posted by doughnuts View Post
    How can I detect black frames and add keyframes at the detected black frame in single FFmpeg process?
    Answer is simple - probably you can't perform such functionality in single ffmpeg process - in theory you can try to analyze video for black frames and create list of them then run your favorite codec in 2 pass mode (if your codec support 2 pass or multipass encoding) - if your codec in 2 pass mode can create list of frame types (sort of analysis log) then you may try to modify such list and add some keyframes at desired places...

    This is lot of effort and mostly manual as i'm not aware of any automate capable to made this automatically.
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!