Last Updated on : 2025-01-15 07:54:30download
Always On Video (AOV) differs from regular video recording in its generation mechanism, and parameters such as frame rate and bitrate are also different. Given this feature, you must add a new storage logic to handle AOV recordings in the existing storage system.
Devices with AOV functionality will generate video data with parameters different from those of regular recordings. The following relationships are displayed in terms of time:
As shown in the diagram above, AOV recordings and regular event recordings are mutually exclusive in terms of time. There are no restrictions on the duration ratio between AOV recordings and regular recordings. Therefore, AOV recordings can be considered a new type of event recording, but the storage process is slightly different from that of regular recordings.
svc_local_storage
svc_aov_buffer
The directory structure for storing AOV recordings is consistent with that for regular recordings. For more information, see Directory and file structure.
The video format for storing AOV recordings is consistent with that for regular recordings. For more information, see Video format.
Add a new storage mode option in product requirements to distinguish whether to store AOV recordings.
The SDK only provides AOV storage interfaces and parameters, and applications invoke them on demand to implement the specified storage mode.
AOV initial parameters are consistent with local storage initial parameters. For more information, see Initial parameters.
The local storage initial parameters include the following parameter sets:
TUYA_IPC_AOV_STORAGE_INFO_T aov_info; // AOV recording parameters
Initialize and configure AOV storage separately.
/**
* @brief Start AOV local storage
*
* @param[in] chan stream channel
* @return OPRT_OK on success. Others on error
*/
OPERATE_RET tuya_ipc_ss_start_aov_local_storage(IN IPC_STREAM_E chan);
After the local storage module and AOV ring buffer (referred to as ringbuf) are initialized, call this interface to start the AOV video writing process.
/**
* @brief Stop AOV local storage
*
* @param[in] chan stream channel
* @return OPRT_OK on success. Others on error
*/
OPERATE_RET tuya_ipc_ss_stop_aov_local_storage(IN IPC_STREAM_E chan);
Call this interface to stop writing the current AOV video.
/**
* @brief Get the write status of AOV local storage
*
* @param[in] chan stream channel
* @return STORAGE_AOV_STATUS_E
*/
STORAGE_AOV_STATUS_E tuya_ipc_ss_get_aov_storage_status(IN IPC_STREAM_E chan);
Call this interface to get the write status of AOV local storage.
As shown above, the SDK provides a new AOV ringbuf interface, which is used separately from the regular ringbuf interface.
The application needs to import AOV video files into the ringbuf according to the rules. After that, the AOV video files will be automatically stored on a TransFlash (TF) card and other media.
The playback process and steps of AOV recordings are consistent with those of regular recordings, and no special processing is required.
Similar to local storage, cloud storage also relies on AOV ringbuf. Local storage and cloud storage services use the same AOV ringbuf and do not need to be separated. For information on how to start and stop cloud storage, see the demo code in the file you downloaded.
Low power devices can enter sleep mode only after the video event push is completed.
This issue occurs when event video and AOV video are generated alternately. The issue becomes more obvious when cloud storage is turned on.
The application’s recording logic can be adjusted as shown below:
No. Different resolutions will cause issues with playback on the app and download.
You need to perform tuya_ipc_ss_init
before calling tuya_ipc_upload_skills(VOID)
.
Is this page helpful?
YesFeedbackIs this page helpful?
YesFeedback