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.