BrandonJoffe / home_surveillance

Home surveillance system with facial recognition
1.23k stars 385 forks source link

Problem adding camera #27

Open hanansalam opened 7 years ago

hanansalam commented 7 years ago

Hello, I want to add the webcam of my computer as a camera. I have streamed the output to a url and copied the address in the specified field. However, the camera is not added eventhough "Adding Camera" is shown. Do you have any idea what is the problem or what should I do? Thanks!

mathieuduperre commented 7 years ago

make sure your video feed is RTSP or else it will not work

hanansalam commented 7 years ago

Hello, Thank you for your response. I have streamed my webcam output in rtsp. I'm sure that the streaming is done correctly since I visualize it using vlc. However, I am still not able to add the camera in your application. Do you have any idea of what the problem might be? Thanks

mathieuduperre commented 7 years ago

hi, I did a pull request for Brandon to merge my branch which his. If you use my version, you'll get a checkbox allowing to try without/with. Another feature of my versoin is a log file where you would get plenty of details about the camera you're trying to add. that would most likely tell you what's going on. Worst case, do this from within your /home_surveillance directory: git pull https://github.com/methodmath/home_surveillance.git

this will update your software with my version. You'll get the log files and we can go from there.

vahid-dan commented 7 years ago

Hi @hanansalam;

Make sure you have entered the direct URL to the stream. For instance, http://YOUR_SERVER_IP/stream may show the stream in the browser, but you cannot add it to the application dashboard as a camera since it is not still the direct address. The direct address may be http://YOUR_SERVER_IP/stream/video.mjpg. My suggestion is that first try to watch the stream in a browser and VLC. Then if everything seems working, view the web page source for the stream to find out what is the exact direct URL of the stream and add that in the application dashboard. Hope it works. :-)

Cheers, Vahid

kumarneeraj2005 commented 7 years ago

@vahid-dan i just got Direct address from browser view source (http://192.168.0.3:8081/video) but when i am adding this URL in dashboard its not responding, but its working fine in VLC.

mathieuduperre commented 7 years ago

if its working from vlc but not from homesurveillance, you either have a netowkr issue or the video feed is not accepted. check home surveillance log for details.

vahid-dan commented 7 years ago

@kumarneeraj2005,

Could you please submit the whole source of the streaming page, what you see in "View Source", here?

Vahid

kumarneeraj2005 commented 7 years ago

@vahid-dan please find below source

vahid-dan commented 7 years ago

@kumarneeraj2005,

Try to add http://192.168.0.3:8081/video/VideoPlayer.swf as the camera URL. If it doesn't work, I'm not sure about the next step; But, check if your IP camera has a setting to play the stream with a technology rather than Flash.

Vahid

bikhanpersonal commented 7 years ago

can i use same code(Home surveillance system with facial recognition) to capture , recognise multiple faces through CCTV camera and compare with faces available in database to send sms

BrandonJoffe commented 7 years ago

Hi @bikhanpersonal,

I developed this system to act as a base for others to use and build upon for there own ideas. That being said, you can definitely capture and recognize multiple faces through a CCTV camera based on a face database you use to train the classifier. If you would like to add SMS functionality it shouldn't be too difficult and here a quick tutorial: https://www.fullstackpython.com/blog/send-sms-text-messages-python.html

It must be noted that there are bugs in this project and there are tones of optimizations to be made to really take it to a level that would be acceptable in industry.

I hope that clears things up :)

Brandon

spacepirate0001 commented 6 years ago

Same issue with IP cam where my feed can be accessed on http://192.168.0.4:8080/video, but won't be added in dashbored.

Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1817, in wsgi_app
    response = self.full_dispatch_request()
  File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1477, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1381, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1475, in full_dispatch_request
    rv = self.dispatch_request()
  File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1461, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "WebApp.py", line 154, in add_camera
    HomeSurveillance.add_camera(SurveillanceSystem.Camera.IPCamera(camURL,application,detectionMethod,fpsTweak))
  File "/home/root/home_surveillance/system/Camera.py", line 90, in __init__
    self.video.open()
TypeError: Required argument 'device' (pos 1) not found
polar1shu commented 5 years ago

Hello, @Haythamamin Have you solved it now? Thanks!