Search code examples
ip-cameraonvif

Retrieving camera recordings via ONVIF


We have an Axis M1124 that does retrieving recordings (on the SD card) when motion is detected. According to onvif.org the M1124 supports ONVIF Profile G which allows one to retrieve recordings from the camera. We are trying to implement a Profile G complaint client that would be able to backup and/or playback recordings from a camera. However, we are not sure if we incorrectly call the ONVIF service methods to retrieve the recordings, because the data we receive back from the camera yields no results (even though the web interface of the camera shows there are recordings on the camera).

We try use the SOAP methods as defined by http://www.onvif.org/onvif/ver10/recording.wsdl and http://www.onvif.org/onvif/ver10/search.wsdl The M1124 actually returns valid SOAP responses (with no recording data), which lets us believe that the camera actually supports the methods.

We also could not find any other ONVIF (simple) client that supports Profile G to verify whether it is our implementation of Profile G that is at fault or the implementation of Profile G on the Axis camera it self. Do any one of you maybe have some example on how to (correctly) retrieve the recordings from a camera (not just Axis) with ONVIF?

P.S. We have tried the example here, but with no success


Solution

  • Axis treats recordings created with Onvif separate to recordings created with their native driver (VAPIX). Their web interface actions are treated as VAPIX commands. Only recordings created with the Onvif protocol are listed when sending the command GetRecordings. To test this, you will need to create a recording (set the MaximuRetention time to zero) and active recording job (use the token of the created recording when creating the recording job) using the commands at https://www.onvif.org/ver10/recording.wsdl.

    I recommend you use the official onvif test tools to send individual commands from the debug section. The test tool has a list of command input templates that you can use for reference (you can also add your own), and displays the response after sending the command. If you come across format problems in the debug templates, then send the same command through the diagnostics section (verify it works) and then copy that command input to use it for the debug command input. You will need to register as a developer on the onvif forum (http://developer.onvif.org/) to download either the device or client test tool.

    For further information of Onvif Profile G specifications, I recommend reading the documents listed below (Visit the onvif website for the most up to date documents):

    Onvif G Specification Document (google the following):

    • "Onvif Profile G Specification"

    Documents of services related to Onvif G (google the following):

    • "Onvif Recording Control Service"
    • "Onvif Recording Search Service"
    • "Onvif Replay Service"