zello-channel-api icon indicating copy to clipboard operation
zello-channel-api copied to clipboard

Zello ios client isn't playing opus frames with packet duration of 120 ms

Open suhasHere opened this issue 5 years ago • 6 comments

I have a test python client that encodes audio data in opus at 120 ms packet duration. IOS client doesn't play the audio sent to it. There is no indication on the client either.

However if i encoded the audio at 60ms eveerything works great.

Is there a limitation on the ios clients for opus packet duration supported ?

Please help

suhasHere avatar Mar 14 '19 06:03 suhasHere

just an update, i see the same behavior on Android Clients too , 120 ms packet stream isn't being played out. Any insights here helps .. thanks

suhasHere avatar Mar 15 '19 05:03 suhasHere

Are you referring to to the frame size in opus?

Current implementation of Zello supports maximum frame size of 60 ms, which I believe was done based on the following note in OPUS documentation:

To encode a frame, opus_encode() or opus_encode_float() must be called with exactly one frame (2.5, 5, 10, 20, 40 or 60 ms) of audio data

https://www.opus-codec.org/docs/html_api/group__opusencoder.html https://wiki.xiph.org/index.php?title=Opus_Recommended_Settings&mobileaction=toggle_view_desktop#Framesize_Tweaking

Why do you want to use larger frame sizes?

agatx avatar Mar 15 '19 05:03 agatx

@agatx thanks for the reference. I think i was bit confused here . I was supposed to know how to compute/use the packet_duration that is set in StartStream. I am defaulting it to 60 but want to move to 200 ms. How can i achieve the smae as seen in the example below

{
  "command": "start_stream",
  "seq": 2,
  "type": "audio",
  "codec": "opus",
  "codec_header": "gD4BPA==",
  "packet_duration": 200
}

suhasHere avatar Mar 16 '19 07:03 suhasHere

@agatx wondering if you had thoughts on the above ?

suhasHere avatar Mar 20 '19 05:03 suhasHere

wondering if you had thoughts on the above ?

this is documentation error. It should mention as @agatx says that maximum is 60

Also, encoder used by JS SDK supports 10, 20, 40 and 60 only with 20 as default

megamk avatar Mar 20 '19 20:03 megamk

@suhasHere I am trying to stream audio from an audio input with python on a device to Zello and then play it on a iOS device but I am having trouble and can't find any resources online, would you be able to help me?

ghost avatar May 02 '19 16:05 ghost