Skip to main content

RTSP Streaming


  1. Compatible Cameras
  2. If using the ROCK 5B, you can also use the HDMI RX as a video source

Server Configuration


Input sources with lower than 720P resolution may cause encoding failure when using HDMI RX.

Install build dependencies

sudo apt update
sudo apt install librockchip-mpp-dev librockchip-vpu0 librga-dev libyuv-dev libdrm-dev pkg-config libx264-dev build-essential git

Compile and install the latest MPP

git clone
pushd mpp
cmake -DRKPLATFORM=ON -DHAVE_DRM=ON && make -j$(nproc)
sudo make install
sudo cp ./mpp/* /lib/aarch64-linux-gnu
sudo cp ./mpp/legacy/* /lib/aarch64-linux-gnu

Compile and install FFmpeg

git clone
pushd FFmpeg/
./configure --enable-rkmpp --enable-version3 --enable-libdrm --enable-libx264 --enable-gpl
make -j$(nproc)
sudo make install

Running mediamtx and FFmpeg


Here we assume that /dev/video0 is the video source you want to use. If your camera is assigned to a different name, replace the corresponding device name in the following command line.

tar -xzvf mediamtx_v1.0.0_linux_arm64v8.tar.gz
nohup ./mediamtx &
sudo ffmpeg -re -f v4l2 -i /dev/video0 -c:v hevc -rc_mode 0 -level 30 -f rtsp rtsp://

Client Configuration

The following is an example of how to watch RTSP video stream by running VLC under Windows.

  1. Download and install VLC VLC-Main

  2. Click "Media - Open Network Streaming" to enter the RTSP stream address.


A communicable IP address is necessary.


  1. Click Play to view the RTSP remote streaming content. VLC-View-RTSP