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

Do not send Audio stream in SRT #1698

Open
cryinrain69 opened this issue Jan 10, 2025 · 11 comments
Open

Do not send Audio stream in SRT #1698

cryinrain69 opened this issue Jan 10, 2025 · 11 comments
Assignees
Labels

Comments

@cryinrain69
Copy link

Describe the bug

I am using SrtCamera2 + OpenGlView.

During the first livestream, everything seemed to work fine. The server received both image and sound.
But after stopping the livestream, and livestreaming again (all subsequent livestreams), the server only received images but no sound.
Only when I exited the application and reopened it. Started the livestream again, then there was sound. And the no sound error will repeat if I continue to stop and start the livestream.
It can be understood simply like this:
Start livestream (server receives image + sound) => Stop => Start livestream (server only has image + no sound).
But sometimes the first time I open the app to livestream, there is no sound.

The code I am using to start and stop the livestream:

srtCamera2.startStream(url)
srtCamera2.stopStream()

When the livestream error has no sound, I call srtCamera2.enableAudio() or srtCamera2.disableAudio() and everything is still the same (no sound).
When I was livestreaming and had no sound, in the onNewBitrate listener, I checked that srtCamera2.isMute returned false.

I am using vMix as the srt server.
https://www.vmix.com/

If I use the CameraFi Live app (on Play Store), everything works fine and doesn't have this error.
Please check soon for me.

_Also, do you have a sample project on how to use srt and its features effectively (using this sdk library of yours) ?

I've been struggling with this passphrase (issues 1697) and audio issue for days now and haven't found a solution.
Since everything is fine when I use another app to live, I think there's no problem on the server side.

Thank you very much.

image

Smartphone (please complete the following information):
Library version [2.5.5]
Device: [Samsung Galaxy S22 Ultra, Vsmart Joy 3]
OS: [Android 14, 10]
Class used: [RtmpCamera2 + OpenGlView]

@pedroSG94 pedroSG94 self-assigned this Jan 10, 2025
@pedroSG94 pedroSG94 added the bug label Jan 10, 2025
@pedroSG94
Copy link
Owner

Ok, I will check it

@cryinrain69
Copy link
Author

Ok, I will check it

Hi @pedroSG94
Is there any new information or solution for this problem?
I really need this fixed 😢

@pedroSG94
Copy link
Owner

Hello,

I'm currently with this but I'm no able to reproduce it for now. I tested using MediaMTX. I will install vMIx server today and test with that.
Also, can you check that you have audio packets send in the logcat?

@pedroSG94
Copy link
Owner

I was able to connect stream using vMix but the audio is not working with exactly the same configuration than with MediaMTX, only the video. How can I check the audio channel received?

@cryinrain69
Copy link
Author

I was able to connect stream using vMix but the audio is not working with exactly the same configuration than with MediaMTX, only the video. How can I check the audio channel received?

Please see green icon at here:
IMG_20250114_200905

@pedroSG94
Copy link
Owner

pedroSG94 commented Jan 14, 2025

I'm not able to see that green bar no matter what. The audio is working fine on others server.
Can you tell me your audio config? maybe I need set a config to work properly

@cryinrain69
Copy link
Author

I'm not able to see that green bar no matter what. The audio is working fine on others server. Can you tell me your audio config? maybe I need set a config to work properly

Hi.
I am configuring like this:

image

image

As I said at the beginning, the sound is transmitted sometimes with signal, sometimes without (When it's live, if there is sound, the whole live session will always have sound. If there is not, the whole live session will not have sound).
And when there is no sound signal, I have to stop live and exit the app completely to re-open the app and try live again.

Start livestream (server receives image + sound) => Stop => Start livestream (server only has image + no sound).
But sometimes the first time I open the app to livestream, there is no sound.

@cryinrain69
Copy link
Author

When live has sound, I print log like this:

image

image


And when live has no sound, the same thing happens in log:

image

image

@cryinrain69
Copy link
Author

Hi @pedroSG94
Any new information on this issue ?
😢

@pedroSG94
Copy link
Owner

Hello,

I'm trying it but i'm not able to make it work even with ffmpeg.
With ffmpeg it is not working directly. No audio and no video.

To discard problems when the stream is stopped and started again. I tested that case using 2 servers and it is working as expected (MediaMTX and SRS in this case)
For now, I fixed the problem with the video/audioFrameSent variable that never increment.

@cryinrain69
Copy link
Author

Hello,

I'm trying it but i'm not able to make it work even with ffmpeg. With ffmpeg it is not working directly. No audio and no video.

To discard problems when the stream is stopped and started again. I tested that case using 2 servers and it is working as expected (MediaMTX and SRS in this case) For now, I fixed the problem with the video/audioFrameSent variable that never increment.

Hi.
I use vMix to build additional graphics and control frames for livestreaming.
Therefore, using vMix as an SRT server will give faster transmission speed, without having to get source from other intermediate servers.
Some other livestreaming applications on the app store still work well with vMix, so I really hope this RootEncoder library will do the same.
I hope you will soon find a solution to fix this problem.
If there is any new information, please let me know.
I will still follow this update every day.
Thank you very much.

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

No branches or pull requests

2 participants