Git Product home page Git Product logo

Comments (6)

beyondszine avatar beyondszine commented on June 9, 2024

Hi @fabriciorsf,
one really important thing for discoverCamras to work is that you pass on the host network as well to find cameras from. The way discoverCameras work is by sending multicast packets to figure out who all are there in the network.
currently, this is making call to docker network. So, please do pass host network as well so that the queries can be sent to your network where cameras are. As per my understanding, cameras & the program have to be in same broadcast network.

docker run --rm --name=camerasdiscovery ---network=host saurabhshandy/camerasdiscovery

Please do check if --network=host is the right flag to use incase of windows machine. I am not sure of that.

from camerasdiscovery.

fabriciorsf avatar fabriciorsf commented on June 9, 2024

Tks @beyondszine, but the --network=host flag doesn't work in windows host machines, and my network is composed only of windows machines.
I have to look for another solution without docker!

If your API will have new features, please let me know.

from camerasdiscovery.

beyondszine avatar beyondszine commented on June 9, 2024

Ohh I see. I had never tried this on windows actually.
What you can do is simply run the npm i && npm start command after cloning the repository.

Yes, they have got a few updates, but I couldn't get the time to update it here on github. My work primarily resides in gitlab.
Will try to push to this remote origin as well.

from camerasdiscovery.

fabriciorsf avatar fabriciorsf commented on June 9, 2024

I ran at Windows:

> npm i

up to date, audited 771 packages in 3s

10 packages are looking for funding
  run `npm fund` for details

23 vulnerabilities (4 low, 9 moderate, 9 high, 1 critical)

To address issues that do not require attention, run:
  npm audit fix

To address all issues (including breaking changes), run:
  npm audit fix --force

Run `npm audit` for details.

Until here, seems ok!

But the next command npm start didn't start.
Follow the trace with this command:

> npm start

> [email protected] start
> HOST='0.0.0.0' nodemon ./bin/www

'HOST' não é reconhecido como um comando interno
ou externo, um programa operável ou um arquivo em lotes.

As i running at Windows, I had to create env var with command setx HOST='0.0.0.0', and to change package.json at the line 6 to:
"start": "nodemon ./bin/www",
I tried this to set env var according to Windows.

And now started:

> npm start

> [email protected] start
> nodemon ./bin/www

[nodemon] 2.0.4
[nodemon] to restart at any time, enter `rs`
[nodemon] watching path(s): *.*
[nodemon] watching extensions: js,mjs,json
[nodemon] starting `node ./bin/www`
[nodemon] restarting due to changes...
[nodemon] starting `node ./bin/www

Then the routine probestream works fine again:

> curl --request POST --url http://10.0.0.11:8000/v1/rpc/probestream --header 'content-type: application/json' --data '{\"url\" : \"rtsp://10.0.0.11:8554/cam\"}'
{"streams":[{"index":0,"codec_name":"h264","codec_long_name":"H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10","profile":"High 4:2:2","codec_type":"video","codec_tag_string":"[0][0][0][0]","codec_tag":"0x0000","width":640,"height":480,"coded_width":640,"coded_height":480,"closed_captions":0,"has_b_frames":0,"sample_aspect_ratio":"N/A","display_aspect_ratio":"N/A","pix_fmt":"yuv422p","level":30,"color_range":"unknown","color_space":"unknown","color_transfer":"unknown","color_primaries":"unknown","chroma_location":"left","field_order":"progressive","refs":1,"is_avc":"false","nal_length_size":0,"id":"N/A","r_frame_rate":"30/1","avg_frame_rate":"30/1","time_base":"1/90000","start_pts":188189,"start_time":2.090989,"duration_ts":"N/A","duration":"N/A","bit_rate":"N/A","max_bit_rate":"N/A","bits_per_raw_sample":8,"nb_frames":"N/A","nb_read_frames":"N/A","nb_read_packets":"N/A","disposition":{"default":0,"dub":0,"original":0,"comment":0,"lyrics":0,"karaoke":0,"forced":0,"hearing_impaired":0,"visual_impaired":0,"clean_effects":0,"attached_pic":0,"timed_thumbnails":0}}],"format":{"filename":"rtsp://10.0.0.11:8554/cam","nb_streams":1,"nb_programs":0,"format_name":"rtsp","format_long_name":"RTSP input","start_time":2.090989,"duration":"N/A","size":"N/A","bit_rate":"N/A","probe_score":100,"tags":{"title":"Stream"}},"chapters":[]}

But the the discoverCameras didn't work yet...

> curl --request GET --url http://10.0.0.11:8000/v1/rpc/discoverCameras --header 'content-type: application/json'
{"status":"success","data":[]}

The local network is 10.0.0.0/24.
And I checked that port 8554 is open on the firewall.

from camerasdiscovery.

beyondszine avatar beyondszine commented on June 9, 2024

Its great that are able to run it on windows as well. For the problem yet persists, Can you let me know if cameras are ONVIF enabled ?
because this strategy only searches for cameras which are ONVIF enabled. Onvif compatibility can also be cross checked via this

from camerasdiscovery.

fabriciorsf avatar fabriciorsf commented on June 9, 2024

Ohh, sorry!
I used only an RTSP server to stream my webcam only to test.
Then I will simulate an ONVIF server too.
I found this repo to help me with ONVIF: https://github.com/BreeeZe/rpos

from camerasdiscovery.

Related Issues (1)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.