Posts Tagged Raspberry Pi
Raspberry Pi IP Camera using iSpy, mjpg Streamer and alarmpi (Arch Linux ARM).
Okay so my goal was to make a IP camera out of a unused webcam and stream it to the free security camera software iSpy and I happened to have a RasPi laying around doing nothing but due to past experience knowing how slow the RasPi can be I didn’t want to load it with a GUI so I went with Arch Linux ARM.
Once thats done plug your Pi into HDMI with your keyboard in and the webcam plugged in then the power last otherwise it may miss booting to HDMI (A bit of googling and you can see how to force HDMI).
Default Username: root
Default Password: root
Now that we have a OS to work with we will need to get this up to date.
You can do this by using pacman but you will need to make a pacman key for this to work.
Now you will need to create random entropy on your system, I recomend switching to another console do this by holding (Alt) then pressing F2 (you can switch between consoles F1 to F6 using this but we only need F1 and F2 for this) now login same as before.
Use the following command to generate random entropy.
ls -R / && ls -R / && ls -R /
This will take a while due to the speed or lack of that the RasPi has.
Once this is done now switch back to console 1 (Alt+F1) now you can update with the following command
This will update the OS and prompt you for permission if needed, once this is done it is good practice to reboot your RasPi, simply do this by typing “reboot”
Now we are going to need to install Sudo to help with the install of the next program
.Do this simply with the following command and giving it permission.
pacman -S sudo</code> One that is installed now we can get mjpg streamer installed with the following command. sudo pacman -S mjpg-streamer
Once that is installed we can launch this very easily while adding a few commands to the launch line
-d - USB Webcam (or video device)
-r - Resolution
-f - Frame Rate
-p - Port Number
-w -Web directory
I used the following for testing.
mjpg_streamer -i "/usr/lib/input_uvc.so -d /dev/video0 -r 640x480 -f 28" -o "/usr/lib/output_http.so -p 8090 -w /var/www/mjpg_streamer"
Then to view the stream enter it in iSpy as a IP camera using the IP of the RasPi and the port number you gave it in the launch line.
For a bit more information head over to the Mjpg streamer wiki page.
Auto launch on boot and pan/tilt plugin instruction to be added.