How Do I Install A Camera on to My Raspberry PI?
Looking at fitting a camera to your raspberry pi? Luckily it is actually quite simple to do. Just follow the Easy and straight forward instructions below to install your camera.
Installing the camera
Before installing the camera make sure you are not carrying a static charge by wearing a proper anti static bracelet or discharging yourself on a tap or radiator.
Insert the ribbon cable into the socket located between the Ethernet port and the HDMI socket. Make sure the contacts are facing the HDMI port.
The ribbon cable socket opens by pulling the tabs on the connector towards the Ethernet port, one you have inserted the cable close the socket and make sure the cable is firmly held in place.
Update Raspian
First you will need to update your copy of raspian to the latest version, to make sure all the applicable drivers and software are installed on your pi.
Start your Pi and open a terminal window, now type the following commands to update your software.
- sudo apt-get update upgrade
Enable the Camera.
Open the PI’s configuration screen by entering the following command;
Select camera and move the tab to enable
Click Finish and the restart your PI.
Using the Pi’s software
There are 2 applications that will help you use your camera, raspivid and raspistill. raspivid allows you to capture video and raspistill allows you to capture still pictures.
Both are command line applications.
You can view all the extensions for raspivid or raspistill use the following commands;
Type “q” to quit.
Below are some example extensions you can use when calling the applications.
- Grab a still image.
- raspistill -o filename.jpg
- Grab a short 5 second video using the format h264.
- Grab a short 20 second video using the format h264.
- raspivid -o video.h264 -t 20000
Transmit your Video feed
Type the following command into the terminal window on your PI.
- raspivid -t 999999 -o – | nc [IP Address of the receiving device] 5001
Insert the IP Address of the receiving device in to the area indicated above, get the IP by using the command ipconfig on the receiving device.
Receive your Video feed
Windows
You will need 2 programs Mplayer and Netcat, grab them from from the 2 urls below;
Open up your terminal window by the shortcut in your programs menu or by typing cmd into the run or search boxs
Now Type in
- [Path to netcat]\nc.exe -L -p 5001 | [Path to mplayer]\mplayer.exe -fps 31 -cache 1024 –
Raspberry Pi
Open up the terminal window on your PI and then type in the following commands;
- nc -p 5001 -l > buffer | /opt/vc/src/hello_pi/hello_video/hello_video.bin buffer
For more Tutorials and Hints & Tips on the Raspberry PI check out our Raspberry PI Blog Section
If you would like to Buy a Raspberry PI, its accessories or software check out our –
If you would like help with your Raspberry PI, computer or laptop then please contact us or visit our IT Support Page.
matt 21:08 on April 17, 2014 Permalink
What tv tuner did you use?
VennerCorp 21:09 on April 22, 2014 Permalink
I would recommend a USB stick PCTV Systems DVB-T2 292e nanoStick HD TV Tuner its currently about £54 on amazon.
Works very well and gives a great HD picture.
Andy 18:55 on June 10, 2014 Permalink
Hi,
You recommend the nanStick 290e at the beginning but then refer to the 292e which I’m lead to believe is a tripleStick and the Linux drivers are not in the current kernel as they are under development.
VennerCorp 20:51 on June 10, 2014 Permalink
Yes, you are right, Amazon has updated their product listing.
You need to get the 290E not the 292E, which as of writing is not supported on the current linux kernels.
They are under development and should be available in Kernel 3.16 and greater or for separate download soon.