gst ios: noise when receive udp audio stream with rtpL8depay
Describe your issue
Hello,
I'm trying to develop an app using GStreamer on ios, and need to send the audio stream from pc to ios device, when I receive an audio stream via UDP from pc with rtpL8pay
and rtpL8depay
, audio play with noise.
When I try to receive audio stream with pipeline:
udpsrc ! application/x-rtp, encoding-name=L8, clock-rate=44100, channels=2, payload=96 ! rtpjitterbuffer latency=0 ! rtpL8depay ! queue ! autoaudiosink
rtpL8depay was used here.
on pc(both linux and windows have the same result):
gst-launch-1.0 audiotestsrc ! audio/x-raw, channels=2, payload=96, clock-rate=44100 ! audioconvert ! queue ! rtpL16pay ! udpsink host=[mac ip accress] port=5004
And high-pitched sine wave comes out of the speaker.
Then I tried streaming audio from Linux and playing audio on the Linux desktop:
pulsesrc device=alsa_output.pci-0000_00_1b.0.analog-stereo.monitor ! audio/x-raw, channels=2, payload=96, clock-rate=44100 ! audioconvert ! queue ! rtpL16pay ! udpsink host=[mac ip accress] port=5004
Audio played with noise.
Expected Behavior
No noise in the ios simulator using the rtpL8depay
element.
Observed Behavior
Noise in ios simulator
Setup
- OSX 12.3.1, ios simulator: 15.4
- Patched Mac mini late 2012
- gstreamer-ios 1.20.2
Steps to reproduce the bug
- IOS on the ios code, I modified the ios-tutorial-2, and change the pipeline to:
udpsrc ! application/x-rtp, encoding-name=L8, clock-rate=44100, channels=2, payload=96 ! rtpjitterbuffer latency=0 ! rtpL8depay ! queue ! autoaudiosink
- PC
gst-launch-1.0 audiotestsrc ! audio/x-raw, channels=2, payload=96, clock-rate=44100 ! audioconvert ! queue ! rtpL16pay ! udpsink host=[mac ip accress] port=5004
Not typical sine wave comes out of ios simulator, but when I replaced rtpL8**
with rtpL16**
on both ios and pc, the noise was gone.
How reproducible is the bug?
Follo Steps to reproduce the bug.
Screenshots if relevant
Solutions you have tried
Replace rtpL8**
with rtpL16**
or rtpL24**
works.