Video freezing
Apologies in advance for the vagueness of this report.
We have an app using this library for video streaming. Some users are reporting that video appears to freeze when they're streaming. Sometimes the video stutters for just a few moments, but other times the video freezes for 30 seconds or more.
From our stats the connection looks fine (no fluctuations in bitrate or dropped connections).
We suspected it may have been a processing issue, but this has been reported from users on a variety of devices, including a Samsung Galaxy S23+ which I would have thought was very capable.
These users have been able to stream using Larix Broadcaster without the same issues.
Unfortunately we've been unable to reproduce the issue, so I don't have any relevant logs or particular cases where this happens.
Just wondering if anyone has seen similar issues before. The closest issue I found was this: https://github.com/pedroSG94/rtmp-rtsp-stream-client-java/issues/1003, but that's to do with using filters, which we are not.
Hello,
Stream freezed is normally related with the following cases:
- Bad internet connection that produce lose key frames
- Inconsistently key frame rate. Normally produced by device encoder that doesnt produce key frames at good rate caused by a bugged encoder or a problem with the encoder configuration
Where do you have that freezes?
- live stream or vod of the live stream?
- Is it possible to reproduce the error consistently?
- Is the audio working while the video is freezed?
Meanwhile few ideas to test:
- If you have adaptative bitrate remove it
- If you are able to reproduce the error try to use a local server to remove internet issues
- Test with differents iFrameIntervals values (recommended -> 1, 2, 5, 10). iFrameInterval is the rate specified to generate key frames. The value is basically the number of seconds where you will generate a key frame. For example: 1 -> 60 key frames per minute 10 -> 6 key frames per minute 0 -> all frames are key frames (this produce a massive increase of bandwith so it is not recommended)
- If you can, check if you are receiving key frames consistently in your server side
- Try to force use software video encoder (it is to discard bugs in the device encoder because hardware encoders are priorized)
Also, if possible provide me:
- Parameters of prepareVideo method
- Platform/Server used (youtube, twitch, AWS, etc) and stream configuration if needed
- An extended list of devices with the problem. Maybe I have one device or we can find a relation about the problem like CPU, manufacturer, etc
Just answering a couple of questions, I'll try to get more info.
Where do you have that freezes? live stream or vod of the live stream?
Both the live stream and the vod of the live stream
Is the audio working while the video is freezed?
Audio is also not coming through
If you have adaptative bitrate remove it
Not using adaptive bitrate
Also, if possible provide me: Parameters of prepareVideo method
We make resolution and bitrate configurable by the users, but generally they're using a resolution of 1280x720, bitrate of somewhere between 500Kbps and 6000Kbps, and FPS is currently always set at 30
An extended list of devices with the problem
At the moment we have:
- S10 5G
- S23+
We have two users streaming from the same location using the same internet connection and one user with a S22 has no issues, but a user with an S10 5G with no issues.
Hello,
Audio is also not coming through
Both the live stream and the vod of the live stream
This is really relevant. If you don't receive audio and video you can discard key frames lost because since the effect could be similar if you are losing video keyframes you should can hear the audio without issues (audio buffer has no key frames).
Also if you have the same problem on vod that means that you are losing that frames (audio and video) totally.
We have two users streaming from the same location using the same internet connection and one user with a S22 has no issues, but a user with an S10 5G with no issues.
Is it a typo and S10 5G has problems? Assuming that you are using rtmp. If you can reproduce it with Samsung S10, we can try to stream to a well know platform like Youtube to discard problems in server side. Also try with a video bitrate really low. The video quality is not important because we will try to discard if we have a bottleneck in the rtmp cache in my library (basically my library is dropping frames because the cache is full to avoid memory leak instead of use an infinite cache). If it is the case, the problem will be reduced or fixed by this way. Try with a bitrate like 200kb
Closing as inactive.