40
Votes

Save Videos on FTP Server / SMB share

 
40
Votes

Save Videos on FTP Server / SMB share

45 Reply
Re:Save Videos on FTP Server / SMB share
2025-01-20 09:29:12

Hi all,

 

Because we have no feedback from Tp-link for years, I suggest you to put here what alternatives camera did you find to work on FTP/SMB.

 

Regards,

GND

#43
Options
Re:Save Videos on FTP Server / SMB share
2025-01-21 00:16:35

  @GNDmen 

 

I did not find any way to use FTP or SMB.  

 

I'm experimenting with using a Raspberry PI 4 with NVME storage.   I've picked up some python scripts that use ONVIF to grab videos when motion is detected:

 

https://github.com/peterstamps/TAPO-camera-ONVIF-RTSP-and-AI-Object-Recognition

 

I've been hacking the myMPTapoDetectCaptureVideo.py script.  The script uses ONVIF to pull motion events.  Simultaniously the script is buffering frames.  If a motion event comes through it saves a series of frames as a video. 

 

But things are a bit complicated...

 

The scripts as they are have some issues, the author is not a programmer, but is obviously quite bright and has managed to build something that kind of works.  They work best for 1280x720, but that may be a mater of doing some further optimisation. The author also has some C++ code, but I haven't looked at that (I've sworn off of C++, C is OK though).

 

The scripts are very CPU intensive, unecessaily so.  There are several loops that rapidly re-test if any data is ready.  I've added 10 ms sleeps when the loops are idling. This got the CPU consumption down from 100%+ to around 10%.    I think they could be simplified further, but theres quite a bit to tease out.  I also need to see if they can be tweaked to handle the 2560x1440 stream, it may just be a mater of doing less computationally (at the expense of larger video files).

 

I've lost some interest when I found that ONVIF only supplies motion-events and does not get person-detection-events.

 

It's possible person-detection-events might be able to be monitored by having them trigger power-plugs or light-bulbs.  I'm pondering whether I write a virtual-power-switch that home-automation would see as a real switch?  Or maybe I should just buy a power-plug and experiment.  As I mentioned, it gets complicated.

 

Currently I'm paused, thinking about the best way forward.  

#44
Options
RE:Save Videos on FTP Server / SMB share
3 weeks ago
good idea!
#45
Options
Re:Save Videos on FTP Server / SMB share
3 weeks ago - last edited 3 weeks ago

> I've lost some interest when I found that ONVIF only supplies motion-events and does not get person-detection-events.

 

I raised the lack of person detection events elsewhere, it was passed to tech support, and they quickly responded with a firmware update to the C225 that does pass though person-detection events.

#46
Options
Re:Save Videos on FTP Server / SMB share
a week ago

  @digitaltrails 

 

I raised the lack of person detection events elsewhere, it was passed to tech support, and they quickly responded with a firmware update to the C225 that does pass though person-detection events.

 

After the firmware was updated for the C225, I decided to write a python script to use ONVIF and RSTP to download videos and images when a person is detected.  When targeted events occur, the script downloads a video+image for a limited time from the beginning of the event (it might lose the very beginning due to time delays receiving and processing the ONVIF notification).  I'm running my script on a Rasperberry Pi 5 8GB with NVME storage.

 

If you need such a script, or an example to kick-start your own efforts, it is currently available at https://github.com/digitaltrails/onvifeye.  The code is relatively tidy, but not yet polished.  I'm not that familiar with python-asyncio, I've tried to keep that aspect relatively simple.

 

In respect to this topic, it's probably feasible to use RSTP to do download/stream the entire video feed, but when considering such an approach, also consider that the need to reencode the stream to save it is a bit CPU intensive. Possibly reencoding can be avoided, but I haven't looked into that. 

#47
Options