Replies: 6 comments
-
The library itself does not have the capability to drop frames. If video frames cannot be sent due to temporary congestion or other factors, there may be a delay in frames, but when the bandwidth recovers, it should catch up and recover. For frame dropping and bitrate control, it's discussed here. The approach is to have library users implement these features themselves.#1252 |
Beta Was this translation helpful? Give feedback.
-
Thanks for explaining. in func streamWillDropFrame(_ stream: NetStream) -> Bool { function there's no access to rtmpConnection to be able to tell how much back are the frames currently sending. Can we control the buffer window size? |
Beta Was this translation helpful? Give feedback.
-
@shogo4405
|
Beta Was this translation helpful? Give feedback.
-
Recently, we have been sending larger volumes, so I'm planning to implement bitrate change algorithms in multiple scenarios. |
Beta Was this translation helpful? Give feedback.
-
Let's assume a video size of 3Mbps at 30FPS as the expectation. Since the VideoToolbox encoder is ABR (Adaptive Bitrate), dropping a few frames within one second will get us closer to 3Mbps. The effective way to avoid delaying frames is to lower the bitrate for the video. It's advisable to lower the framerate to 15FPS when reducing the adaptive bitrate down to 1.5Mbps. |
Beta Was this translation helpful? Give feedback.
-
OK, thanks @shogo4405 I was able to tune the algorithm to take into account the previousQueueBytesOut to keep the queue to minimum |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I got a situation where stream went on for 48 minutes and only 40 minutes of video is recorded.
It looks like in transcoding in the second part of video it started to lag significantly falling behind to 0.7x
Inspecting video recorded on server it looks like library may have been sending frames late without dropping frames..
Here's the analysis of the frames in recorded video:
Attaching progress log:
ffmpeg-OMTGVO-progress.log
Is this possible that under certain situation the library sends old frames way behind @shogo4405 ?
Beta Was this translation helpful? Give feedback.
All reactions