Camera support?

Anybody knows if there is a cheap camera that works with webthings?
Cheers.

There are a few listed here. In theory, any ONVIF compliant camera should work, but in practice, that’s not necessarily true.

Thanks but i am having a hard time finding a onvif profile s camera that is cheap
There are som on a chineese site that states it is onvif compatible but can i trust it?

Trust is subjective. I tend to mistrust most connected cameras, regardless of origin, so I only plug them in during testing.

Do you know of any working unconnected camera; I mean one that does not expose anything to the internet, just on my local network

I personally don’t, though I’m sure they exist. You could look at firewalling off your cameras, but that’s obviously considerably more work.

I have a specific function in my router that does that, it should be enough, but there is no guarantee that the camera will work at that point…
Thanks for the reply anyway, it’s probably easier to attach a usb camera to the gateway machine (or another one) and start it somehow

This one works without the cloud. It is not WiFi but is PoE which is nice:

While this does work with ONVIF phone apps, I have not been able to make it work with the Gateway. I have not tried it again since the 0.10 update.

1 Like

Ok thanks, my ideal thing is something that works with the gateway and without internet; but I have no immediate need for such thing, I will buy one when it has everything I need.

Hi,

if it is still actual have a look at my issue (solved) to get cheap chinese camera working.

I can recommend this camera if you are looking for something cheap and I would suggest to configure it so it does not have access to internet (put it to IP segment that is not allowed to connect outside).

Tomas

1 Like

Hello!

Thanks for the great work with webthings (devices, gateway,…).
How can I see the ffmpeg command executed to watch the video stream?

I’m trying to get an Android app that emulates an ONVIF camera working with WebThings Gateway and ONVIF addon - details at How to show video stream?.

ONVIF add on and gateway Thing configurations look OK: The gateway found the ‘camera’.

- Changing resolution on the camera is shown in the gateway;
- Checking streaming and clicking on stream button on the gateway is detected by the 'camera';

… but there is no video showing in the stream view in the gateway. Just a close button (perhaps a transparent window?)

Previous posts in this thread were very useful. I merged the information and got ffplay to show the video stream using the command: ffplay rtsp://admin:admin@192.168.0.13:8080/h264_pcm.sdp

edit:
ffplay reports a lot of errors:

[h264 @ 0x7f1414057740] concealing 514 DC, 514 AC, 514 MV errors in P frame
[rtsp @ 0x7f1414000bc0] max delay reached. need to consume packet
[rtsp @ 0x7f1414000bc0] RTP: missed 10 packets
[rtsp @ 0x7f1414000bc0] max delay reached. need to consume packet
[rtsp @ 0x7f1414000bc0] RTP: missed 16 packets
[rtsp @ 0x7f1414000bc0] max delay reached. need to consume packet
[rtsp @ 0x7f1414000bc0] RTP: missed 2 packets
[h264 @ 0x7f1414057740] mb_type 54 in P slice too large at 12 14
[h264 @ 0x7f1414057740] error while decoding MB 12 14
[h264 @ 0x7f1414057740] concealing 677 DC, 677 AC, 677 MV errors in P frame
Invalid UE golomb code= 52 aq= 159KB vq= 0KB sq= 0B f=7/7
[h264 @ 0x7f1414161900] cbp too large (3199971767) at 10 23
[h264 @ 0x7f1414161900] error while decoding MB 10 23
[h264 @ 0x7f1414161900] concealing 319 DC, 319 AC, 319 MV errors in P frame
[h264 @ 0x7f1414084240] corrupted macroblock 36 5 (total_coeff=-1)
[h264 @ 0x7f1414084240] error while decoding MB 36 5
[h264 @ 0x7f1414084240] concealing 1013 DC, 1013 AC, 1013 MV errors in I frame
[NULL @ 0x7f1414004a80] missing picture in access unit with size 4744
[h264 @ 0x7f1414057740] No start code is found.
[h264 @ 0x7f1414057740] Error splitting the input into NAL units.
[NULL @ 0x7f1414004a80] missing picture in access unit with size 4744
[h264 @ 0x7f1414057740] No start code is found.
[h264 @ 0x7f1414057740] Error splitting the input into NAL units.
[NULL @ 0x7f1414004a80] missing picture in access unit with size 7116
[h264 @ 0x7f1414057740] No start code is found.

Reducing resolution to 240x320 and limiting framerate to 10fps (in the ‘camera’) reduce the quantity of errors.

I’m going to try the gateway with these camera settings…

Thank you all.

Hello,
Happy New Year!
I got some help in finding the ffmpeg call. Just for the records, its in line 343 of https://github.com/WebThingsIO/onvif-adapter/blob/master/lib/onvif-device.js

Hi!
Update: From onvif adapter source-code, the call to ffmpeg is something like:

-y -i <url> -fflags nobuffer -vsync 0 -copyts -probesize 200000 -window_size 5 -extra_window_size 10 -use_template 1 -use_timeline 1 -streaming 1 -hls_playlist 1 -format_options movflags=empty_moov+omit_tfhd_offset+frag_keyframe+default_base_moof -seg_duration 1 -dash_segment_type mp4 -remove_at_exit 1 -loglevel quiet -c:v libx264 -b:v:0 400k -profile:v:0 high -c:a aac -b:a:0 64k -f dash <index.mpd>
note: I have no idea of what these arguments mean :slight_smile: … argument -dash_segment_type is not documented in FFmpeg. Is WebThingsIO/DASH using a modified version of FFmpeg?

… it uses DASH. In DASH documentation is informed that, on the client side, the webpage should have a html tag like:

<video>
  <source src="movie.mpd">
  <source src="movie.webm">
  Your browser does not support the video tag
</video>

In the webthings gateway, camera device, stream page (eg. http://localhost:8080/things/onvif-SN000000), the tag is:

    <div class="media-modal">
      <div class="media-modal-frame">
        <div class="media-modal-close" style="right: 534.5px; top: 119.5px;"></div>
        <video class="media-modal-video" controls="" autoplay=""></video>
      </div>
    </div>

Does it mean that there is nothing to be played?