Run Record Demo
Unlike what you have seen in Run Preview Demo, this time the video from a camera will be saved as an .mp4 file.
Prerequisites
Before running record_demo, you first need to:
-
Install AVT SDK on your device:
See AVTSDK Environment Setup for details. The installation script will install everything you need.
-
Connect the cameras to the device
Run the Demo
This demo demonstrates how to record video from a selected camera into an .mp4 file.
Steps
-
Create a script
init.shto configure the Wayland display environment1 for the demo:Then you can source the script in your terminal:
-
Run the record demo application. The application is installed to
/usr/bin, so you can run it directly with the following command: -
The application will prompt you to select the settings as shown in Run Preview Demo, with additional options for recording the video. You may select each setting according to your preference.

Settings for the camera and the output
.mp4file.Warning
The video bitrate must be between 100 and 100000.
-
Video from the selected camera will be recorded into a file named
record.mp4in your current working directory.
-
The Wayland environment variables are required for all the demos, even when there's no visual display output, as they are essential for proper initialization of some underlying AVT SDK components and plugins. In general, it is recommended to always set them to prevent any potential issues. ↩