get-media-files

Added in V1.3

Use the interface to get recorded files saved in USB flash drive or SD card.

Call del-media-files to delete the obtained files.

HTTP Request

GET http://ip/usapi?method=get-media-files&disk-type=1&start=0&count=3
Parameter Description
method get-media-files
disk-type Indicates the storage device. 0 indicates USB flash drive. 1 indicates SD card.
start Indicates the start of index from 0.
count Indicates the number of recorded files.

Response Body

{
  "result": 0,
  "path": "/media/disk1/REC_Folder",
  "thumbnail": "thumbnail",
  "media-files": [
    {
      "name": "VID_9.mp4",                           // video file name
      "thumbnail-name": "VID_9.mp4_1569393321",      // Thumbnail name, the default file extension is .jpg.
      "status": 1,                                   // video file status, 0 indicates the file is recording. 1 indicates the file is normal; 2 indicates the file is error; 3 indicates the file is lost.
      "create-time": "2019-09-25 06:35:21",          // file created time
      "size-bytes": 4025670,                         // file size in bytes
      "duration": 14480,                             // Video duration in seconds      "width": 1280,                                 // video width in pixels
      "height": 720,                                 // video height in pixels
      "interval": 200000,                            // frame rate in FPS = 10000000 / interval
      "codec": 0                                     // code type. 0 indicates H264; 1 indicates HEVC.
    },
    ...
  ]
}
Item Description
result 0 indicates that the request was accepted successfully. Refer to API Status Codes to find specific description for other values.
path Indicates the path for recorded video clips.
thumbnail Indicates Video thumbnail storage subdirectory, the absolute path consists: path + thumbnail.
media-files Indicates the recorded files list.

Common Paths

Item Format Example
Video file path path/name /media/disk1/REC_Folder/VID_9.mp4
Download path http://ip:8080/download/path/name http://ip:8080/download/media/disk1/REC_Folder/VID_9.mp4
Thumbnail path path/thumbnail/thumbnail-name /media/disk1/REC_Folder/thumbnail/thumbnail-name.jpg

results matching ""

    No results matching ""

    results matching ""

      No results matching ""