Show current keyframe interval and (lossless?) insert additional keyframes?

Started by pstein, May 17, 2019, 01:26:07 PM

Previous topic - Next topic

pstein

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

Quote from: pstein on May 17, 2019, 01:26:07 PM
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.

QuoteIf 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.

Mamecube

Quote from: pstein on May 17, 2019, 01:26:07 PM
If it is e.g. more than 200 I want to insert additional keyframes after at most 50 frames.
Complain to video production/editor designers about their defaults. I agree, this 200 frame thing is obnoxious and a relic from the late 90s and Usenet anime piracy. A key frame every 15 seconds simply should not be a thing in the age of h264 - but it is.