Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error Audio frame discarded and Video frame discarded #1783

Closed
nguoitriki1 opened this issue Mar 28, 2025 · 4 comments
Closed

Error Audio frame discarded and Video frame discarded #1783

nguoitriki1 opened this issue Mar 28, 2025 · 4 comments

Comments

@nguoitriki1
Copy link

nguoitriki1 commented Mar 28, 2025

Describe the bug
Video frame discarded and Audio frame discarded errors. Appears when the screen does not change for about 1 minute.

To Reproduce
Steps to reproduce the behavior:

  1. Live stream with rtmps
  2. Create a monochrome screen or keep a full screen photo (covering all device tools like the status bar)
  3. The average error with virtual devices is about 1 minute. With real devices, it is about 5 minutes.
  4. Error alway and tested with perfect 5G network speed. The error only appears when the live streaming device screen does not have any changes for a certain period of time.

Screenshots
If applicable, add screenshots to help explain your problem.

Smartphone (please complete the following information):

  • Library version 2.5.9
  • Device: Android studio virtual device api 34 , Infinix Hoti30 X669D (Android 12)
  • OS: Android 14, Android 12
Image
@pedroSG94
Copy link
Owner

Hello,

Did you test using the app example?
Which media server are you using?

@pedroSG94
Copy link
Owner

Also, make sure that in your code you are using this:
https://github.com/pedroSG94/RootEncoder/blob/master/app/src/main/java/com/pedro/streamer/screen/ScreenService.kt#L89

This is to force the library send video frames even if the screen never change because fews platform need audio and video tracks or the connection will be closed.
Maybe the problem is that the connection is closed for that reason but it isn't detected.
I did a test of 10min streaming vs Facebook with totally black screen without problems using the app example.

@nguoitriki1
Copy link
Author

Thanks for your feedback on this issue. I will try your suggestions and check back to see if the issue is resolved.

@nguoitriki1
Copy link
Author

Thanks for the guidance on how to implement this.
Previously I was using an object of the RtmpDisplay Class so I couldn't setup it and got this error because RtmpDisplay doesn't use GlInterface. I will close this issue. Thanks for your kind support

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants