Do not send Audio stream in SRT
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.
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]
Ok, I will check it
Ok, I will check it
Hi @pedroSG94 Is there any new information or solution for this problem? I really need this fixed 😢
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?
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?
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:
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
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:
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.
When live has sound, I print log like this:
And when live has no sound, the same thing happens in log:
Hi @pedroSG94 Any new information on this issue ? 😢
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.
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.
@pedroSG94 Hi. Have you fixed this yet ? Any news ?
This was paused because I'm not able to make the server works with others encoders like ffmpeg. Also, I have no feedback of the audio received in the server side. I will re-try this week after finish others fixs
This was paused because I'm not able to make the server works with others encoders like ffmpeg. Also, I have no feedback of the audio received in the server side. I will re-try this week after finish others fixs
I tested this StreamPack lib with vMix and it still has both video and audio with SRT protocol. It might help you.
This was paused because I'm not able to make the server works with others encoders like ffmpeg. Also, I have no feedback of the audio received in the server side. I will re-try this week after finish others fixs
Hi. With RTMP it has full video and sound (Device camera and UVC camera are fine). The no sound error only happens with SRT.
This was paused because I'm not able to make the server works with others encoders like ffmpeg. Also, I have no feedback of the audio received in the server side. I will re-try this week after finish others fixs
Hi. With RTMP it has full video and sound (Device camera and UVC camera are fine). The no sound error only happens with SRT.
Hello,
Yes, I noticed that. I'm trying to find the reason with SRT but still I don't know how to fix it. I don't even know if the problem is in MPEGTS packet or SRT data packets.
Since the feedback from vMIx server is 0, I only can do test and error without find the reason.
This was paused because I'm not able to make the server works with others encoders like ffmpeg. Also, I have no feedback of the audio received in the server side. I will re-try this week after finish others fixs
Hi. With RTMP it has full video and sound (Device camera and UVC camera are fine). The no sound error only happens with SRT.
Hello,
Yes, I noticed that. I'm trying to find the reason with SRT but still I don't know how to fix it. I don't even know if the problem is in MPEGTS packet or SRT data packets.
Since the feedback from vMIx server is 0, I only can do test and error without find the reason.
Hi. Have you tried the StreamPack library? It works fine with SRT on vMix. However, when integrating it with UVCCamera, it fails on some devices, while your library still works on those devices, just without sound. If you can fix it, that would be great.
This was paused because I'm not able to make the server works with others encoders like ffmpeg. Also, I have no feedback of the audio received in the server side. I will re-try this week after finish others fixs
Hi. With RTMP it has full video and sound (Device camera and UVC camera are fine). The no sound error only happens with SRT.
Hello, Yes, I noticed that. I'm trying to find the reason with SRT but still I don't know how to fix it. I don't even know if the problem is in MPEGTS packet or SRT data packets. Since the feedback from vMIx server is 0, I only can do test and error without find the reason.
Hi. Have you tried the StreamPack library? It works fine with SRT on vMix. However, when integrating it with UVCCamera, it fails on some devices, while your library still works on those devices, just without sound. If you can fix it, that would be great.
Yes, I tried but, still I have no way to know the problem in my side. I will try discard if the problem is in MpegTS or in SRT packets and maybe I can find the problem but It will take time
Hello,
Finally fixed!! The problem was with small MPEGTS packets. https://github.com/pedroSG94/RootEncoder/commit/238972ce591f9798a456efb877d3e40272ed19bc https://github.com/pedroSG94/RootEncoder/commit/4ba166ee2de26d0b2da55a2b8c5c3cd04cc884c3 You can test it in master branch