Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • P PyAV
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 37
    • Issues 37
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 26
    • Merge requests 26
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • PyAV
  • PyAV
  • Issues
  • #1091
Closed
Open
Issue created Feb 22, 2023 by Sebastian Wallkötter@FirefoxMetzgerContributor

Allow keyint_min to codec_context

IMPORTANT: Be sure to replace all template sections {{ like this }} or your issue may be discarded.

Overview

I would like to lobby for support of keyint_min in codec_context. This should be a straight-forward add and would allow us to fully control keyframeing behavior from python <3.

Currently we can already control the maximum keyframe interval (codec_context.gop_size) and whether to generate open/closed GOPs (codec_context.closed_gop). What is missing is to be able to set the minimum interval to complete the set :)

Existing FFmpeg API

https://ffmpeg.org/doxygen/trunk/structAVCodecContext.html#a3f920af17b8b15cc9d9465ecb732afcb

Expected PyAV API

Just like it does with all the other codec_context flags.

Example:

# force keyframes exactly every 10 frames
stream = container.add_stream("libx264", 24, ...)
stream.keyint_min = 10  # new
stream.gop_size = 10
stream.closed_gop = True

Investigation

There is no problem. Just a missing keyint_min = flags.flag_property('KEYINT_MIN') in context.pyx (I think).

Assignee
Assign to
Time tracking