sndcpy icon indicating copy to clipboard operation
sndcpy copied to clipboard

Loss of Audio on Samsung Note S20 after a few minutes from starting ip the .bat file.

Open WolfeTMGaming opened this issue 4 years ago • 15 comments

I'm able to get sound on my Samsung Note S20 however, I lose audio randomly after a few minutes of starting it up. I have to restart the .bat to get the sound going every few minutes and that's a problem for me while streaming a mobile game.

This is a problem because if I'm running Srcpy, sndcpy makes Srcpy freeze so I have to open that screen window to unfreeze my phone screen in OBS while I'm streaming.

This is frustrating because I lose audio frequently which means I have to stop playing the game, open up sndcpy, enable it on my phone, press enter, then I have to open up the srcpy window to "unfreeze" the screen so my viewers don't see a frozen screen in OBS.

I do all this just to lose audio 2 minutes later and repeat the cycle.

Here's a stream link to see what I mean. If you have time to watch it, you'll see many times how I lose audio and the screen freezes until I reset everything.

https://youtu.be/QnO5W0AmawA

WolfeTMGaming avatar May 22 '21 10:05 WolfeTMGaming

@rom1v

WolfeTMGaming avatar May 23 '21 22:05 WolfeTMGaming

I experienced the same thing after updating my Galaxy M11 from Android 10 to Android 11. Sndcpy keeps on crashing which is kind of annoying especially when you're streaming.

guyfrommilkyway avatar May 26 '21 08:05 guyfrommilkyway

I lose audio randomly after a few minutes of starting it up.

I experienced the same thing after updating my Galaxy M11 from Android 10 to Android 11

Sndcpy just receives the audio stream using the Android 10 audio capture API, sends it to the computer, and play it with VLC.

If the sound stops, my guess is that the device system stops sending the audio (either it sends only zeros, or do not send anything). Could you check any system crash in adb logcat when the sound stops?

Also, if you remove -Idummy as vlc parameter in sndcpy.bat (so that you get the VLC window), does it completely stop playing, or does it play a silence?

This is a problem because if I'm running Srcpy, sndcpy makes Srcpy freeze

(scrcpy, not srcpy :wink:)

That's odd. Even when OBS is not running?

(For information, on dev branch on Linux, it is possible to capture the device as a webcam, directly in OBS: https://github.com/Genymobile/scrcpy/pull/2268)

rom1v avatar May 26 '21 09:05 rom1v

If the sound stops, my guess is that the device system stops sending the audio (either it sends only zeros, or do not send anything). Could you check any system crash in adb logcat when the sound stops?

I can't get "adb" to actually open. Anytime I try to open up adb.exe a black screen pops up for a millisecond and goes away. I've tried googling on how to make that show up again and can't seem to make it happen anymore. I don't know how to use adb logcat either.

Also, if you remove -Idummy as vlc parameter in sndcpy.bat (so that you get the VLC window), does it completely stop playing, or does it play a silence?

How do you do this?

This is a problem because if I'm running Srcpy, sndcpy makes Srcpy freeze

(scrcpy, not srcpy 😉)

Thanks for the correction 😅

That's odd. Even when OBS is not running?

Yes, it's while it's running. The audio stops. I then have to go and restart the .bat. Once I do that and press "enter" the audio comes back but scrcpy*'s screen freezes on the computer. I simply have to just activate the window and it unfreezes. I did provide a link to show examples of it happening.

WolfeTMGaming avatar Jun 16 '21 22:06 WolfeTMGaming

How do you do this?

Right click on the .bat file, then click "Edit" This will open the file in notepad

kohmy2036 avatar Jun 28 '21 01:06 kohmy2036

How do you do this?

Right click on the .bat file, then click "Edit" This will open the file in notepad

What do I do with that information next? Should I only do this right after I lose audio or does it matter?

WolfeTMGaming avatar Jun 28 '21 12:06 WolfeTMGaming

@rom1v

Any updates for me by chance? I want to get this fixed sooner than later so there are no more loss of audio issues.

WolfeTMGaming avatar Jul 15 '21 15:07 WolfeTMGaming

@WolfeTMGaming Probably nothing sndcpy can do if the device audio capture is broken after few minutes on your device (except specific workaround code to restart it automatically)…

rom1v avatar Jul 15 '21 16:07 rom1v

@WolfeTMGaming Probably nothing sndcpy can do if the device audio capture is broken after few minutes on your device (except specific workaround code to restart it automatically)…

I wouldn't know how to code it to restart automatically. Even then, you would still need to "press enter" for the audio to begin.

I would really like receive help on finding a solution be being provided exact steps on what you need to help me troubleshoot and fix.

What do you need from me to get this fixed? I'll be happy to provide whatever you may need to help me. @rom1v

WolfeTMGaming avatar Jul 15 '21 16:07 WolfeTMGaming

@rom1v Is there anyway you and I can chat via DM with each other so I can show you screenshots or just discuss directly? I have Discord & Facebook if any of those platforms would be helpful to talk with each other. Might be easier to show and understand what's going on better.

WolfeTMGaming avatar Jul 15 '21 16:07 WolfeTMGaming

@rom1v Please let me know. Every stream is the same issue and would really like to work with you directly to try and help resolve this with a solution. Please get back to me and let me know if there's anyway you and I can contact each other directly to figure this out. Thanks!

WolfeTMGaming avatar Jul 17 '21 14:07 WolfeTMGaming

@rom1v Friendly Reminder! Thanks buddy!

WolfeTMGaming avatar Jul 30 '21 23:07 WolfeTMGaming

@rom1v Sorry buddy. I'm not trying to be a bother. Just trying to have a solution to an on going issue that I'm still facing and have 0 resolution for. If you could make some time to help me address this, it would be much appreciated. Thank you kindly!

WolfeTMGaming avatar Aug 08 '21 23:08 WolfeTMGaming

https://dontkillmyapp.com/samsung

@guyfrommilkyway @WolfeTMGaming This issue could have something to do with Samsung's RAM and battery management, if the connection between the phone and the PC is perfectly fine, which could also not be the case if the phone is being held while connected to the PC via USB.

What do I do with that information next? Should I only do this right after I lose audio or does it matter?

Once you open this in the text editor, find the line starting with VLC and remove the -Idummy parameter and try running the batch file. Once the audio goes silent, does it still show that VLC is playing? Or does it stop playing?

kohmy2036 avatar Aug 09 '21 12:08 kohmy2036

https://github.com/rom1v/sndcpy/issues/153

rom1v avatar Aug 09 '21 20:08 rom1v