agsh / onvif

ONVIF node.js implementation
http://agsh.github.io/onvif/
MIT License
696 stars 237 forks source link

Example code snippet to create a recording #242

Open bartbutenaers opened 2 years ago

bartbutenaers commented 2 years ago

Hi everybody,

Recently @viettel-solutions have been so kind to add a lot of recording functionality (via this PR) to this repository. But I have a few questions about this:

  1. I would like to tell my camera to start a recording of N seconds (with resolution X, ...). But to be honest it is not clear to me how to implement it. Would appreciate if an example code snippet with comments could be shared, to clarify which steps need to be done (with the scheduleToken, recordingToken, ...).

  2. I see in the Onvif Recording Control specification that there is both a createRecording and a createRecordingJob function. Only the second function has been implemented in the pull request. Is this because the first function is optional in the specification, and everything can also be done with the second function?

It is a very cool addition to this library! Looking forward to see it in action. Although the getRecordings most probably won't work for me, since I don't have an SD card in my camera. Instead I have setup an FTP destination in my cam, which means all the recordings are stored on my FTP server. And if I am not mistaken, the getRecordings only works with recordings (and their corresponding recordingTokens) stored locally in the cam...

Thanks in advance!!! Bart

bartbutenaers commented 2 years ago

Hi @viettel-solutions, I would appreciate a lot if you could find some time to have a look at my questions above. Thanks!!! Bart