aws-samples / amazon-ivs-broadcast-ios-sample

MIT No Attribution
18 stars 11 forks source link

New Error: Error code: 0. #53

Open rishopbabu opened 1 year ago

rishopbabu commented 1 year ago

Hi @bclymer, recently found an new issue which is frequently happening, while starting a broadcast.

Error title: Error (Code: 0) Error Message:Source: IVSBroadcastSessionDelegate\nError: Attempted to recv after receiving shutdown from peer

can you please explain about this issue, in which scenario will it occur?. Thanks in advance.

bclymer commented 1 year ago

This can happen when the broadcast bitrate exceeds the maximum supported by IVS. Could you provide the channel type you're using (basic, standard, advanced), and the maximum bitrate you're configuring your broadcast with in the SDK?

yuya-h-29 commented 1 year ago

Hi @bclymer, my client got the same error, Attempted to recv after receiving shutdown from peer. We set the channel type as standard and set the max bitrate as 6.5Mbps. (Also we set the initial bitrate as 3Mbps and do not set the min bitrate in the project.)

When you say

This can happen when the broadcast bitrate exceeds the maximum supported by IVS.

does that mean there is a possibility that the broadcast bitrate exceeds 8.5Mbps (I believe that is the maximum of IVS supports) even if I set the max as 6.5Mbps?

Also, do we capture this error in the following method? broadcastSession(_ session: IVSBroadcastSession, didEmitError error: Error) Since my clients are Japanese, I want to change the message to prompt the user to rebroadcast in Japanese. So I want to make sure if the error above is accessible from the didEmitError method or not...

Appreciate your support!!

yuya-h-29 commented 1 year ago

[UPDATE July 8]

I talked with my client and I confirmed that when they use wifi connection, the errorAttempted to recv... happens, but when they use cellular, it did not happen. Since I don't see the same issue happening to me or any other clients, I guess it is a network setting or something. I think my clients open port 443, but is there anything I should double-check the network configuration?

[UPDATE July 10] My clients told me that after they open the port for "game" (not sure what it is), they can now live stream via wifi connection. So, in my case, a network setting causes this issue.

rishopbabu commented 1 year ago

Hi @bclymer

Error title: Error (Code: 20401) Error Message:Source: IVSBroadcastSessionDelegate\nError: The broadcast has ended because the network got too far behind. Check that you have a stable connection or reduce the broadcast bitrate.

Where should I want to change the bit rate, can anyone help me on this. Thanks in advance.

bclymer commented 1 year ago

@rishopbabu you can change the minimum, maximum, and initial bitrate on the video property of the IVSBroadcastConfiguration object you provide when creating an IVSBroadcastSession.

If you have a basic IVS channel, it is limited to 3.5 mbps, so you will need to ensure your maximum bitrate is lower than that.