Unable to get cameras working

General Discussion

Unable to get cameras working

Postby usmcguy » Sat Jan 02, 2016 5:14 am

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.
usmcguy
newt
newt
 
Posts: 12
Joined: Thu Dec 31, 2015 6:11 am

Re: Unable to get cameras working

Postby kevin » Sat Jan 02, 2016 9:23 pm

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.
Not an employee of the company. Just here to help and keep things clean.
kevin
Platinum Nut
Platinum Nut
 
Posts: 994
Joined: Fri Aug 16, 2013 10:10 am

Re: Unable to get cameras working

Postby usmcguy » Sun Jan 03, 2016 1:31 pm

The url looks like this: http://192.168.1.13/live/1/mjpeg.jpg

I've tried with & without basic authentication enabled.
usmcguy
newt
newt
 
Posts: 12
Joined: Thu Dec 31, 2015 6:11 am

Re: Unable to get cameras working

Postby kevin » Mon Jan 04, 2016 5:04 pm

Not seen a camera that actually specifies a path to a filename like that before - unsure if current code would support.
Not an employee of the company. Just here to help and keep things clean.
kevin
Platinum Nut
Platinum Nut
 
Posts: 994
Joined: Fri Aug 16, 2013 10:10 am

Re: Unable to get cameras working

Postby usmcguy » Tue Jan 05, 2016 2:48 pm

So far, I have been unable to get it working. Where can I look to debug (or enable debug) to troubleshoot?
usmcguy
newt
newt
 
Posts: 12
Joined: Thu Dec 31, 2015 6:11 am

Re: Unable to get cameras working

Postby usmcguy » Wed Jan 06, 2016 3:48 pm

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.
usmcguy
newt
newt
 
Posts: 12
Joined: Thu Dec 31, 2015 6:11 am

Re: Unable to get cameras working

Postby kevin » Wed Jan 06, 2016 3:51 pm

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.
Not an employee of the company. Just here to help and keep things clean.
kevin
Platinum Nut
Platinum Nut
 
Posts: 994
Joined: Fri Aug 16, 2013 10:10 am

Re: Unable to get cameras working

Postby kevin » Wed Jan 06, 2016 9:41 pm

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)
Not an employee of the company. Just here to help and keep things clean.
kevin
Platinum Nut
Platinum Nut
 
Posts: 994
Joined: Fri Aug 16, 2013 10:10 am

Re: Unable to get cameras working

Postby usmcguy » Fri Jan 08, 2016 10:10 am

I happened to come across the OpenCV installation somewhere during my troubleshooting. So it was loaded.
usmcguy
newt
newt
 
Posts: 12
Joined: Thu Dec 31, 2015 6:11 am

Re: Unable to get cameras working

Postby kevin » Fri Jan 08, 2016 10:50 am

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.
Not an employee of the company. Just here to help and keep things clean.
kevin
Platinum Nut
Platinum Nut
 
Posts: 994
Joined: Fri Aug 16, 2013 10:10 am


Return to General

Who is online

Users browsing this forum: No registered users and 14 guests

cron