jdillenkofer / camera_proxy

MIT License
46 stars 17 forks source link

Not sure how to use this correctly #17

Open bobhairgrove opened 3 years ago

bobhairgrove commented 3 years ago

Running Linux Ubuntu 18.04, I was able to install the dependencies (av was difficult) and can start the proxy as described. I have Reolink Argus 2 camera which I have successfully been running for over a year. I access the videos through the Reolink App on my Samsung S7 phone and WLAN connection in our house.

When I start the proxy in a terminal (either from the masteror development branch downloads), I see the following output:

 * Serving Flask app 'main' (lazy loading)
 * Environment: production
   WARNING: This is a development server. Do not use it in a production deployment.
   Use a production WSGI server instead.
 * Debug mode: off
[MainThread-30872]  * Running on all addresses.
   WARNING: This is a development server. Do not use it in a production deployment.
[MainThread-30872]  * Running on http://192.168.0.199:8000/ (Press CTRL+C to quit)

When opening the URL shown in Firefox, I only get a 404 response. However, all of the settings in the settings.json file seem to be correct. What am I missing?

bobhairgrove commented 3 years ago

Also, how is "debug mode" turned on or off?

bobhairgrove commented 3 years ago

What I really would like to do is to access individual files on the camera's file system. This is doable with the Windows or Mac client, I believe, but using my phone I only have the option to format the whole FS on the camera -- however, I usually only want to delete certain files. Also, with the newest update to the Reolink client, I can capture over a minute of video in HD which gives me file sizes which are sometimes too big to be sent as an email attachment. If i could just copy them over to my Linux laptop, this would be all I need right now.

The proxy seems to be running HTTP only -- is there a way to make it do FTP? I always get a "Connection refused" when attempting to do this directly, and no idea how HTTP would be used for what I need (browse the camera and copy or delete selected files).

Any help with usability of what looks like a very promising tool would be greatly appreciated!

lawm commented 3 years ago

Once you start the proxy, you can open in your web browser:

http://192.168.0.199:8000/api/v1/cameras/CAMERA_NAME?thumbnail=true

Replace CAMERA_NAME with the name of your camera in the Reolink app. This will give you a JPEG snapshot of camera's stream.

There is another URL to give you a video stream, I think in MJPEG.

You can't access the camera filesystem or anything, only these 2 things so far.

bobhairgrove commented 3 years ago

Cool ... thanks very much!

What is the URL for the video stream, or where can I find it?

lawm commented 3 years ago

video stream url is http://192.168.0.199:8000/api/v1/cameras/CAMERA_NAME/stream See main.py:

@app.route('/api/v1/cameras/<name>/stream', methods=["GET"])
def get_image_stream_from_camera(name):