B4J Code Snippet Synology Surveillance API

A simple example of working with Synology Surveillance API
added possibility work with https:
1 take a sid for current session
2 check all available cameras
3 make shots from each camera to file
TODO
One of mine camera work on rtsp with H.264 video
snapshot file started from
B4X:
���� Lavc56.60.100
Any suggestion of easy way to transfer it to jpg or png
 

Attachments

  • SYNO_API.zip
    9.7 KB · Views: 302

OliverA

Expert
Licensed User
Longtime User
Is it actually producing proper JPEGs? I would think that
B4X:
Dim tfile As Long= DateTime.Now
File.WriteString(File.DirApp, tfile&".jpg", j.GetString)
would corrupt the JPEG, since j.GetString returns a string, not binary data, and File.WriteString writes a string. That actually works?
 

DonManfred

Expert
Licensed User
Longtime User

OliverA

Expert
Licensed User
Longtime User
Looks like the *21.jpg file contains the H264 capture and the *03.jpg file contains the JFIF format. Neither open properly for me. Do they for you?
 
Top