Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using avconv to stream live audio from in-line (alsa hw:0,0) over wireless access point to a client.

I have linaro 12.06 installed on my Miniand's Hackberry(https://www.miniand.com/products/Hackberry%20A10%20Developer%20Board).

I have wireless access point up on the hackberry with the ssid of HACK

I am using this command on the hackberry:

avconv -f alsa -ac 1 -i hw:0,0 -acodec mp2 -b 64k -f rtp rtp://10.0.0.1:1234

So using my laptop I connected to the hackberry "HACK" and then I pulled up the terminal and typed in

avplay -i rtp://10.0.0.1:1234

I am not getting any audio signal. Do you know what I am doing wrong?

On the hackberry, If I run

avconv -f alsa -ac 1 -i hw:0,0 -acodec mp2 -b 64k -f rtp rtp://10.0.0.1:1234

and with a new terminal screen run

avplay -i rtp://10.0.0.1:1234

I can hear the audio perfectly fine.

I am trying to avoid using a streaming server.

Can anyone help?

thank you!

like image 491
Burkhard Avatar asked Jan 12 '13 22:01

Burkhard


1 Answers

I don't know your network topology but 10.0.0.1 used to be a default gateway IP.

RTP send a stream to a specific host (unless you are using multicast).

So rather than

avconv -f alsa -ac 1 -i hw:0,0 -acodec mp2 -b 64k -f rtp rtp://10.0.0.1:1234

On the device side, I would use:

avconv -f alsa -ac 1 -i hw:0,0 -acodec mp2 -b 64k -f rtp rtp://{IP of your laptop}:1234

On your laptop:

avplay -i rtp://127.0.0.1:1234

I'm using avconv/avplay that way.

Best Regards, Frederic

like image 57
Fred Avatar answered Nov 15 '22 09:11

Fred