rtp streaming: "hw:0,0: Protocol not found" and "Unknown input format 'alsa'"

Moderator: flatmax

Post Reply
joshhp
Posts: 3
Joined: Sat Jul 07, 2018 6:48 am

rtp streaming: "hw:0,0: Protocol not found" and "Unknown input format 'alsa'"

Post by joshhp » Sat Jul 07, 2018 7:13 am

Hello all,

I've been trying to get a simple stream of the audioinjector's onboard mic over RTP to a VLC player. I've tried many different commands such as:
[*] ffmpeg -re -i hw:0,0 -f sap sap://224.0.0.255?same_port=1

which gives me a "hw:0,0: Protocol not found error" (as do many commands I've tried)

or:

[*] ffmpeg-f alsa -i plughw -f rtp rtp://destinationHost:port
and
[*] ffmpeg -ac 1 -f alsa -i hw:1,0 -acodec mp2 -ab 32k -ac 1 -re -f rtp rtp://224.168.2.105:1234

which give me "Unknown input format 'alsa'" errors.

Not sure why I keep getting these errors, as it seems I have the alsa drivers setup correctly, with the audioinjector being my default audio device. Is something not installed right, and what would it be?

I have however, managed to get an RTP stream up and running with a workaround:
[*] arecord -f cd -D plughw:1,0 | ffmpeg -re -i - -acodec mp2 -ab 32k -ac 1 -f rtp rtp://224.1.2.3:7000

This creates a working RTP stream that I can detect and open on a separate device on the network, but the kicker is that I cannot seem to get any audio input into it.

So, it seems that something needs to be fixed on the audio input end of this. I'm not terribly experienced with this stuff, so feel free to throw ideas!

Thanks,
-Josh

joshhp
Posts: 3
Joined: Sat Jul 07, 2018 6:48 am

Re: rtp streaming: "hw:0,0: Protocol not found" and "Unknown input format 'alsa'"

Post by joshhp » Wed Jul 11, 2018 12:52 am

Bump.

plummy
Posts: 3
Joined: Thu Jul 05, 2018 4:28 am

Re: rtp streaming: "hw:0,0: Protocol not found" and "Unknown input format 'alsa'"

Post by plummy » Wed Jul 11, 2018 11:49 pm

What version of ffmpeg are you using?

This worked for me to send as mp3 using RTP:

Code: Select all

ffmpeg -f alsa -i hw:0,0 -acodec mp3 -f rtp rtp://1.1.1.1:1234
My hardware address was hw0,0 as shown in arecord:
arecord -l
**** List of CAPTURE Hardware Devices ****
card 0: audioinjectorpi [audioinjector-pi-soundcard], device 0: AudioInjector audio wm8731-hifi-0 []
Subdevices: 1/1
Subdevice #0: subdevice #0
The version of ffmpeg I used was from raspbian repo:
ffmpeg -version
ffmpeg version 3.2.10-1~deb9u1+rpt1 Copyright (c) 2000-2018 the FFmpeg developers
built with gcc 6.3.0 (Raspbian 6.3.0-18+rpi1) 20170516
configuration: --prefix=/usr --extra-version='1~deb9u1+rpt1' --toolchain=hardened --libdir=/usr/lib/arm-linux-gnueabihf --incdir=/usr/include/arm-linux-gnueabihf --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libebur128 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx-rpi --enable-mmal --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared
libavutil 55. 34.101 / 55. 34.101
libavcodec 57. 64.101 / 57. 64.101
libavformat 57. 56.101 / 57. 56.101
libavdevice 57. 1.100 / 57. 1.100
libavfilter 6. 65.100 / 6. 65.100
libavresample 3. 1. 0 / 3. 1. 0
libswscale 4. 2.100 / 4. 2.100
libswresample 2. 3.100 / 2. 3.100
libpostproc 54. 1.100 / 54. 1.100

joshhp
Posts: 3
Joined: Sat Jul 07, 2018 6:48 am

Re: rtp streaming: "hw:0,0: Protocol not found" and "Unknown input format 'alsa'"

Post by joshhp » Tue Jul 17, 2018 2:07 am

I believe it was an issue with ffmpeg not having been compiled with alsa support. Essentially it was not recognizing alsa-dependent commands.

I have since gotten it to work with avconv which seems to be working pretty well. Is avconv supposed to be replacing ffmpeg, or the other way around?

My one issue at this point is latency. I am sending out an rtp/udp stream on the network and receiving audio in VLC player on a separate machine. Surprisingly there is very small difference between latency on a wireless network vs. wired LAN, but the delay coming out of VLC player is at about ~2s right now.

Wondering if the majority of this is in VLC settings?

Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests