Skip to content

How to Export Recorded Data from an ONVIF Camera to my computer #119

Closed

Description

@lvhyml

I've tried getting the rtsp link back in time range but maybe onvif doesn't support that. So now I want to export camera recording onvif but ExportRecordedData api probably doesn't support doing that either.
Please let me know if there is a way to do that. sincerely thank.

Activity

  1. maxim-zapryanov commented on Jun 24, 2021

    @maxim-zapryanov

    There are two ways to get recorded data from an ONVIF device - Replaying the recording using RTSP and using ExportRecordedData.

    1. For using RTSP you need to use the commands from the Replay Service. Specifically GetReplayUri. Before that you would need to have found the recording you want to replay (based on timeline) - using the commands from the Search Service. Also for saving it to playable file format you would need to convert from the transport protocol (RTP) to a multimedia file format (MKV, MP4, etc).
    2. For using ExportRecordedData you need to make sure the device supports it using the capability SupportedExportFileFormats,
  2. lvhyml commented on Jun 25, 2021

    @lvhyml
    Author

    Thank you for responding, that's quite helpful to me.
    Using GetReplay, i get rtsp link from start to present, how to get Replay with time range?
    How to know the device supports the capability SupportedExportFileFormats?

  3. maxim-zapryanov commented on Jun 25, 2021

    @maxim-zapryanov

    To play from a specific time you need to use the RTSP header field "range" for the PLAY command. See section 6.5.1 of https://www.onvif.org/specs/stream/ONVIF-Streaming-Spec.pdf
    and
    https://datatracker.ietf.org/doc/html/rfc2326#section-12.29

    The SupportedExportFileFormats capability can be checked through the GetServiceCapabilities on the Recording Service (https://www.onvif.org/ver10/recording.wsdl)

  4. lvhyml commented on Jun 25, 2021

    @lvhyml
    Author

    Thanks for your help. I will try your solution and give the result back later.

  5. locked and limited conversation to collaborators on Jul 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions