Run RTMP Demo
Prerequisites
Before running rtmp_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.
-
Set up an RTMP server:
You need a running RTMP server to receive and distribute the video stream. This can be:
- A local server (e.g., Nginx with RTMP module)
- A streaming service provider (e.g., YouTube Live, Twitch)
-
Connect the cameras to the device
Run the Demo
This demo demonstrates how to create a simple RTMP stream pipeline using AVT SDK. Users then can view the RTMP stream using media player software like ffplay, PotPlayer or VLC media player.
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 RTMP 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 Record Demo, with additional options for configuring the RTMP service. You may select each setting, including both the RTMP name and RTMP stream key, according to your RTMP server setting.

Settings for the camera and the RTMP service.
-
After setup, the RTMP stream will start. You may use a media player to view the stream. Here we take ffplay for example:
- Install the ffmpeg on host machine
- Execute the command

-
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. ↩