Replies: 2 comments 2 replies
-
I don't think there is anything PyAV can do for you here: if you are unable to process all the frames in time, then.. don't? You are going to have to decimate the number of frames you process if you want to keep up with realtime. Something like:
|
Beta Was this translation helpful? Give feedback.
2 replies
-
you can set ffmpeg |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Overview
I`m read RTSP stream with PyAV frame by frame. And for each frame make some processing. All good, but sometimes processing takes longer than the time between frames and my processed video starts lagging behind real time. This gap is constantly growing.
Obviously it's because of the input buffer.
Expected behavior
I want to decrease buffer size to one frame.
Actual behavior
To synchronize with real time i need read all frames from buffer.
Investigation
try set flag:
container.flags |= av.container.Flags.NOBUFFER
try set low delay:
container.streams.video[0].codec_context.flags |= av.codec.context.Flags.LOW_DELAY
Research
I have done the following:
Beta Was this translation helpful? Give feedback.
All reactions