Page 1 of 1

Unable to get cameras working

PostPosted: Sat Jan 02, 2016 5:14 am
by usmcguy
I am using Y-Cam cameras. They have serveral stream outputs. I've tried using RTSP MJPEG stream, HTTP MJPEG stream, and a snapshot (jpeg) stream. When I view the cameras page, it shows no image, and refreshes quickly over and over. It also fills up the nginx error log with this error.
Code: Select all
2016/01/02 08:08:44 [error] 12598#0: *691 open() "/opt/alarmdecoder-webapp/ad2web/static/cameras/cam1.jpg" failed (2: No such file or directory), client: 192.168.1.144, server: , request: "GET /static/cameras/cam1.jpg?_ts=1451740124601 HTTP/1.1", host: "192.168.1.50", referrer: "https://192.168.1.50/cameras/"


As I stated in an earlier post, the /tmp/cameras directory did not exist. I created it and gave it the same permissions as the user that runs the gunicorn process. I even tried opening up the permissions on the directory to 777, no luck. I'm not sure how to troubleshoot this as the log doesnt show much.

Re: Unable to get cameras working

PostPosted: Sat Jan 02, 2016 9:23 pm
by kevin
The HTTP MJPEG stream should be what is needed - and /tmp/cameras as 777 should be fine

How is the camera url structured? Is the mjpeg url http basic auth? This is expected by our software currently.

Re: Unable to get cameras working

PostPosted: Sun Jan 03, 2016 1:31 pm
by usmcguy
The url looks like this: http://192.168.1.13/live/1/mjpeg.jpg

I've tried with & without basic authentication enabled.

Re: Unable to get cameras working

PostPosted: Mon Jan 04, 2016 5:04 pm
by kevin
Not seen a camera that actually specifies a path to a filename like that before - unsure if current code would support.

Re: Unable to get cameras working

PostPosted: Tue Jan 05, 2016 2:48 pm
by usmcguy
So far, I have been unable to get it working. Where can I look to debug (or enable debug) to troubleshoot?

Re: Unable to get cameras working

PostPosted: Wed Jan 06, 2016 3:48 pm
by usmcguy
My raspberry pi came in today. So I loaded it up with the image provided on this site. It connected to my camera with no problem.

Here's the interesting part. I used the low quality stream that had no password. That worked fine. I wanted to try the higher quality stream that had a password. That didnt work. I put the low quality stream back in, and the camera feed no longer works.

However, after a reboot of the raspberry pi, the feed started working again.

Re: Unable to get cameras working

PostPosted: Wed Jan 06, 2016 3:51 pm
by kevin
Thanks for the feedback - we know the camera code does need some work - and with all the different cameras and different ways things are implemented it is hard to find a common ground - we don't even have a list of supported cameras because they are all so widely different - but if it supports mjpeg the likelyhood of getting it working is good - even if low quality.

It's definitely on our list of things to improve, but I cannot give any time frames as to when that will be - glad you are successful at getting at least one stream going.

Re: Unable to get cameras working

PostPosted: Wed Jan 06, 2016 9:41 pm
by kevin
I just realized that the instructions for installing the OpenCV library aren't in the manual install instructions - which might be why you couldn't get it to work on ubuntu.

The "opencv.sh" file in the alarmdecoder-webapp/contrib/ directory will automatically download, build, and install the OpenCV library required for the cameras.

I will make a note to update the manual install instructions - these were before we supported cameras at all.

Make sure to sudo! Hopefully that resolves the cameras issue on ubuntu (with regard to the low quality stream you are able to get working)

Re: Unable to get cameras working

PostPosted: Fri Jan 08, 2016 10:10 am
by usmcguy
I happened to come across the OpenCV installation somewhere during my troubleshooting. So it was loaded.

Re: Unable to get cameras working

PostPosted: Fri Jan 08, 2016 10:50 am
by kevin
Shame - then I am at a loss as to why cameras won't work in Ubuntu only reason I can think of is differences between Ubuntu and Raspbian and we definitely target Raspbian as that's what we ship with our product.