Zikography

The man, The shave, The theology.

September 11, 2013

Security Cam: Yawcam to Zoneminder

This is not a polished entry, because the project is ongoing.

We needed a security cam.  I'm a technophile.  Google is awesome.
Put them in a pot, and the immediate results are Zoneminder and Yawcam.

With Yawcam, it's straightforward to get a webcam streaming over HTTP -- pretty much turns a webcam into an IP cam.
With Zoneminder, you can take all of your IP cam streams across your LAN, consolidate them into a single management site, and feed just one website over the internet to wherever you are.

No amount of Googling explained how to stream from Yawcam to Zoneminder, so I went about discovering little pieces here and there.

For all you other security-cam needing, technophile google-lovers, here's what I did.


  1. Yawcam
    This was done with version 0.4.1.
    Download and install yawcam on a Windows computer with a webcam.  I don't remember doing anything special during the installation.
  2. MJPEG streamVery important step.
    There might be other ways to do this, but I haven't figured it out yet.  With Yawcam running:  Settings -->  Edit Settings --> Choose the "Stream" Category --> Set "Stream Type" to "MJPEG"
  3. Verify with VLCThis was done with version 2.0.8 Twoflower.
    If you don't have VLC, go install it first.
    Media --> Open Network stream.
    In "Please enter a network URL", type:
    http://x.x.x.x:yyyy/video.mjpg?q=30&fps=33&r=1234567890123&a=.mjpg
    (where x.x.x.x is your local IP address, and yyyy is the port that yawcam is streaming on; "r=...." is supposed to be a random number).
    Note: The final "&a=.mjpg" is not required for yawcam or VLC, but is critical because it helps Zoneminder recognize the stream as an MJPG.
    If you see yourself in VLC, press on!!
  4. Linux Live
    I used Linux Live to create a Debian Wheezy ISO on an 8GB USB so that I could just boot an existing computer into Linux, without mucking with the existing Windows implementation.
    Saved me the trouble of quashing a perfectly good machine in case the project failed.  Also allows me to take the USB stick and move my Zoneminder configuration to another computer, if required.
  5. Install Zoneminder
    In your linux, run aptitude updateThen run aptitude zoneminder install
    Then run aptitude ffmpeg install
  6. Add some fixups
    Once those are done, follow the instructions in this Zoneminder wiki entry (with the exceptions of compiling zoneminder and ffmpeg at the end).  Although it's in Spanish, follow along the commands being executed
  7. Let Apache see the videos
    Then, make sure you run add-user www-mpeg video, per step 5 in this Unixmen blog entry 
  8. Add a Zoneminder monitor (type = Remote) for the stream, and set the source to be the same source as verified in VLC.

All done!

Did this work for you?  Let me know!

Labels: , , , , ,

5 Comments:

Blogger Unknown said...

It's good to find someone in the same boat! I am however unable to get this to work with the current version of ZoneMinder. Are you still running this system at all?

14:44  
Blogger Ziko said...

+John Young:
No, Unfortunately not. I have since abandoned the project... I caved in and bought an actual webcam from aliexpress. I also began using an Android with this webcam app (works quite well actually): https://play.google.com/store/apps/details?id=com.pas.webcam&hl=en

10:53  
Blogger kittler said...

Thanks! In case someone get here in the future, worked for me on ZM v1.29.0
Had to fix the Yancam resolution as 640*480 on both the device settings/format control (keep YUY2) and settings/output/stream
Not sure if it was needed, but installed all the 'apt-get' software listed on the spanish site.

IN ZM the source type is FFMpeg, source address as described above, and remote method is RT/RTSP/HTTP

08:19  
Anonymous Anonymous said...

This fixed my issue!

Thanks.

Anyone know a good way to password protect the camera in yawcam and then have submit those in zoneminder??

Probably some parameters passed here maybe?:
(notice 'user' and 'pass'. i added them for the sake of clarity)
http://x.x.x.x:yyyy/video.mjpg?q=30&fps=33&r=1234567890123&user=blah&pass=foo&a=.mjpg

19:18  
Blogger Unknown said...

30/06/2021 Ho appena utilizzato la tua guida. Con estrema soddisfazione. Funziona. ZM on ubuntu server 20.04.2 LTS + Yawcam 0.7.0 on Win10 + WEBCAM (any). THANKS 😍

07:24  

Post a Comment

<< Home