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
  • #1084
Closed
Open
Issue created Feb 06, 2023 by Cacsjep@Cacsjep4 of 6 checklist items completed4/6 checklist items

How do I force a framerate for an input container eg stream (MJPEG)

Overview

I am using pyav to grab an MJPEG Stream from an IP-Camera, the camera is set to 60FPS when using H264, the framerate is correct at 60FPS when using MJPEG (over HTTP) the framerates are at 25FPS.

I was not able to find a way to force 60FPS i tried to set time_base with setting an Fraction(1, 60) without an success, also when i try to set options like {"r": "60"} has no effect. Because FFMPEG does not know about the framerate it makes a guess or fallback i think to 25FPS

Expected behavior

A way to force a framerate

Actual behavior

Container properties after setting time_base Fraction(1, 60) base_rate: 25 guessed_rate: 25 time_base: 1/60

Investigation

Try to set params like time_base on stream and codec_context without an succcess. Passing params to stream or contatiner without an success

Research

I have done the following:

  • Checked the PyAV documentation
  • Searched on Google
  • Searched on Stack Overflow
  • Looked through old GitHub issues
  • Asked on PyAV Gitter
  • ... and waited 72 hours for a response.
Assignee
Assign to
Time tracking