Is there a solution to use the Raspberry Pi as low latency, cross device audio sink?

I have a Linux/Windows PC (and an Android phone) and I would like to use the Pi as an audio sink. The Pi is attached to my stereo.

The problem is, most of the solutions presented on the web have a high latency (not good while watching videos) or are very bad quality (Bluetooth).

  • How would you like to connect the Pi to your devices? An Ethernet connection between your PC and the Pi should work fine. Bluetooth definitely doesn't have the connection speed required for smooth video streaming. In terms of an OS have your tried XBMC? You can control that using an app on your phone. Any media you want to play back could either be streamed from the internet or stored locally on the Pi. – Darth Vader Jun 5 '17 at 9:10
  • My PCs are connected via Wifi, the pi has a ethernet connection. The phone is in the same wifi (bluetooth is fine). I just want to stream the audio. Not the video, I just need a low latency connection to watch video nicely. – dudas Jun 5 '17 at 10:49
  • Your last sentence doesn't make sense. Are you streaming audio, video or both audio and video? – Darth Vader Jun 5 '17 at 10:56
  • The video itself ought to be played on the pc. The audio ought to be routed to the pi and be played there. If the routing and playback of the audio takes too long, let's say 1 second, the video and audio aren't in sync anymore. – dudas Jun 5 '17 at 11:01
  • What is an audio sink? – SDsolar Jun 6 '17 at 0:45

One solution for low latency audio streaming is to use the RTP protocol. We have dealt with this problem on the Audio Injector forum in the topic "Streaming from the input".

The solution proposed there is to use ffmpeg (or avconv) to output the RTP protocol. The RTP protocol is a UDP network protocol which means it can be set up to be low latency.

The solution then would be (on the source) :

ffmpeg -i source_video_file.mp4 -vn -f rtp rtp://destinationHost:port

The -vn flag tells ffmpeg to drop the video.

On the sink you can do :

ffplay rtp://sourceHost:port
  • Is there a possibility to route all audio to the sink? – dudas Jun 7 '17 at 10:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.