Author Topic: Show current keyframe interval and (lossless?) insert additional keyframes?  (Read 78 times)

pstein

  • Jr. Member
  • **
  • Posts: 82
Assume I drag & drop an MP4 video file onto Avidemux.

How can I find out after how many frames a keyframe is following in current video file?

If it is e.g. more than 200 I want to insert additional keyframes after at most 50 frames.

How can I achieve this without loss of quality/having to re-code the video?

Is it possible at all?

eumagga0x2a

  • Moderator
  • Hero Member
  • *****
  • Posts: 2803
How can I find out after how many frames a keyframe is following in current video file?

Remux it as MKV, load this MKV in Avidemux and inspect the resulting Avidemux log. The MKV demuxer prints frame numbers of all keyframes to the log.

Alternatively, you could estimate from the FPS and the presentation time difference between two keyframes (set marker A to a keyframe, seek to the next one, set marker B to it, the duration of the selection is displayed in the selection widget). Multiply the selection duration with the FPS to get an approximate number of frames in this GOP.

Quote
If it is e.g. more than 200 I want to insert additional keyframes after at most 50 frames.

How can I achieve this without loss of quality/having to re-code the video?

This is impossible without re-encoding the video stream.