Recording unifi_video.recording
¶
-
class
unifi_video.recording.
UnifiVideoRecording
(api, data=None)[source]¶ Bases:
unifi_video.single.UnifiVideoSingle
Recording container
Variables: - _id (str) – Recording ID (MongoDB ObjectID as hex string)
- start_time (datetime) – Recording start time and date (local time)
- end_time (datetime) – Recording end time and date (local time)
- start_time_utc (datetime) – Recording start time and date (UTC)
- end_time_utc (datetime) – Recording end time and date (UTC)
- rec_type (str) – Recording type. Either motionRecording, or fullTimeRecording.
- locked (bool, NoneType) – Whether or not recording is locked
- in_progress (bool, NoneType) – Recording is in progress
- marked_for_deletion (bool, NoneType) – Recording is marked for deletion
- cameras (list) – List of camera IDs
-
download
(filename=None)[source]¶ Download recording
Parameters: filename (str, NoneType, bool) – Filename (str) to save the image as or True
(bool) if you want the response body as a return value. You can also leave this out or set it toNone
orFalse
and a filename will be generated for you.- Return value:
Depends on input params.
- When
filename
is str, NoneType orFalse
: True if write to file was successful, otherwise NoneType - When
filename
isTrue
: raw response body (str)
- When
-
motion
(filename=None)[source]¶ Download recording motion
Parameters: filename (str, NoneType, bool) – Filename (str) to save the image as or True
(bool) if you want the response body as a return value. You can also leave this out or set it toNone
orFalse
and a filename will be generated for you.- Return value:
Depends on input params.
- When
filename
is str, NoneType orFalse
: True if write to file was successful, otherwise NoneType - When
filename
isTrue
: raw response body (str)
- When
-
snapshot
(width=600, filename=None)[source]¶ Download recording thumbnail
Parameters: - width (int) – Image pixel width
- filename (str, NoneType, bool) – Filename (str) to save the
image as or
True
(bool) if you want the response body as a return value. You can also leave this out or set it toNone
orFalse
and a filename will be generated for you.
- Return value:
Depends on input params.
- When
filename
is str, NoneType orFalse
: True if write to file was successful, otherwise NoneType - When
filename
isTrue
: raw response body (str)
- When