OpenWrt Forum Archive

Topic: OpenWRT on TP-Link MR3420 - how to stream audio from microphone

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

Hi,

It's been a while since I tried configuring my openwrt router.

I recently managed to get my Logitech C920 HD webcam streaming over my wifi network using mjpg-streamer.

The highest resolution without crashing...
1600x896
mjpg_streamer -i "./input_uvc.so -d /dev/video0 -r 1600x896 -f 1" -o "./output_http.so -w www/webcam"

No problem there... finally.

HOWEVER, I'm trying to figure out how to stream audio from a microphone plugged into a usb audio adapter.

It doesn't have anything to do with the video - I want the audio streaming from another router.

I have installed:

opkg install kmod-usb-audio
opkg install kmod-usb-ohci

I tried to install gstreamer - but it won't fit - guess I'll have to run openwrt without LUCI.

I've been looking all over the web trying to find  some commands I can try to stream audio from a microphone connected to the router and record the audio on a computer on the network...

Well, after searching... I have no clue.

Any help would be appreciated.

I've run across ssh into the router and running aplay?

I'd like to be able to run, say VLC, and record the audio if possible.

Please, help.

Did you try "sox"?

aplay is the same as arecord, which is included in the alsa-utils package

I'm looking at sox...

Is it possible to stream audio from a microphone connected to a usb audio card through the openwrt router to http or some other protocol that I can grab from another computer?

Any example of code for the router side?

I'm seeing a lot of media files getting played but I just have an audio input device with a microphone - no audio file.

It doesn't really matter what format the stream is in.

don't know about sox, but
ssh root@192.168.1.1 -f S16_LE -r 44100 | aplay -f S16_LE -r 44100 -t wav

Search the forums, there are lots of hits.

robthebrew wrote:

don't know about sox, but
ssh root@192.168.1.1 -f S16_LE -r 44100 | aplay -f S16_LE -r 44100 -t wav

Search the forums, there are lots of hits.

I see the thread from which this advice comes:  https://forum.openwrt.org/viewtopic.php?id=41379

But I don't understand what is being piped into aplay, or what the -f and -r options can mean prior to the pipe.

Can someone explain more fully?

I understand the options for aplay, but what do they have to do with ssh?

I might understand if the command were this:  ssh root@192.168.1.1 aplay -f S16_LE -r 44100 -t wav

After you enter the password (if required), aplay would run (and would it then be sending its output over the ssh connection?).

And where does the microphone enter into it?

(Last edited by lizby on 7 Mar 2013, 16:16)

I haven't looked into this (search the forum), but I guess it has to do with aplay continuing to run after a logout.
This rings bells about other processes being killed upon logout, but I can't think of a solution.

The discussion might have continued from here.