44
Votes

Save Videos on FTP Server / SMB share

 
44
Votes

Save Videos on FTP Server / SMB share

49 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
2025-01-26 19:07:31
good idea!
#45
Options
Re:Save Videos on FTP Server / SMB share
2025-01-27 08:15:07 - last edited 2025-01-27 08:15:57

> 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
2025-02-11 22:43:45

  @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
Re:Save Videos on FTP Server / SMB share
2025-03-06 11:52:34 - last edited 2025-03-06 11:53:29

  I own a Tapo c210 v2.2, it would be greate ıf it comes with FTP recording and management feature. 

Although judging bu the forum thread date, I dont have ant hope for this feature to come. 

#48
Options
Re:Save Videos on FTP Server / SMB share
2025-05-23 01:05:08

  @Grevel TpLink are so slow... I had this feature on a camera that was more than 10 years old. oh well.. buyer beware. 

#49
Options
RE:Save Videos on FTP Server / SMB share
2025-05-23 18:30:47
+1
#50
Options
Re:Save Videos on FTP Server / SMB share
2025-06-11 04:03:33

I have 2 C520WS and 1 C320WS.

 

I have tried to use pytapo to download the videos from the sdcard but I only get authentication error.

 

So my current solution is using ZoneMinder where I receive the rtsp video stream from the 3 camera. I'm using my intel iGPU (vaapi) hardware acceleration for h264 decoding/encoding (I've disabled jpg saving). I'm using ZoneMinder motion detection (Modect) to save when needed the video. It doesn't work as good as the C520WS motion detection though. I also use a crontab rule that launches every minute rclone (with flock to avoid multiple run) to sync the local storage with my pCloud. Something like this:

 

* * * * * flock /tmp/rclone.zm.event.1 rclone sync /var/cache/zoneminder/events/1 pcloud:ZoneMinder/events/1
* * * * * flock /tmp/rclone.zm.event.2 rclone sync /var/cache/zoneminder/events/2 pcloud:ZoneMinder/events/2
* * * * * flock /tmp/rclone.zm.event.3 rclone sync /var/cache/zoneminder/events/3 pcloud:ZoneMinder/events/3

 

So far it's working ok but not perfect.

 

 

 

I had to set the video resolution of the camera to 1080p because it seems that the 2K video stream is incompatible with ZoneMinder. I haven't found why but it generates tons of decoding error and results in empty videos.

#51
Options