Avidemux Forum

Avidemux => Main version 2.6 => Topic started by: TheInvoker on August 20, 2022, 09:52:25 PM

Title: Keep the same distance between frames
Post by: TheInvoker on August 20, 2022, 09:52:25 PM
how do i keep the same distance between frames/keyframes?
Title: Re: Keep the same distance between frames
Post by: eumagga0x2a on August 22, 2022, 09:33:21 PM
I'm not sure what you mean with "same distance between frames". Turning a variable frame rate video into constant frame rate one? This is achievable by re-encoding video with "resample fps" video filter added to the filter chain.

Regarding "same distance between keyframes", most encoders allow setting keyframe interval (the minimum and maximum number of frames between two keyframes). Some low-quality encoders like the NVENC-based H.264 encoder on old NVIDIA hardware support only a fixed, user-configurable interval, which is a very poor strategy. I hope you don't ask for the latter mode.
Title: Re: Keep the same distance between frames
Post by: TheInvoker on August 22, 2022, 10:11:26 PM
no i mean the distance between keyframes
in the past you told me i can modify it changing gop numbers (min max), but if i don't want to change it?
Title: Re: Keep the same distance between frames
Post by: eumagga0x2a on August 22, 2022, 10:24:33 PM
Quote from: TheInvoker on August 22, 2022, 10:11:26 PMin the past you told me i can modify it changing gop numbers (min max), but if i don't want to change it?

The result will reflect the default configuration of the respective video encoder then (which is encoder-specific).

Or do you ask for means to force particular frames being encoded as keyframes (e.g. based on the strategy of the encoder which had created the source video)? This is not implemented.
Title: Re: Keep the same distance between frames
Post by: TheInvoker on August 29, 2022, 04:49:44 PM
it's not hard to understand what i ask
KEEP THE SAME DISTANCE BETWEEN FRAMES AND KEYFRAMES

if a file has the first keyframe a 0,481ms, the second keyframe at 1,003ms etc etc....the output file should have the same timestamps for those keyframes. i don't want to change anything
Title: Re: Keep the same distance between frames
Post by: Blues on September 01, 2022, 08:00:00 PM
Keyframe is an element of video compression. When the video is decoded [to be processed] these keyframes are gone. The stream coming from decoder has no keyframes, it is just uncompressed video. Now you encode this stream again, how the heck encoder could know where the keyframes were before decoding? Preserving keyframe positions is not natural part of decoding and re-encoding process. To implement this the program must specifically go back to the source, register the position of keyframe and use this information to force a keyframe insertion by encoder. I do not see how this complicated procedure could benefit users.
Indeed, the beauty of open source is you can always get busy and make the changes you desire by yourself.