I work for the IT department of my school and I am currently re-doing the IP audio system that is used for announcements or the school bell. My school uses devices from the company "2N" for this. The audio transmission is done via multicast.
Until now, all devices used the same multicast address, which made it impossible to address only one building. So, in order to be able to address the buildings independently, I use different multicast addresses for each building.
For example:
Until now, one device was the "master" sending the school chime via the single multicast address. Unfortunately, the device is not able to address more than four multicast addresses simultaneously. Therefore I thought I could use GStreamer for this.
However, I do not manage to address the 2N devices via GStreamer. The devices are configured to a specific multicast address as shown in the example above and all use UDP port 8910. As codec I am offered PCMU, PCMA, L16 / 16kHz, G.729, G.722 in the interface. Unfortunately, the manufacturer does not publish more information.
I currently use the codec "L16 / 16kHz", because it provides the best audio quality. I can also send sounds over it via the master, but not with GStreamer.
I have tried these commands without success:
# Using "L16 / 16kHz"
gst-launch-1.0.exe -v audiotestsrc ! audioconvert ! rtpL16pay ! udpsink host=224.0.0.8 port=8910
# Using PCMU
gst-launch-1.0.exe -v filesrc location=Pausengong.wav ! decodebin ! audioconvert ! audioresample ! mulawenc ! rtppcmupay ! udpsink host=224.0.0.8 port=8910
Another complicating factor is that the 2N devices are completely silent when they receive "false data" - no crackling or noise.
I'm sorry I can't contribute more information. To be honest, I'm a bit out of my depth and can't work well with the small amount of information and the insufficient support from the manufacturer. Maybe someone here has a bright idea!
Thanks in advance!
With kind regards
Linus
I still can't believe but I solved my problem! By using Wireshark to analyse the packets sent by the original 2N master device, I discovered important parameters that have to be passed to GStreamer.
gst-launch-1.0.exe -vv filesrc location="test.wav" ! decodebin ! audioconvert ! audioresample ! mulawenc ! rtppcmupay mtu=172 ! udpsink host=224.0.0.8 port=8910 multicast-iface=192.168.52.151
If your sender device (in my case a windows PC) has multiple network interfaces, make sure that you set the multicast-iface
to the IP-address of your device. When not specified the data might be sent to the wrong network interface and will never actually reach the target device.
The next thing to specify was the mtu
(maximum transfer unit). As far as I could analyse with Wireshark the 2N devices require an MTU of 172 when using PCMU (G.711u).
gst-launch-1.0.exe -vv filesrc location="test.wav" ! decodebin ! audioconvert ! audioresample ! rtpL16pay mtu=652 pt=98 ! udpsink host=224.0.0.8 port=8910 multicast-iface=192.168.52.151
Again, make sure that you have your multicast-iface
set correctly. Besides that, the L16/16kHz codec in 2N devices requires an MTU of 652 and pt=98
(payload type).
I hope that this information might help others and I'm glad that the problem is solved now. The necessary values for 2N devices were reverse-engineered using Wireshark. Helpful documentation for GStreamer: https://thiblahute.github.io/GStreamer-doc/rtp-1.0/rtpL16pay.html