Streaming live with the #RaspberryPi camera module to Bambuser

With the release of the camera module to a wider audience, I thought I’d share some of things I’ve learnt. To start off, here’s some information about using the camera with Bambuser.com.

This is in part taken from Marcus Olsson’s blog post about streaming with a webcam.

First of all, register on bambuser.com. Then, go to https://bambuser.com/api/keys and get your RTMP url and stream ID.

On the Pi, do:

apt-get update
apt-get install avconv

If this doesn’t work (it didn’t for me, like it’s disappeared from the repository), do:

apt-get install ffmpeg

On the Pi, create the following in a script called camera_mkfifo.sh:

rm fifo.264
mkfifo fifo.264

(When you run this script first of all you’ll get an error message because the file doesn’t exist, but just ignore it).

Now create another script called camera_output.sh:

/opt/vc/bin/raspivid -o fifo.264 -w 400 -h 300 -t 10000000 -b 500000 &

Now create another script called camera_bambuser.sh

avconv -f h264 -r 25 -i fifo.264 -metadata title="Raspberry Pi Camera Module (LIVE)" -f flv rtmp://<RTMP URL>/<RTMP KEY>

If you’re using ffmpeg, change the “avconv” to “ffmpeg”.

Now, do:

chmod +x camera*.sh

This will make the scripts executable.

Now, just run the three scripts in order:

./camera_mkfifo.sh
./camera_output.sh
./camera_bambuser.sh

You should now be broadcasting LIVE. My stream, should anyone want to see it (and if it’s actually streaming) is at http://bambuser.com/channel/recantha

Please bear in mind that the resolution isn’t all that good. This is to get the frames-per-second up. If you increase the width and height of the video being created using raspivid, it will reduce the fps with an increase in quality.

#RaspberryPi Camera Board Photography Competition @ Farnell/Element14

Farnell/Element 14 have launched a photography competition to celebrate the launch of the Camera Module. Take a photo with your camera module to enter. Subjects can be one of the following: your workshop, your Pi project, pets and people or ‘outdoors’. You then need to create a blog post on their site with your photograph to enter the competition. The prize is quite cool actually – when they launch new accessories on the Farnell site, you get one… until the end of this year, so I hope they’ve got a few things coming out.

Read about the competition here

Camera module – official announcement from #RaspberryPi Foundation

Camera board available for sale! | Raspberry Pi

The Foundation have just officially announced the availability of the camera module from both RS Components and Farnell/Element 14. They’ve also written a healthy introduction to using it, including streaming from the camera to both Linux and Windows. Expect to see some blog posts from me about using these instructions in the next couple of days. Read the official Foundation announcement here

#RaspberryPi camera module availability date & price

RPI CAMERA BOARD - RASPBERRY-PI - RASPBERRY PI CAMERA BOARD, 5MP | Farnell United Kingdom

Farnell are currently showing the future availability of the camera module at under 2000 units from…. the 27th May! Farnell have sent out an email to ‘Register your interest’ registrants saying the camera will be available to order from the 14th May. Here’s their announcement. Only one-per-customer, unsurprisingly.

The price they are currently showing is £16.56+VAT (which is just under the £20 mark).

From my experiments with the one sent to me by the Foundation, it’s well worth that kind of money!

Go to Farnell’s camera order page here.