# Onvif snapshot on Windows10 with Node-Red v2.1.3 and Tapo c100 IP-camera

**URL:** <https://discourse.nodered.org/t/onvif-snapshot-on-windows10-with-node-red-v2-1-3-and-tapo-c100-ip-camera/58420>\
**Category:** General\
**Created:** [15 February 2022 20:55 UTC](https://discourse.nodered.org/t/onvif-snapshot-on-windows10-with-node-red-v2-1-3-and-tapo-c100-ip-camera/58420 "2022-02-15T20:55:13Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![tades](https://avatars.discourse-cdn.com/v4/letter/t/e95f7d/32.png) [@tades](https://discourse.nodered.org/u/tades)\
**Post date:** [15 February 2022 20:55 UTC](https://discourse.nodered.org/t/onvif-snapshot-on-windows10-with-node-red-v2-1-3-and-tapo-c100-ip-camera/58420/1 "2022-02-15T20:55:13Z")

</div>

Hi to all!  
I installed node-red on my Windows 10 PC, and I'm trying to get some snapshots from my Tapo-C100 IP camera using the Onvif node. I know from iSpy and VLC media player that the working IP for this camera are the following ones:  
[http://192.168.1.140:2020/onvif/device\_service](http://192.168.1.140:2020/onvif/device_service) (for Onvif)  
stream: rtsp://username:password@IP Address:554/stream1 (for ffmpeg)

Till now, I can't get any Image from my workflow using those IP-Addresses.  
when I deploy the workspace, I always get the following error once:  
"Input should be a buffer or a base64 string or a Jimp image (containing a jpg or png image). Then I get the result, which is shown on the screenshot "Worksheet\_Onvif.jpeg"

 ![Worksheet_Onvif](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/9/d/9d50f478c1a2b0de74aaa957bbef89739bcd51b6.jpeg)  
The HTML Template node hast the following setting:  
img width="1280" alt="8015 ONVIF" src="{{msg.\_payload.image.base64}}

I noticed that the msg of the onvif node had another argument called "\_payload". If I try to read the value of the normal Payload it gives me "Null" and if I read the one of the argument "\_Payload" I get the following: msg.\_payload : number  
1644957187406. The problem is that I can't get any image on my Home screen (see the attached image). it also doesn't matter if I use the "onvif/device\_service" behind the IP-Address or not. If I install the "node-red-contrib-ffmpeg" module, my node red won't start after that! any explanation?

I tried to convert the value I got from \_Payload using the BASE64 node but whitout success, and I'm not even short that this is the image coming from the IP\_Camera.

Please, can someone lend me a hand on this issue?  
Is there another easy method to get some snapshots from IP-Cameras using Node-Red.  
Thank you in advance  
Regards  
Tades

---

<div class="post-metadata">

**Author:** ![tades](https://avatars.discourse-cdn.com/v4/letter/t/e95f7d/32.png) [@tades](https://discourse.nodered.org/u/tades)\
**Post date:** [15 February 2022 21:00 UTC](https://discourse.nodered.org/t/onvif-snapshot-on-windows10-with-node-red-v2-1-3-and-tapo-c100-ip-camera/58420/2 "2022-02-15T21:00:22Z")

</div>

Here is the configuration of the Onvif-Block

 ![Onvif_configuration](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/2/0/20fc9928df0773aab994bfbf66ea32967e6006e4.jpeg)  
and the home screen look as follow:  
 ![Home_Screen](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/e/a/ea38e9f294f5b2305a4a67c0a6408e3f4dadcf33.jpeg)

---

<div class="post-metadata">

**Author:** ![BartButenaers](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bartbutenaers/32/10476_2.png) [@BartButenaers](https://discourse.nodered.org/u/BartButenaers)\
**Post date:** [16 February 2022 07:19 UTC](https://discourse.nodered.org/t/onvif-snapshot-on-windows10-with-node-red-v2-1-3-and-tapo-c100-ip-camera/58420/3 "2022-02-16T07:19:50Z")

</div>

> [@tades](#):
>
> Input should be a buffer or a base64 string or a Jimp image (containing a jpg or png image

Hi @tades,  
Have you already tried to put a debug node at the output of that snapshot node? Then you can see what kind of data you get. Don't know how that snapshot node works, but it could e.g. that it returns an access denied html page or whatever...

> [@tades](#):
>
> Is there another easy method to get some snapshots from IP-Cameras using Node-Red.

Yes there are a few other options:

- You put that url in the http-request node, and set output type to 'buffer' (to avoid messing up your data)
- You could have a look at my [node-red-contrib-onvif-nodes](https://github.com/bartbutenaers/node-red-contrib-onvif-nodes). They are not available on npm yet, so you need to install them via the npm command that you can find at the top of my Github readme page

Bart

---

<div class="post-metadata">

**Author:** ![tades](https://avatars.discourse-cdn.com/v4/letter/t/e95f7d/32.png) [@tades](https://discourse.nodered.org/u/tades)\
**Post date:** [16 February 2022 08:39 UTC](https://discourse.nodered.org/t/onvif-snapshot-on-windows10-with-node-red-v2-1-3-and-tapo-c100-ip-camera/58420/4 "2022-02-16T08:39:48Z")

</div>

Hi Bart,  
thank you for the support.  
yes I put a debug node at the snapshot node and the argument were, the name, the payload, then \_payload. Payload gives "Null" and \_Payload gives a number back. I suppose this number can be an encoded image, but I'm not that sure, since I tried to convert it without success. In any case, the output is the same as the one you can see on the right side of the "Worksheet\_onvif" screenshot above.

I will try your second suggestion in the evening and give you the feed-back.  
to be sure I understood you correctly, I have to install them via the commande windows using the npm command and after that I would be able to use you nodes in the node-red interface?

thanks again  
Regards,

Tades

---

<div class="post-metadata">

**Author:** ![BartButenaers](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bartbutenaers/32/10476_2.png) [@BartButenaers](https://discourse.nodered.org/u/BartButenaers)\
**Post date:** [16 February 2022 11:30 UTC](https://discourse.nodered.org/t/onvif-snapshot-on-windows10-with-node-red-v2-1-3-and-tapo-c100-ip-camera/58420/5 "2022-02-16T11:30:34Z")

</div>

> [@tades](#):
>
> I suppose this number can be an encoded image

Do you mean a single number? I assume not because that would be a very highly compressed image 😉  
Do you mean a long string containing all kind if weird characters and numbers? Perhaps you can copy such a value (via the 'copy value' button in the debug sidebar) and share it here?

> [@tades](#):
>
> using the npm command

Yes, go to your .node-red folder (via command line), execute there that command, restart node-red, and refresh your browser window. Then it should be in your palette.

---

<div class="post-metadata">

**Author:** ![tades](https://avatars.discourse-cdn.com/v4/letter/t/e95f7d/32.png) [@tades](https://discourse.nodered.org/u/tades)\
**Post date:** [16 February 2022 18:10 UTC](https://discourse.nodered.org/t/onvif-snapshot-on-windows10-with-node-red-v2-1-3-and-tapo-c100-ip-camera/58420/6 "2022-02-16T18:10:17Z")

</div>

> [@BartButenaers](#):
>
> Do you mean a single number? I assume not because that would be a very highly compressed image 😉  
> Do you mean a long string containing all kind if weird characters and numbers? Perhaps you can copy such a value (via the 'copy value' button in the debug sidebar) and share it here?

 ![Debug_node_on_Onvif_Snapshot_node](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/9/6/9622a9e3d11a4561d2d98fa2bda9fc82153cdf38.jpeg)  
Hi Bart,  
Here is the screenshot you asked for. You can see all the arguments which are given back. The error at the end is odd. The snapshot is just a captured image from a whole streamed image, and I thought it should be related to the protocol and not the device.  
is it possible for the device to be able to use the Onvif protocol but not support snapshot?

> [@BartButenaers](#):
>
> Yes, go to your .node-red folder (via command line), execute there that command, restart node-red, and refresh your browser window. Then it should be in your palette.

I just did it, and it was intall successfully. I will play with it and give you the feed-back how it goes.  
thank you

Tades

---

<div class="post-metadata">

**Author:** ![BartButenaers](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bartbutenaers/32/10476_2.png) [@BartButenaers](https://discourse.nodered.org/u/BartButenaers)\
**Post date:** [16 February 2022 19:40 UTC](https://discourse.nodered.org/t/onvif-snapshot-on-windows10-with-node-red-v2-1-3-and-tapo-c100-ip-camera/58420/7 "2022-02-16T19:40:09Z")

</div>

> [@tades](#):
>
> The error at the end is odd.

Tades,  
Where did you get that url? Because it doesn't really look like a snapshot url to me. But I might be mistaken...

From [this](https://community.tp-link.com/en/home/forum/topic/187252) discussion it looks to me that your cam doesn't have an http endpoint, so you cannot simply send http requests to it to get snapshot images.

So they propose to open an rtsp stream (via ffmpeg), and then you need to get snapshot images from that stream.

That would indeed work, but you will be streaming a lot of data (audio and video) to Node-RED. Which might be not a problem when you want to get snapshot images continiously. On the other hand if you want to capture only a single image, then this will be quite some overhead (because you will have a live stream from your camera).

Is it correct what I am saying? Because in that case none of the mentioned nodes above will work. Then we need to switch e.g. to the node-red-contrib-ffmpeg-spawn node, and extract the I-frames (to reduce the cpu/memory).

---

<div class="post-metadata">

**Author:** ![tades](https://avatars.discourse-cdn.com/v4/letter/t/e95f7d/32.png) [@tades](https://discourse.nodered.org/u/tades)\
**Post date:** [16 February 2022 21:35 UTC](https://discourse.nodered.org/t/onvif-snapshot-on-windows10-with-node-red-v2-1-3-and-tapo-c100-ip-camera/58420/8 "2022-02-16T21:35:05Z")

</div>

Hi Bart!

> [@BartButenaers](#):
>
> Tades,  
> Where did you get that url? Because it doesn't really look like a snapshot url to me. But I might be mistaken...
> 
> From [this](https://community.tp-link.com/en/home/forum/topic/187252) discussion it looks to me that your cam doesn't have an http endpoint, so you cannot simply send http requests to it to get snapshot images.

Sorry, I'm not good in Network, I don't know what is the http endpoint. I got the url from iSpy using Onvif protocol, and it worked there fine. That it why I thought it should work fine in Node-red too. I read the discussion you mentioned in your message, and they say there clearly that the Tapo-C200 doesn't have that HTTP endpoint.  
Here are the screenshot of the iSpy interface, where the url work fine:

 ![Onvif_With_iSpy1](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/9/1/91d76c398b5e2b68161f0ebebf3e7bdefe1039f4.jpeg)  
 ![Onvif_With_iSpy2](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/2/2/22dd1c695acc0a173a32fb59f32adcfc843fa5f9.jpeg)

> [@BartButenaers](#):
>
> So they propose to open a rtsp stream (via ffmpeg), and then you need to get snapshot images from that stream.
> 
> That would indeed work, but you will be streaming a lot of data (audio and video) to Node-RED. Which might be not a problem when you want to get snapshot images continiously. On the other hand if you want to capture only a single image, then this will be quite some overhead (because you will have a live stream from your camera).
> 
> Is it correct what I am saying? Because in that case none of the mentioned nodes above will work. Then we need to switch e.g. to the node-red-contrib-ffmpeg-spawn node, and extract the I-frames (to reduce the cpu/memory).

Yes, I want to get snapshot image continuously, and I even tried to download the "node-red-contrib-ffmpeg" node, but then when I installed it, I got a kind of conflict and my node-red can't start anymore. Which node can I use to get the stream with the rtps protocol?  
I haven't got the chance to test your block yet, but will do it tomorrow in the evening.  
Thank you again.

---

<div class="post-metadata">

**Author:** ![BartButenaers](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bartbutenaers/32/10476_2.png) [@BartButenaers](https://discourse.nodered.org/u/BartButenaers)\
**Post date:** [16 February 2022 21:58 UTC](https://discourse.nodered.org/t/onvif-snapshot-on-windows10-with-node-red-v2-1-3-and-tapo-c100-ip-camera/58420/9 "2022-02-16T21:58:05Z")

</div>

> [@tades](#):
>
> I haven't got the chance to test your block y

In this case my onvif nodes will also not work. Indeed my nodes also fetch the snapshot image via a http request, since the Onvif protocol returns the http url...

> [@tades](#):
>
> Which node can I use to get the stream with the rtps protocol?

You should use the [node-red-contrib-ffmpeg-spawn](https://github.com/kevinGodell/node-red-contrib-ffmpeg-spawn) node. Since it is also not available on npm yet, you should install it with the commands on the readme page. And of course ffmpeg should also be installed.

You should have a look at [this](https://discourse.nodered.org/t/how-to-build-a-video-surveillance-system-from-scratch/51077/33) discussion, which might be a good starting point.

---

<div class="post-metadata">

**Author:** ![tades](https://avatars.discourse-cdn.com/v4/letter/t/e95f7d/32.png) [@tades](https://discourse.nodered.org/u/tades)\
**Post date:** [8 April 2022 16:18 UTC](https://discourse.nodered.org/t/onvif-snapshot-on-windows10-with-node-red-v2-1-3-and-tapo-c100-ip-camera/58420/10 "2022-04-08T16:18:28Z")

</div>

Hello Bart!  
thank you very much the support you gave the last time with the issue I had to stream videos on node red using the Tapo C100 camera.  
I wanted now to ask if you know a way to save a streamed video on a defined path (of the computer, for example). I mean a way to save the snapshot images (or the whole stream coming from the IP-Camera) which are being continuously posted on node red board in a defined path (on the local drive c for example)  
any hint will be welcome.  
thank you in advance for all.  
Tades

---

<div class="post-metadata">

**Author:** ![krambriw](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/krambriw/32/5429_2.png) [@krambriw](https://discourse.nodered.org/u/krambriw)\
**Post date:** [9 April 2022 06:16 UTC](https://discourse.nodered.org/t/onvif-snapshot-on-windows10-with-node-red-v2-1-3-and-tapo-c100-ip-camera/58420/11 "2022-04-09T06:16:48Z")

</div>

Then you should have a look here

> [@Home Surveillance System (HSS)](https://discourse.nodered.org/t/home-surveillance-system-hss/51726):
>
> David (@dynamicdave), Paul (@zenofmud and Walter (@krambriw) are pleased to announce the release of their Home Surveillance System (HSS) project based on Node-RED running on a Raspberry Pi (recommended hardware is... Raspberry Pi-3B or 4B). As can be seen from the photos below, HSS has four monitors and a main display area that can show video streams from local and/or remote cameras [walter\_2] On-the-fly recordings can …

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [8 June 2022 06:17 UTC](https://discourse.nodered.org/t/onvif-snapshot-on-windows10-with-node-red-v2-1-3-and-tapo-c100-ip-camera/58420/12 "2022-06-08T06:17:41Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
