OpenWrt Forum Archive

Topic: how to play rtp with openwrt

The content of this topic has been archived on 22 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Does anyone know how to play an rtp stream on openwrt? out though a usb soundcard?

I would like to play the audio on a desktop and broadcast the stream over rtp to the openwrt router.

I am trying to use rtp over http because i want to reduce network traffic (still want decent quality though)

Any thoughts?

I know, this is a bit old thread, but I'm interested if you have found any solution.

Easy enough to do, I just implemented this for a customer's project.

On the OpenWRT box, you need to make sure you have all the necessary bits for USB sound (i.e. kernel module, core sound support, etc) that should all be described in the wiki/elsewhere. Make sure you have alsa-utils installed also to get the alsa programs. Once you've got your USB sound card hooked up and confirmed detected and working the next step is to get a copy of RTPTools:

http://www.cs.columbia.edu/irt/software … /download/

You'll have to cross-compile them yourself for openWRT as I don't believe there's a package made for them (could be wrong though!)... I cross-compiled them since I was building a custom image anyway.

Then all you have to do is install the rtptools onto your device, and use a simple command line to pipe the RTP to aplay:

rtpdump -F payload 224.0.0.56/6112 | aplay -r 44100 -c1 -f S16_BE

You'll have to adjust the multicast IP and port numbers of course... and you can tweak your aplay rate/channel/format settings to match whatever you're using to generate the audio feed. In my case I was using the RTP send module from PulseAudio, and configured it to send 44100 mono in BigEndian format.

Best part of course is it works like a charm using almost no processing power (the RTP stream is raw audio, so you don't need to process/decode it on the openWRT box). I tested it on an old 200mhZ Asus WL-500gP and playback was flawless.

Thanks, I'll try it out. Do I need any special makefile for the CC? Did you use the openwrt toolchain for the CC and built a package from it? What did you use to create the RTP? ffmpeg?

Thanks,

   Tom

(Last edited by v1pr on 27 Nov 2014, 09:45)

Jo, thanks for the  good suggestion  about cross compiling rtptools.
I need to do this for a project. The Openwrt-SDK successfully creates a .ipk package from the rtptool source

I installed it on a rt305x router with:
opkg install rtpdump_1_ramips_24kec.ipk

and run it with
sudo route add -net 224.0.0.0 netmask 240.0.0.0 dev eth0
rtpdump -F payload 224.0.0.115/1234

Normally this dumps the hex to the screen, but nothing happens on the router.
The rtp stream is visible from the traffic statistics on the eth0.

Were there any cross compiling tricks other than the special makefile changes.

Thanks,
Jim

Somebody to share the file Makefile fot openwrt.
I can't make rtpdump sad

The discussion might have continued from here.