Posts: 16
Joined: Mon Jul 29, 2013 4:59 pm

HD Video+Audio over network

Mon Jul 29, 2013 5:35 pm

Hi there,

New to Pi but not programming in general. I'm planning a project and want to have a working concept before I purchase stuff.

As the title says, I want to put HD video+audio over a network. I'd probably have multiple RPi's + Camera's connected to a big wired network then a single RPi running something like XMBC acting as a base station to monitor those cameras. The problem is what camera to use. There are two options I can see, using a USB webcams, like logitech or Lifecam, or the Pi Camera Module.

Using a webcam:
  • Definitely CAN'T do HD video unless it is compressed by the webcam, because the load is too much on the Pi's CPU.
  • Can't find anything saying whether HD video would be possible if the camera compressed it first.
  • More expensive.
  • More hackable (different lenses, IR filter)
Using the Pi Cam:
  • No audio!
  • I've read things about using a USB soundcard to capture audio, but how do you package that audio stream into the video stream?
It seems the Raspberry Pi is really close to being an complete remote HD camera solution except for the audio.

Has anyone got any suggestions? I'd be very appreciative!

Posts: 13
Joined: Tue Jan 08, 2013 2:24 pm

Re: HD Video+Audio over network

Tue Jul 30, 2013 2:10 pm

Hi. I had the same idea, so I boutght cheap USB sound card identified as JMTek, LLC. audio controller. Made some changes in alsa configuration, disabled in /etc/modprobe.d/alsa-base.conf the built-in snd-bcm2385 and enable snd-usb (comment out line that sets its index to -2).

Code: Select all

raspivid -o - -t 99999 -w 1280 -h 720 -fps 25|cvlc -vvv stream:///dev/stdin
cvlc -vvv alsa://plughw:0,0 --sout '#standard{access=http,mux=ogg,dst=:8090}'
I managed to stream audio and video separate using vlc but cannot make it work to get both audio and video in one stream. Any ideas how to set vlc to multiplex it so it doest not consume the whole cpu?


Posts: 16
Joined: Mon Jul 29, 2013 4:59 pm

Re: HD Video+Audio over network

Tue Jul 30, 2013 9:21 pm

Sounds like you've got the same problem I would have, though I had to Google much of what you said! :oops:

I've done some Googling... Would this help? ... dio-stream

Seems like it'll do what we want but as a noob at Linux, I don't really know. Can you test it with your setup?

Thanks :)

Posts: 2
Joined: Wed Apr 29, 2015 2:21 pm

Re: HD Video+Audio over network

Wed Apr 29, 2015 2:27 pm

Hi Alband

Was reading up on yours posts and i am interested in your project, I am just wondering if you ever got the Raspberry Pi to stream over a network sending both audio and video.

I am looking to set one up although i am not sure how to go about it.Is it possible to stream over the internet to a separate browser ?

Posts: 16
Joined: Mon Jul 29, 2013 4:59 pm

Re: HD Video+Audio over network

Wed Apr 29, 2015 4:59 pm

I am actually still at it. The big step forward recently is the new Pi 2 which can handle (quite easily) muxing the video and audio using ffmpeg. In fact, the one device can also be the web+streaming server to distribute the stream to clients. The trouble I'm having now is getting the audio and video at the same sync speed. The issue is that the camera, microphone and pi all have separate resonators/clocks so nothing can be guaranteed to be in sync. (That is my understanding anyway). See this thread for details (though it seems to have dried up and I don't know what the resolution was): viewtopic.php?f=43&t=98541&sid=ee6bfd06 ... 3ccaec88d3

In answer to your last question, absolutely it's possible, but currently (for me at least) only theoretically when using the one Pi. Last year I had a Pi model B sending audio and video to a big server in the loft. The server did the muxing and acted as the web server which allowed people (read: family) to view the stream over the internet. Of course you have to set up port forwarding on your router if you want to go over the internet.

I'm sure the new Pi 2 can do it, I just haven't quite got there yet (there is currently one in the kitchen running various tests to this end. It has been for weeks now).

Posts: 8
Joined: Sat Apr 04, 2015 3:50 am

Re: HD Video+Audio over network

Tue May 19, 2015 2:05 pm

Hi Guys

I am stuck at a similar situation using logitech C170 USB camera module, which has audio recording feature as well. Am able to stream video using motion software, but not sure how to stream both audio and video. Any suggestions are sincerely appreciated.

Posts: 16
Joined: Mon Jul 29, 2013 4:59 pm

Re: HD Video+Audio over network

Tue May 19, 2015 2:57 pm

What have you tried? Which Pi are you using? What software?
I can't find anything on the C170 for ffmpeg (which is what I'd go to first) but that doesn't mean it won't work. Does it show up as an ALSA device. I think these some instructions here: ... dio-device
Sorry, I'm not that good with Linux to be able to give general advice - only stuff that I've done and (importantly) have googled recently!
With the video and sound coming from the same device you should have better luck getting them in sync as they may use the same clock. I don't know if the C170 would mux them together for you which would be best. However at that price I doubt it will encode h264 for you in HD.
Maybe someone else might have more of an insight...?

Posts: 21
Joined: Mon Jun 01, 2015 8:18 pm

Re: HD Video+Audio over network

Mon Jun 01, 2015 8:22 pm

hi alband ,
did you accomplished video+audio streaming finally? can you guide me if you did that?

Posts: 1
Joined: Wed Aug 03, 2016 6:56 pm

Re: HD Video+Audio over network

Wed Aug 03, 2016 7:00 pm

Hey everyone,
I put an overview of possible solutions for merging and streaming both video and audio together.
Short summary: There is a program called picam that does exactly this, or you can compile FFmpeg or use GStreamer or VLC for two separate streams. So there are a few possibilities you can choose from.
Hope this helps (and sorry for bumping the rather old post).
Cheers, Daniel

Posts: 1
Joined: Sat Aug 06, 2016 2:04 am

Re: HD Video+Audio over network

Sat Aug 06, 2016 1:02 pm


I need to use the raspberry Pi 3 to stream video within audio trough HDMI, and at the same time,separately, I need to reproduce audio ( another content, music for example, that does not have relation with the video ) by the 3.5 m audio output. How can I do that ? Which opersting system allows me to do this ? Does any body recomend me another option ? Do I need another audio card ?

Return to “Graphics, sound and multimedia”