qrb_ros_video sample application is a ROS package that provides hardware-accelerated video processing on Qualcomm robotics platforms. It encodes raw YUV frames into H.264 or H.265 streams and decodes those streams back into raw frames, using the Qualcomm Video Processing Unit (VPU). Buffers move through qrb_ros_transport as DMA buffers, so frames are passed without a copy, and the encoder accepts input directly from qrb_ros_camera.
NoteFor more information, see the qrb_ros_video GitHub repo.
Pipeline flow for qrb_ros_video
The encoder_launch.py and decoder_launch.py launch files start two independent composable-node containers, each in its own namespace. The encoder container reads raw frames with ImageReader, encodes them, and writes the compressed stream to a file with CompressedWriter. The decoder container reads a compressed stream with CompressedReader, decodes it, and writes the frames with ImageWriter. The encoder also accepts frames directly from qrb_ros_camera if you remap its input.
Figure: qrb_ros_video pipeline
ROS nodes used in the qrb_ros_video pipeline
ROS topics used in the qrb_ros_video pipeline
NoteEach node declares its endpoints as the relative names
input and output. The launch files remap them to the names above and place every node in the recording_ns or playback_ns namespace, so /input and /output do not exist at runtime. Run ros2 topic list to see the effective names.ROS parameters for qrb_ros_video
Table: Encoder parameters
Table: Decoder parameters
Prerequisites
- You have Set up the device according to Set up the environment for running sample applications.
Run out-of-the-box qrb_ros_video
Try me
Try me
1
Set up the environment
Start a commandline terminal on your device and run the following commands.
SSH Session
NoteValue range of
ROS_DOMAIN_ID: [0, 232]2
Encode a local YUV file
- Copy the raw YUV sample file to the
/data/directory on the device. - Run the encoder.
SSH Session
reader_nodereads/data/1920_1080_nv12.yuvandwriter_nodewrites the encoded stream to/data/1920_1080_nv12.mp4. Override either path with theurlparameter of the corresponding node.
3
Decode a local video file
- Copy the video sample file to the
/data/directory on the device. - Run the decoder.
SSH Session
reader_nodereads/data/1920_1080.mp4.writer_nodewrites the decoded frames to/dev/nullby default, so no output file is produced; set itsurlparameter to keep the decoded YUV.
4
Verify the ROS topics
In a second SSH terminal, list the topics and check the stream that the encoder or the decoder publishes.
SSH Session
Build and run qrb_ros_video
Try me
Try me
1
Clone qrb_ros_video on the host
2
Build qrb_ros_video on the host
3
Push qrb_ros_video to the device
SSH Session
4
Run qrb_ros_video on the device
Run
qrb_ros_video on the device by following Run out-of-the-box qrb_ros_video.Limitations
- Hardware-accelerated encoding and decoding require the Qualcomm VPU, so the video overlay must be enabled on the device.
- The supported codec formats are H.264 and H.265. The supported input pixel formats are NV12 and P010.

