0

I'm interested in using a Raspberry Pi and some webcam to stream video to the web.

First, I would need to know how to setup the webcam.
Second I would like to know if it is possible to push a stream to some service like Ustream.

UPDATE: Can I just plug in any modern USB webcam? Or do I need to install some driver?
Is there a Ustream client that will run on the RPi, or any other similar client that will push live stream to them web?

1
  • 2
    This question is quite vague. Have you tried anything so far?
    – Jivings
    Jan 29, 2013 at 19:19

4 Answers 4

5

To stream to services like UStream you can use ffmpeg:

ffmpeg -f video4linux2 -i /dev/video0 -qscale 1 -r 25 -vcodec libx264 -b 636k -aspect 4:3 -s 640x480 -ar 44100 -ab 64k -async 1 -g 6 -threads 2 -f flv  "${RTMP_URL}/${KEY} flashver=FME/2.5\20(compatible;\20FMSc\201.0)"

Where:

  • /dev/video0: where your webcam is connected on Linux
  • RTMP_URL: Ustream channel RTMP server URL to publis
  • KEY: Your Ustream channel KEY

(You can find RTMP_URL and KEY on Ustream Dashboard->Your channelname->Remote section)

Also, I could stream my webcam to my Wowza Media Server (over RTMP) with this:

ffmpeg -re -i /dev/video -qscale 1 -r 25 -vcodec libx264 -vpre fastfirstpass -b 636k -aspect 4:3 -s 640x480 -ar 44100 -ab 64k -async 1 -g 6 -f mp4 -threads 2 rtmp://192.168.1.6/live/webcam
1

There is lots of hardware confirmed to work with RPI, so in simple terms - many or even most of USB web cameras will work with RPI.

On the streaming side of things - check out motion. Here is a good example of setup.

0

I believe ustream uses flash. Also, adobe flash media encoder is out of the question since it doesn't work on any OS other than mac/windows.

1
  • Makes sense. So what other option is there to push out a video stream?
    – Ron Harlev
    Jan 31, 2013 at 21:19
0

Using VLC you can send a stream and play it within the network. I haven't tried doing this from another network but somehow there should be a way. If not directily from VLC, then via a website.

Using this code in HTML you can create a website with the stream:

<OBJECT classid="clsid:9BE31822-FDAD-461B-AD51-BE1D1C159921"
            codebase="http://downloads.videolan.org/pub/videolan/vlc/latest/win32/axvlc.cab"
            width="640" height="360" id="vlc" events="True">
            <param name="Src" value="rtsp://cameraipaddress" />
            <param name="ShowDisplay" value="True" />
            <param name="AutoLoop" value="False" />
            <param name="AutoPlay" value="True" />
            <embed id="vlcEmb"  type="application/x-google-vlc-plugin" version="VideoLAN.VLCPlugin.2" autoplay="yes" loop="no" width="640" height="360"
            target="rtsp://***.***.***.***:8554/" controls="false"></embed>
</OBJECT>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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