Axy
Posts: 25
Joined: Tue Sep 29, 2015 1:52 pm

RPi3 as Webcam Stream Server

Tue Apr 05, 2016 12:54 pm

I'm trying to use my RPi3 as a webcam stream server. I would like to stream the video and audio from my webcam and hopefully build a web interface to view and hear multiple webcams at the same time.

I've used motion and mjpegstreamer but none of them stream audio. There is no plan to support (motion) in a close/known date for audio support. And I need a solution now..

So I tried experimenting with vlc. I've managed to transfer very bad quality video (with transcode) but still, not managed to have a working audio.

I assume this should not be the hardest request in the whole community, but weirdly, I could not find any valid responses/solutions to this exact same problem over the years! Which got me interested in this problem even more.

So - I'm asking here publicly once again:
How can I use a raspberry pi (3) as a usb webcam stream server, with audio and video support? I use a logitech if that makes a difference.

Axy
Posts: 25
Joined: Tue Sep 29, 2015 1:52 pm

Re: RPi3 as Webcam Stream Server

Fri Apr 08, 2016 2:00 pm

no clues, no one?

User avatar
DougieLawson
Posts: 40792
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: RPi3 as Webcam Stream Server

Sat Apr 09, 2016 12:32 pm

Didn't you find these threads in your searches?

viewtopic.php?t=63276
viewtopic.php?t=115583

You're going to struggle with audio, there's no audio input device on any model of Raspberry.
Any language using left-hand whitespace for syntax is ridiculous

Any DMs sent on Twitter will be answered next month.
Fake doctors - are all on my foes list.

Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

SANGER_A2
Posts: 59
Joined: Sun Mar 04, 2012 7:39 pm
Contact: Website

Re: RPi3 as Webcam Stream Server

Sun Apr 24, 2016 7:43 am

I assume that like me, the OP is looking for a solution to streaming the audio from his webcam. A possible option is ffmpeg and ffserver. I've only just started playing around with this, but Video4Linux2 supports my USB webcam fine for video and alsa for the audio (I've got a Microsoft LifeCam-HD-3000). I can export to files using the command below:-

Code: Select all

ffmpeg -f alsa -i default:CARD=HD3000 -f v4l2 -input_format mjpeg -framerate 15 -video_size 1280x720 -i /dev/video0 -vcodec copy -acodec copy -t 10 output.mkv
The next stage is to export to an ffm file and stream that using ffserver.

I'm using the latest version of the minimal raspbian image and I updated all the apps using apt-get, set it to use a static IP and expanded the patition to use all the microsd card. You have to compile your own ffmpeg (it's only copying and pasting a few lines of code but takes a while to compile). Thispage and thisone were useful. There are a few guides on the ffmpeg wiki.

I will update on my progress. My pi is headless so it takes me a while to check videos exported okay etc. Please post anything useful here.

Return to “Beginners”