Is "PTZ" a brand or are you using that for "pan-tilt-zoom"? If it is the latter I suggest editing the subject line in your ORIGINAL message to make it clear.
At the very least, you'll need to be explicit about the brand and model of camera that you've got. The overwhelming likelihood is that the cameras are locked to the specific "cloud" servers as part of their business model, and that sooner or later they'll ask you to pay for an enhanced (or any) service.
You might possibly be able to replace your local app with something more appropriate, but it's likely that the servers will only talk to the apps the manufacturer supplies "as a security feature".
I'd suggest that you start by doing an exhaustive search for that specific camera (Github, Sourceforge, Hackaday, eventually Google etc.) and possibly also capture the protocol using Wireshark or something similar: you'll need to work out how to hook that into a switch or router between the camera(s) and overall Internet. If it's been done even half-properly the data stream should be encrypted, but these things often have extremely poor security with exposed Telnet ports etc... nmap is your friend, as ever.
The bottom line though is that you're likely to have to "break into" each camera and make substantial changes to the firmware. Lots of people have followed this route with various cameras, after making similar ill-advised purchases.
As such this isn't really a Pascal program per se and this isn't the best place to ask, but please keep us informed of how you get on.
MarkMLl