shogo4405/HaishinKit.kt

Audio live streaming stopped working after upgrading it from 0.11.2 to latest version 0.13.6 due to some encoders related changes

Closed this issue · 2 comments

Describe the bug

We are getting encoder related debug log while doing Http live streaming for audio using RTMP in the latest version 0.13.6. We are not doing video streaming inside our app.

Previously we are using 0.11.2 version and in that audio live streaming was working fine.

Here is the log : ```
{code=NetConnection.Connect.Success, clientid=1.628338297E9, data=Amf0EcmaArray{{version=3,5,7,7009}}, level=status, description=Connection succeeded., objectEncoding=0.0}
NetConnection.Connect.Success
NetStream.Publish.Start
NetConnection.Connect.Success
Hn RTMP Broadcast started 1
current=INITIALIZED, change=OPEN
current=OPEN, change=PUBLISH
{code=NetStream.Publish.Denied, clientid=1.628338297E9, level=error, description=RTMP Publishing not allowed. Client is not in list of valid encoders.}
NetStream.Publish.Denied
NetStream.Publish.Start
NetConnection.Connect.Success
{code=NetConnection.Connect.Closed, level=status}
NetConnection.Connect.Closed
NetStream.Publish.Start
NetConnection.Connect.Success


### To Reproduce

While doing Http live streaming for audio using RTMP in the latest version 0.13.6

### Expected behavior

It should be work same as older version 0.11.2

### Version

0.13.6

### Smartphone info.

One plus nord 2 -  5G
Android operating system - 13

(Not working for all the other devices and different OS version)

### Additional context

Due to encoder related changes in the latest version it stopped working.  How can I overcome this issue?

### Screenshots

_No response_

### Relevant log output

```shell
{code=NetConnection.Connect.Success, clientid=1.628338297E9, data=Amf0EcmaArray{{version=3,5,7,7009}}, level=status, description=Connection succeeded., objectEncoding=0.0}
  NetConnection.Connect.Success
  NetStream.Publish.Start
 NetConnection.Connect.Success
 Hn RTMP Broadcast started 1
 current=INITIALIZED, change=OPEN
 current=OPEN, change=PUBLISH
  {code=NetStream.Publish.Denied, clientid=1.628338297E9, level=error, description=RTMP Publishing not allowed.  Client is not in list of valid encoders.}
  NetStream.Publish.Denied
NetStream.Publish.Start
 NetConnection.Connect.Success
 {code=NetConnection.Connect.Closed, level=status}
 NetConnection.Connect.Closed
  NetStream.Publish.Start
NetConnection.Connect.Success

{code=NetStream.Publish.Denied, clientid=1.628338297E9, level=error, description=RTMP Publishing not allowed. Client is not in list of valid encoders.}

Due to another issue, I forgot to change back the default value. I believe it will work with the following settings.
Please try.

connection.flashVer = RTMPConnection.DEFAULT_FLASH_VER_FMLE

Thank you for your quick reply.

We have implemented the changes based on your comments. However, following this update, we are encountering an audio playback issue on the receiver's end during live audio streaming. I do not see any obvious errors on the streaming side.Attached the logs for the streaming side as well for your review here, the receiver is experiencing a SocketTimeoutException while listening.

Is there any other change made in the latest version apart from the encoder? Is there any change related to the streaming side?

Any suggestions to fix this issue? Please let me know.

We have checked again with the older version v0.11.2, in which audio streaming and playback was working fine.

Scenario: I am starting live audio streaming from android device and playback it from another device, but the playback stalls every time, resulting in a SocketTimeoutException. We have also tried playback with iPhone/iPad, and it was not working on those devices either.

Here I am attaching log for streaming end and playback end.

live streaming log.txt
playback issue log.txt