Fortinet white logo
Fortinet white logo

VideoClip

VideoClip

Download previously recorded video clips and snapshot images.

Permissions required include Video playback and Camera live view.

Tooltip

Timestamps are in UTC in seconds since January 1, 1970, UTC (also called the Unix epoch). Convert the local time zone on FortiRecorder to UTC, and then convert to the Unix epoch relative timestamp.

For example, January 1, 2025 at 1 PM EST may convert to 6 PM GMT, which is equivalent to an epoch timestamp of 1735754400.

Tooltip

Most request JSON attributes are optional, not required. If a request does not include them, then the video is downloaded as-is.

Time required to receive a response increases if you ask FortiRecorder to convert the video. Do not include optional attributes unless you want FortiRecorder to convert the video to a different size or quality, omit audio, etc. Conversion is best effort. It may not be possible in all cases to achieve a video clip with those exact characteristics.

HTTP Methods
  • POST

URL
https://HOST_OR_IP/api/v1/VideoClip
Request JSON
{
    "reqAction":21,
    "camera":"CAMERA_NAME",
    "audio":1,
    "begin":1584734700,
    "end":1584734900,
    "height":1440,
    "width":2560,
    "fps":30,
    "codec":"h265",
    "gop":60,
    "qvalue":50,
    "bitrate":1000,
    "osdFormat":"24h",
    "osdPosition":"Top-Left"
}

where attributes are:

  • audio — Optional. Whether or not to include audio. Valid values are 0 (no audio) or 1 (include audio, if any).

  • begin — Timestamp for the start of the video clip in UTC. If begin is the same as end, then instead of a movie, it downloads an image.

  • bitrate — Optional. Quality, in bits per second.

    Tooltip

    bitrate is ignored if qvalue is used.

  • camera — Camera name, as defined on FortiRecorder.

  • codec — Optional. Encoding type. Valid values are either h264 or h265.

  • end — Timestamp for the end of the video clip in UTC. If begin is the same as end, then instead of a movie, it downloads an image.

  • fps — Optional. Smoothness of motion in frames per second. A common starting point is 20 or 30.

  • gop — Optional. Number of frames for each reference frame in the group of pictures. Default value may vary by camera model.

  • height — Optional. Height in pixels.

  • osdFormat — Optional. Format of the on-screen display of the timestamp in the video, with the clock as either "12h" or "24h".

  • osdPosition — Optional. Position of the on-screen display of the timestamp in the video. Valid values are "Top-Left", "Top-Right", "Bottom-Left", or "Bottom-Right".

  • qvalue — Optional.Quality. Valid values are from 10 to 50. A reasonable starting point is 32. The greater the qvalue, the less is the bitrate and video quality.

    Tooltip

    bitrate is ignored if qvalue is used.

  • reqAction — Action. Takes precedence over the method in the HTTP header. Required value is 21 (process and download the file).

  • width — Optional. Width in pixels.

Example: Download an MP4 video

curl -X POST -H "Content-Type:application/json" -d "{\"reqAction\":21,\"camera\":\"CAMERA_NAME\",\"begin\":1762206615,\"end\":1762206675}" -b cookie.txt https://HOST_OR_IP/api/v1/VideoClip/ -o VIDEO_NAME.mp4

Example: Download a JPG snapshot image

curl -X POST -H "Content-Type:application/json" -d "{\"reqAction\" :21,\"camera\":\"CAMERA_NAME\",\"begin\":1735754400,\"end\":1735754400}" -b cookie.txt https://HOST_OR_IP/api/v1/VideoClip/ -o IMAGE_NAME.jpg

VideoClip

VideoClip

Download previously recorded video clips and snapshot images.

Permissions required include Video playback and Camera live view.

Tooltip

Timestamps are in UTC in seconds since January 1, 1970, UTC (also called the Unix epoch). Convert the local time zone on FortiRecorder to UTC, and then convert to the Unix epoch relative timestamp.

For example, January 1, 2025 at 1 PM EST may convert to 6 PM GMT, which is equivalent to an epoch timestamp of 1735754400.

Tooltip

Most request JSON attributes are optional, not required. If a request does not include them, then the video is downloaded as-is.

Time required to receive a response increases if you ask FortiRecorder to convert the video. Do not include optional attributes unless you want FortiRecorder to convert the video to a different size or quality, omit audio, etc. Conversion is best effort. It may not be possible in all cases to achieve a video clip with those exact characteristics.

HTTP Methods
  • POST

URL
https://HOST_OR_IP/api/v1/VideoClip
Request JSON
{
    "reqAction":21,
    "camera":"CAMERA_NAME",
    "audio":1,
    "begin":1584734700,
    "end":1584734900,
    "height":1440,
    "width":2560,
    "fps":30,
    "codec":"h265",
    "gop":60,
    "qvalue":50,
    "bitrate":1000,
    "osdFormat":"24h",
    "osdPosition":"Top-Left"
}

where attributes are:

  • audio — Optional. Whether or not to include audio. Valid values are 0 (no audio) or 1 (include audio, if any).

  • begin — Timestamp for the start of the video clip in UTC. If begin is the same as end, then instead of a movie, it downloads an image.

  • bitrate — Optional. Quality, in bits per second.

    Tooltip

    bitrate is ignored if qvalue is used.

  • camera — Camera name, as defined on FortiRecorder.

  • codec — Optional. Encoding type. Valid values are either h264 or h265.

  • end — Timestamp for the end of the video clip in UTC. If begin is the same as end, then instead of a movie, it downloads an image.

  • fps — Optional. Smoothness of motion in frames per second. A common starting point is 20 or 30.

  • gop — Optional. Number of frames for each reference frame in the group of pictures. Default value may vary by camera model.

  • height — Optional. Height in pixels.

  • osdFormat — Optional. Format of the on-screen display of the timestamp in the video, with the clock as either "12h" or "24h".

  • osdPosition — Optional. Position of the on-screen display of the timestamp in the video. Valid values are "Top-Left", "Top-Right", "Bottom-Left", or "Bottom-Right".

  • qvalue — Optional.Quality. Valid values are from 10 to 50. A reasonable starting point is 32. The greater the qvalue, the less is the bitrate and video quality.

    Tooltip

    bitrate is ignored if qvalue is used.

  • reqAction — Action. Takes precedence over the method in the HTTP header. Required value is 21 (process and download the file).

  • width — Optional. Width in pixels.

Example: Download an MP4 video

curl -X POST -H "Content-Type:application/json" -d "{\"reqAction\":21,\"camera\":\"CAMERA_NAME\",\"begin\":1762206615,\"end\":1762206675}" -b cookie.txt https://HOST_OR_IP/api/v1/VideoClip/ -o VIDEO_NAME.mp4

Example: Download a JPG snapshot image

curl -X POST -H "Content-Type:application/json" -d "{\"reqAction\" :21,\"camera\":\"CAMERA_NAME\",\"begin\":1735754400,\"end\":1735754400}" -b cookie.txt https://HOST_OR_IP/api/v1/VideoClip/ -o IMAGE_NAME.jpg