Hawkes Blog
Windows reboot | Linux be root
Hawkes Blog

a raspberry pi powered baby monitor (2/2)

Short How-To: a raspberry pi powered baby monitor Part 2 (Video/Webinterface)

Setup baby monitor Video:

I´m using the great mjpg_streamer.

You can use my precompiled version for raspbian or compile it on your own.

My precompiled version is outdated and needs an update. See Jeffrey Klein's comments for details.

install, configure and start mjpg_streamer

mkdir install
cd install

wget http://www.the-hawkes.de/downloads/libmjpg-streamer_2.0-1_armhf.deb
wget http://www.the-hawkes.de/downloads/mjpg-streamer_2.0-1_armhf.deb

dpkg -i \*.deb

next step is to find a good resolution for the webcam

apt-get update; apt-get install v4l-utils

v4l2-ctl --list-formats-ext

look for formats below Pixel Format: 'MJPG' (compressed) (if your cam supports direct mjpg streaming)

v4l2-ctl --list-formats-ext
    Index       : 1
    Type        : Video Capture
    Pixel Format: 'MJPG' (compressed)
    Name        : MJPEG

for example

Size: Discrete 640x480
Interval: Discrete 0.017 s (60.000 fps)
Interval: Discrete 0.033 s (30.000 fps)
Interval: Discrete 0.042 s (24.000 fps)
Interval: Discrete 0.050 s (20.000 fps)
Interval: Discrete 0.067 s (15.000 fps)
Interval: Discrete 0.100 s (10.000 fps)
Interval: Discrete 0.133 s (7.500 fps)
Interval: Discrete 0.200 s (5.000 fps)

create a startup script

mjpg_streamer -i "libinput_uvc.so.0 -d /dev/video0 -r $RESOLUTION -f $FPS" -o "liboutput_http.so.0 -p $PORT"

and fire it up

chmod +x <<your startup script>>

./<<your startup script>>
MJPG Streamer Version.: 2.0
 i: Using V4L2 device.: /dev/video0
 i: Desired Resolution: 640 x 480
 i: Frames Per Second.: 24
 i: Format............: MJPEG
 o: www-folder-path...: disabled
 o: HTTP TCP port.....: 8080
 o: username:password.: disabled
 o: commands..........: enabled

open a browser and browse to http://<<your monitor ip>>:8080/?action=stream you should see the live stream.

the baby monitor webinterface

to push the WAF

it´s a small webinterface build with flask, bootstrap, jquery, powered by nginx + gunicorn
to controll the receiver audio output (start, stop, volume) and to view the video stream on iphone, android, chrome, firefox, ...
how-to install and source available on github

MfG Hawkes

comments powered by Disqus