I'm using mpv in encoding mode (--o=...), trying to make it so it outputs a keyframe every second, regardless of frame rate (which can potentially vary from 24 to 60fps in one encoding).
The way this is done in ffmpeg is with the helpful parameter -force_key_frames which can take a measure of time or an expression to calculate how often there should be a keyframe.
I've tried adding it as a key/value in --vd-lavc-o and --demuxer-lavf-o but I get AVOption 'force_key_frames' not found and Could not set AVOption force_key_frames='expr:gte(t,n_forced*1)' respectively.
As far as I can tell I can only define my keyframe interval by setting ovcopts-add=g=<number> or ovcopts-add=x264opts=%36%keyint=<number>:min-keyint=<number>:no-scenecut, but these are not capable of defining intervals as time unlike -force_key_frames.
Is there any way to do this with a pre-existing mpv commandline argument without altering the source code? If not, how can I add it as a parameter to my fork of MPV?
I'm using mpv in encoding mode (--o=...), trying to make it so it outputs a keyframe every second, regardless of frame rate (which can potentially vary from 24 to 60fps in one encoding).
The way this is done in ffmpeg is with the helpful parameter
-force_key_frames
which can take a measure of time or an expression to calculate how often there should be a keyframe.I've tried adding it as a key/value in --vd-lavc-o and --demuxer-lavf-o but I get
AVOption 'force_key_frames' not found
andCould not set AVOption force_key_frames='expr:gte(t,n_forced*1)'
respectively.As far as I can tell I can only define my keyframe interval by setting
ovcopts-add=g=<number>
orovcopts-add=x264opts=%36%keyint=<number>:min-keyint=<number>:no-scenecut
, but these are not capable of defining intervals as time unlike-force_key_frames
.Is there any way to do this with a pre-existing mpv commandline argument without altering the source code? If not, how can I add it as a parameter to my fork of MPV?