api.video-reactnative-live-stream icon indicating copy to clipboard operation
api.video-reactnative-live-stream copied to clipboard

[Bug]: Can't stream with Android

Open gokugen opened this issue 1 year ago • 7 comments

Version

v1.2.3

Which operating systems have you used?

  • [X] Android
  • [ ] iOS

Environment that reproduces the issue

Samsung Galaxy S9 Android 10

Is it reproducible in the example application?

Yes

RTMP Server

rtmp://192.168.1.38:1935/live

Reproduction steps

  • Start streaming with some bitrate (2 * 1024 * 1024 or 3*1024 * 1024 or another value)
  • Set the resolution to 1080p or 720p
  • Set the gopDuration between 2-4s
  • After some time streaming will stop - server will not receive data
  • Preview will still work fine on the phone
  • Change the bitrate value, gopDuration, resolution and test again

Expected result

Streaming doesn't stop

Actual result

Streaming stops after a short period of time (1s to 20s depending on the configuration) because of a wrong configuration

Additional context

No response

Relevant logs output

No response

gokugen avatar Mar 14 '23 06:03 gokugen

Hi,

Thanks for reporting this issue. Could you add logcat trace?

ThibaultBee avatar Mar 14 '23 07:03 ThibaultBee

Yes of course, here it is logcat.txt

Another thing related to this is that I need sometimes to call stopStreaming and then startStreaming again in order to see my streaming on my server but as I said above my streaming stops after a few seconds anyway.

gokugen avatar Mar 14 '23 07:03 gokugen

All I can find is

rtmpdroid: Can't connect stream

connectStream is a RTMP message that is exchanged between the client and the server once they are connected. The issue is often because the streamKey is not correctly set. Could you double check it?

If your stream key is okay, could you please contact your server to check what is wrong with the connectStream message?

ThibaultBee avatar Mar 14 '23 08:03 ThibaultBee

The streamKey is good and I can see my stream info on my NodeMediaServer but without the audio and video.

Screenshot 2023-03-14 at 10 53 09

But when I call stopStreaming and then startStreaming again the stream shows up on my server but stops after few seconds.

Screenshot 2023-03-14 at 10 54 17

Here is another logcat.txt after I called stopStreaming and startStreaming again.

gokugen avatar Mar 14 '23 10:03 gokugen

Any updates ?

gokugen avatar Mar 28 '23 17:03 gokugen

Hi,

Sorry for the delay, I could not reproduce this with my phone. Could you check if you can stream to nms with Could you check with https://github.com/ThibaultBee/StreamPack/suites/18448322708/artifacts/1069695034? (internal Android RTMP library)?

ThibaultBee avatar Nov 23 '23 11:11 ThibaultBee

This is supposed to be fixed with 2.0.0. Could you test with 2.0.0?

ThibaultBee avatar May 03 '24 09:05 ThibaultBee

Stall issue. Please reopen if you have new info.

ThibaultBee avatar May 22 '24 07:05 ThibaultBee