# Video encode and decode
The camera and video encode use cases show various scenarios for encoding and processing the live 4K and 1080p camera streams.
## Prerequisites
- Ensure that you complete the preconditions mentioned in [GStreamer command-line use cases](https://docs.qualcomm.com/doc/80-80021-50/topic/gstreamer-application-use-cases.html).
- Install the VLC media player on the host computer for the RTSP stream.
Note
24 end-to-end concurrent video sessions aren’t supported for QCS6490.
## One stream–1080p AVC RTSP from live source
The use case uses a 1080p stream from the camera for encoding. The encoded stream is sent over the network using the RTSP streaming.
The following figure shows the flow of the pipeline execution:
**Figure : Pipeline for encoding 1080p RTSP stream**
- Run the RTSP server on the target device with udpsrc (You can run it in the background as a service):
gst-rtsp-server -a "" -p 8900 -m /live "( udpsrc name=pay0 port=8554 caps=\"application/x-rtp,media=video,clock-rate=90000,encoding-name=H264,payload=96\" )"
Copy to clipboard
If the IP address of the device is 127.0.0.1, run the following command:
adb forward tcp:8900 tcp:8900
Copy to clipboard
- Run the pipeline in another console on the target device:
gst-launch-1.0 -e qtiqmmfsrc name=camsrc video_0::type=preview ! video/x-raw,format=NV12,width=1920,height=1080,framerate=30/1,interlace-mode=progressive,colorimetry=bt601 ! queue ! v4l2h264enc capture-io-mode=4 output-io-mode=5 ! queue ! h264parse config-interval=-1 ! rtph264pay pt=96 ! udpsink host= port=8554
Copy to clipboard
The streamed video is displayed as an RTSP stream on a host.
To stop the use case, use **CTRL + C**.
### RTSP stream on host computer
Note
Ensure that you’ve installed VLC media player on the Linux host computer.
To view the RTSP stream on the host computer, do one of the following:
- `vlc -vvv rtsp://:8900/live` [Ubuntu 18.04 with VLC version 3.0.8]
- `ffplay -rtsp_transport tcp rtsp://:8900/live`
To view the RTSP stream on the Windows host, do the following:
1. Open the VLC media player.
2. Go to **Media** > **Open Network Stream**, or use **CTRL + N**.
3. Enter `rtsp://:8900/live`.
4. Select **Play**.
## Two streams–4K AVC and 480p AVC from live source
The use cases implement one 4k stream and one 480p stream from the camera for encoding. Each encoded stream is multiplexed into a different file.
Note
Multi-stream encode from live source isn't supported in the QLI 2.0 RC2 release.
Run the use case on the target device:
gst-launch-1.0 -e qtiqmmfsrc name=camsrc video_0::type=preview ! video/x-raw,format=NV12_Q08C,width=3840,height=2160,framerate=30/1,interlace-mode=progressive,colorimetry=bt601 ! queue ! v4l2h264enc capture-io-mode=4 output-io-mode=5 ! queue ! h264parse ! mp4mux ! queue ! filesink location="/opt/mux1.mp4" camsrc. ! video/x-raw,format=NV12_Q08C,width=640,height=480,framerate=30/1,interlace-mode=progressive,colorimetry=bt601 ! queue ! v4l2h264enc capture-io-mode=4 output-io-mode=5 ! queue ! h264parse ! mp4mux ! queue ! filesink location="/opt/mux2.mp4"
Copy to clipboard
To stop the use case, use **CTRL + C**. Pull the recorded content from the target device and then play the content on the host computer.
In the terminal of the host computer run the following commands:
scp -r root@[DEVICE IP-ADDR]:/opt/mux1.mp4 user1@[HOST IP-ADDR]:/workspace/
Copy to clipboard
scp -r root@[DEVICE IP-ADDR]:/opt/mux2.mp4 user1@[HOST IP-ADDR]:/workspace/
Copy to clipboard
You can play the MP4 file on a media player.
The following figure shows the flow of the pipeline execution:
**Figure : Pipeline for encoding two (4k and 1080p) camera streams**
## Three 1080p AVC streams from live source
The use case uses three 1080p streams from the camera for encoding. Each encoded stream is multiplexed into a different file.
Note
Multi-stream encode from live source isn't supported in the QLI 2.0 RC2 release.
Run the use case on the target device:
gst-launch-1.0 -e qtiqmmfsrc name=camsrc video_0::type=preview ! video/x-raw,format=NV12_Q08C,width=1920,height=1080,framerate=30/1,interlace-mode=progressive,colorimetry=bt601 ! queue ! v4l2h264enc capture-io-mode=4 output-io-mode=5 ! queue ! h264parse ! mp4mux ! queue ! filesink location="/opt/mux1.mp4" camsrc. ! video/x-raw,format=NV12_Q08C,width=1920,height=1080,framerate=30/1,interlace-mode=progressive,colorimetry=bt601 ! queue ! v4l2h264enc capture-io-mode=4 output-io-mode=5 ! queue ! h264parse ! mp4mux ! queue ! filesink location="/opt/mux2.mp4" camsrc. ! video/x-raw,format=NV12_Q08C,width=1920,height=1080,framerate=30/1,interlace-mode=progressive,colorimetry=bt601 ! queue ! v4l2h264enc capture-io-mode=4 output-io-mode=5 ! queue ! h264parse ! mp4mux ! queue ! filesink location="/opt/mux3.mp4"
Copy to clipboard
To stop the use case, use **CTRL + C**. Pull the recorded content out from the target device and then play the content on the host computer.
You can play the MP4 files on a media player.
In the terminal of the host computer, run one of the following commands:
scp -r root@[DEVICE IP-ADDR]:/opt/mux1.mp4 user1@[HOST IP-ADDR]:/workspace
Copy to clipboard
scp -r root@[DEVICE IP-ADDR]:/opt/mux2.mp4 user1@[HOST IP-ADDR]:/workspace
Copy to clipboard
scp -r root@[DEVICE IP-ADDR]:/opt/mux3.mp4 user1@[HOST IP-ADDR]:/workspace
Copy to clipboard
The following figure shows the flow of the pipeline execution:
**Figure : Pipeline for encoding three 1080p camera streams**
## Three streams–720p AVC, 720p HEVC, and 720p YUV from live source
The use case uses three 720p streams from the camera. Two of these streams are encoded—one stream encoded as H.264 and the other as HEVC. These streams are multiplexed into different files. The third stream is displayed.
Note
This use case isn’t applicable to Dragonwing IQ-8275 and Dragonwing IQ-9075.
Note
Multi-stream encode from live source isn't supported in the QLI 2.0 RC2 release.
Run the use case on the target device:
gst-launch-1.0 -e qtiqmmfsrc name=camsrc video_0::type=preview video_1::type=video ! video/x-raw,format=NV12_Q08C,width=1280,height=720,framerate=30/1 ! queue ! v4l2h264enc capture-io-mode=4 output-io-mode=5 ! queue ! h264parse ! mp4mux ! queue ! filesink location="/opt/mux1.mp4" camsrc. ! video/x-raw,format=NV12_Q08C,width=1280,height=720,framerate=30/1 ! queue ! v4l2h265enc capture-io-mode=4 output-io-mode=5 ! queue ! h265parse ! mp4mux ! queue ! filesink location="/opt/mux_hevc.mp4" camsrc. ! video/x-raw,format=NV12_Q08C,width=1280,height=720,framerate=30/1 ! waylandsink fullscreen=true
Copy to clipboard
To stop the use case, use **CTRL + C**. Pull the recorded content from the target device and then play the content on the host computer.
The camera stream is displayed. You can play the MP4 file on a media player.
In the terminal of the host computer, run the following commands:
scp -r root@[DEVICE IP-ADDR]:/opt/mux1.mp4 user1@[HOST IP-ADDR]:/workspace/
Copy to clipboard
scp -r root@[DEVICE IP-ADDR]:/opt/mux_hevc.mp4 user1@[HOST IP-ADDR]:/workspace/
Copy to clipboard
The following figure shows the flow of the pipeline execution:
**Figure : Pipeline for encoding 720p AVC, 720p HEVC, and 720p YUV camera streams**
## Three streams–720p AVC MP4, 720p AVC MPEGTS, and 720p AVC MP4 from live source
The use case uses three 720p streams from the camera for encoding. Each stream is encoded as H.264 and multiplexed into different files–two as MP4 and one as MPEGTS.
Note
Multi-stream encode from live source isn't supported in the QLI 2.0 RC2 release.
Run the use case on the target device:
gst-launch-1.0 -e qtiqmmfsrc name=camsrc video_0::type=preview video_1::type=video ! video/x-raw,format=NV12,width=1280,height=720,framerate=30/1,interlace-mode=progressive,colorimetry=bt601 ! queue ! v4l2h264enc capture-io-mode=4 output-io-mode=5 ! queue ! h264parse ! mp4mux ! queue ! filesink location="/opt/mux1.mp4" camsrc. ! video/x-raw,format=NV12,width=1280,height=720,framerate=30/1,interlace-mode=progressive,colorimetry=bt601 ! queue ! v4l2h264enc capture-io-mode=4 output-io-mode=5 ! queue ! h264parse ! mpegtsmux name=muxer ! queue ! filesink location="/opt/mux_mpegts.mp4" camsrc. ! video/x-raw,format=NV12,width=1280,height=720,framerate=30/1,interlace-mode=progressive,colorimetry=bt601 ! queue ! v4l2h265enc capture-io-mode=4 output-io-mode=5 ! queue ! h265parse ! mp4mux ! queue ! filesink location="/opt/mux3.mp4"
Copy to clipboard
To stop the use case, use **CTRL + C**.
Pull recorded content from the target device and play content on the host computer using a media player.
In the terminal of the host computer, run the following commands:
scp -r root@[DEVICE IP-ADDR]:/opt/mux1.mp4 user1@[HOST IP-ADDR]:/workspace
Copy to clipboard
scp -r root@[DEVICE IP-ADDR]:/opt/mux_mpegts.mp4 user1@[HOST IP-ADDR]:/workspace
Copy to clipboard
scp -r root@[DEVICE IP-ADDR]:/opt/mux3.mp4 user1@[HOST IP-ADDR]:/workspace
Copy to clipboard
The following figure shows the flow of the pipeline execution:
**Figure : Pipeline for encoding 720p AVC MP4, 720p AVC MPEGTS, and 720p AVC MP4 camera streams**
## Three streams–1080p AVC file save, 1080p AVC RTSP, and 1080p YUV from live source
The use case uses three 1080p streams from the camera. Two are encoded as H.264. The first stream is multiplexed and saved to a file. The second stream is sent over the network through RTSP streaming. The third stream is sent to the display.
Note
Multi-stream encode from live source isn't supported in the QLI 2.0 RC2 release.
Run the use case on the target device as follows:
Run RTSP server in a separate console on the target device with `udpsrc` (can be run in background as service):
gst-rtsp-server -p 8900 -a -m /live "( udpsrc name=pay0 port=8554 caps=\"application/x-rtp,media=video,clock-rate=90000,encoding-name=H264,payload=96\" )"
Copy to clipboard
Run the pipeline in the same console or another console on the target device:
**1080P use case:**
gst-launch-1.0 -e qtiqmmfsrc name=camsrc video_0::type=preview ! video/x-raw,format=NV12_Q08C,width=1920,height=1080,framerate=30/1,interlace-mode=progressive,colorimetry=bt601 ! queue ! v4l2h264enc capture-io-mode=4 output-io-mode=5 ! queue ! h264parse ! mp4mux ! queue ! filesink location="/opt/mux.mp4" camsrc. ! video/x-raw,format=NV12,width=1920,height=1080,framerate=30/1,interlace-mode=progressive,colorimetry=bt601 ! queue ! v4l2h264enc capture-io-mode=4 output-io-mode=5 ! queue ! h264parse config-interval=-1 ! queue ! qtirtspbin address= port=8554 camsrc. ! video/x-raw,format=NV12,width=1920,height=1080,framerate=30/1 ! waylandsink fullscreen=true
Copy to clipboard
**720P use case:**
gst-launch-1.0 -e qtiqmmfsrc name=camsrc video_0::type=preview ! video/x-raw,format=NV12_Q08C,width=1280,height=720,framerate=30/1,interlace-mode=progressive,colorimetry=bt601 ! queue ! v4l2h264enc capture-io-mode=4 output-io-mode=5 ! queue ! h264parse ! mp4mux ! queue ! filesink location="/opt/mux.mp4" camsrc. ! video/x-raw,format=NV12,width=1920,height=1080,framerate=30/1,interlace-mode=progressive,colorimetry=bt601 ! queue ! v4l2h264enc capture-io-mode=4 output-io-mode=5 ! queue ! h264parse config-interval=-1 ! queue ! qtirtspbin address= port=8554 camsrc. ! video/x-raw,format=NV12,width=1920,height=1080,framerate=30/1 ! waylandsink fullscreen=true
Copy to clipboard
To stop the use case, use **CTRL + C**.
Pull recorded content from the target device and play content on host computer.
In the terminal of the host computer, run the following command:
scp -r root@[DEVICE IP-ADDR]:/opt/mux.mp4 user1@[HOST IP-ADDR]:/workspace/
Copy to clipboard
You can play the MP4 file on any media player. The streamed video is played as an RTSP stream on a host. The third stream from the camera is displayed.
The following figure shows the flow of the pipeline execution:
**Figure : Pipeline for encoding three 1080p camera streams**
### Related information
[RTSP stream on host computer](https://docs.qualcomm.com/doc/80-80021-50/topic/camera-and-video-encode.html#section-ayq-2nh-pyb)
## Three stream–4K JPEG snapshot, 1080p AVC MP4, 1080p YUV from live source
The use case uses three streams from the camera. The first stream is a 4k stream for JPEG snapshot. The second stream, a 1080p stream, is encoded as H.264 and then multiplexed. The third 1080p stream is displayed.
Note
Snapshot capture isn't supported because the gst-pipeline-app isn't available in the QLI 2.0 RC2 release.
Note
For Dragonwing IQ-9075 and Dragonwing IQ-8275, JPEG video encoding is currently not supported.
Run the use case on the target device:
gst-pipeline-app -e qtiqmmfsrc name=camsrc video_0::type=preview ! video/x-raw,format=NV12_Q08C,width=1920,height=1080,framerate=30/1,interlace-mode=progressive,colorimetry=bt601 ! queue ! v4l2h264enc capture-io-mode=4 output-io-mode=5 ! queue ! h264parse ! mp4mux ! queue ! filesink location="/opt/mux.mp4" camsrc.image_1 ! "image/jpeg,width=3840,height=2160,framerate=30/1" ! multifilesink location=/opt/frame%d.jpg sync=true async=false camsrc. ! video/x-raw,format=NV12_Q08C,width=1920,height=1080,framerate=30/1 ! waylandsink fullscreen=true
Copy to clipboard
A menu is displayed on the `cmd` line terminal.
1. Select **Playing** mode. The pipeline starts the streaming.
2. Select **Enter**.
3. Select the **Plugin** mode and select `camsrc`.
4. Select the **Capture image** option.
5. Select either **video** or **still capture**.
6. Enter the number of snapshots that you want to capture.
To stop the use case, select **Back** and then **Quit** the options from the menu.
You can play the MP4 file and snapshots on a media player. The stream from camera is displayed.
Pull recorded content out from the target device and play content on the host computer.
scp -r root@[DEVICE IP-ADDR]:/opt/mux.mp4 user1@[HOST IP-ADDR]:/workspace
Copy to clipboard
scp -r root@[DEVICE IP-ADDR]:/opt/frame*.jpg user1@[HOST IP-ADDR]:/workspace
Copy to clipboard
The following figure shows the flow of the pipeline execution:
**Figure : Pipeline for three camera streams–4k to JPEG snapshot, 1080p to encoding, 1080 to display**
## Two stream–1080p MJPEG encoder
The MJPEG encoder encodes and writes the captured video stream in an MJPEG format. Run the use cases for encoding, saving to file, and previewing on display.
Note
Snapshot capture isn't supported because the gst-pipeline-app isn't available in the QLI 2.0 RC2 release.
Note
For Dragonwing IQ-9075 and Dragonwing IQ-8275, the MJPEG video encoding is currently not supported.
Run the following use cases for this encoder on the target device. Before running the use cases, type *3* in the terminal to enter Playing state.
- H.264 encode and MJPEG dump to a file:
gst-pipeline-app -e qtiqmmfsrc name=camsrc video_0::type=preview ! video/x-raw,format=NV12_Q08C,width=1920,height=1080,framerate=30/1,interlace-mode=progressive,colorimetry=bt601 ! queue ! v4l2h264enc capture-io-mode=4 output-io-mode=5 ! queue ! h264parse ! mp4mux ! queue ! filesink location="/opt/mux.mp4" camsrc. ! "image/jpeg,width=3840,height=2160,framerate=30/1" ! queue ! avimux ! filesink location=/opt/4k_mjpeg.avi sync=true async=false
Copy to clipboard
The `mux.mp4` and `4k_mjpeg.avi` files are stored at `/opt/`.
- H.265 encode and MJPEG dump to a file:
gst-pipeline-app -e qtiqmmfsrc name=camsrc video_0::type=preview ! video/x-raw,format=NV12_Q08C,width=1920,height=1080,framerate=30/1,interlace-mode=progressive,colorimetry=bt601 ! queue ! v4l2h265enc capture-io-mode=4 output-io-mode=5 ! queue ! h265parse ! mp4mux ! queue ! filesink location="/opt/mux.mp4" camsrc. ! "image/jpeg,width=3840,height=2160,framerate=30/1" ! queue ! avimux ! filesink location=/opt/4k_mjpeg.avi sync=true async=false
Copy to clipboard
The `mux.mp4` and `4k_mjpeg.avi` files are stored at `/opt/`.
- Preview on display with MJPEG encoding in a file:
gst-pipeline-app -e qtiqmmfsrc name=camsrc video_0::type=preview ! video/x-raw,format=NV12_Q08C,width=1280,height=720,framerate=30/1,interlace-mode=progressive,colorimetry=bt601 ! queue ! waylandsink fullscreen=true camsrc.video_1 ! "image/jpeg,width=1280,height=720,framerate=30/1" ! queue ! avimux ! filesink location=/opt/mjpeg.avi sync=true async=false
Copy to clipboard
The video is previewed on a screen and the `mjpeg.avi` file is stored at `/opt/`.
- Preview on display with MJPEG and H.264 encoding in a file:
gst-pipeline-app -e qtiqmmfsrc name=camsrc video_0::type=preview ! video/x-raw,format=NV12_Q08C,width=1280,height=720,framerate=30/1,interlace-mode=progressive,colorimetry=bt601 ! queue ! waylandsink fullscreen=true camsrc.video_1 ! "image/jpeg,width=1280,height=720,framerate=30/1" ! queue ! avimux ! filesink location=/opt/mjpeg_2.avi sync=true async=false camsrc.video_2 ! video/x-raw,format=NV12,width=1280,height=720,framerate=30/1,interlace-mode=progressive,colorimetry=bt601 ! queue ! v4l2h264enc capture-io-mode=4 output-io-mode=5 ! queue ! h264parse ! mp4mux ! queue ! filesink location="/opt/mux.mp4"
Copy to clipboard
The video is previewed on a screen and the `mux.mp4` and `mjpeg.avi` files are stored at `/opt/`.
## Slice-based encoding
With slice support for video encoding, the video stream is divided or sliced into several sections so that you can encode them in parallel.
You can use slice-based encoding for video playback, teleconferencing, and security camera use cases.
These use cases enable you to implement slice-based encoding on a camera stream. The output video file is stored at `/opt/`.
Run the following use cases on the target device:
### H.264
- 1280 × 720, maximum slices per frame = 10:
gst-launch-1.0 -e qtiqmmfsrc ! video/x-raw,format=NV12,width=1280,height=720,framerate=30/1,interlace-mode=progressive,colorimetry=bt601 ! queue ! v4l2h264enc capture-io-mode=4 output-io-mode=4 extra-controls="controls,h264_profile=4,h264_level=14,video_bitrate=4800000,video_bitrate_mode=1,frame_level_rate_control_enable=1,video_gop_size=299,h264_entropy_mode=1,slice_partitioning_method=1,numbe_of_mbs_in_a_slice=1200,video_peak_bitrate=32000000;" ! filesink location="/opt/spincalender1280X760_1200_MB_720p_live1800.h264"
Copy to clipboard
- 1280 × 720, slices per frame = 8:
gst-launch-1.0 -ev videotestsrc is-live=true pattern=ball ! video/x-raw,format="NV12",width=1280,height=720,framerate=30/1,interlace-mode=progressive,colorimetry=bt601 ! queue ! v4l2h264enc capture-io-mode=4 output-io-mode=4 extra-controls="controls,h264_profile=4,h264_level=14,video_bitrate=4800000,video_bitrate_mode=1,frame_level_rate_control_enable=1,video_gop_size=299,h264_entropy_mode=1,slice_partitioning_method=1,number_of_mbs_in_a_slice=450,video_peak_bitrate=32000000;" ! filesink location="/opt/slice_8_MB_720p_live.h264"
Copy to clipboard
- 1920 × 1080, slices per frame =3:
gst-launch-1.0 -ev videotestsrc is-live=true pattern=ball ! video/x-raw,format="NV12",width=1920,height=1080,framerate=30/1,interlace-mode=progressive,colorimetry=bt601 ! queue ! v4l2h264enc capture-io-mode=4 output-io-mode=4 extra-controls="controls,h264_profile=4,h264_level=14,video_bitrate=4800000,video_bitrate_mode=1,frame_level_rate_control_enable=1,video_gop_size=299,h264_entropy_mode=1,slice_partitioning_method=1,number_of_mbs_in_a_slice=2700,video_peak_bitrate=32000000;" ! filesink location="/opt/slice_3_MB_1080p.h264"
Copy to clipboard
- 1280 × 720, Max Bytes mode:
gst-launch-1.0 -e qtiqmmfsrc ! video/x-raw,format=NV12,width=1280,height=720,framerate=30/1,interlace-mode=progressive,colorimetry=bt601 ! queue ! v4l2h264enc capture-io-mode=4 output-io-mode=5 extra-controls="controls,slice_partitioning_method=2;" ! filesink location="/opt/encoded.h264"
Copy to clipboard
### H.265
- 1280 × 720, maximum slices per frame = 10:
gst-launch-1.0 -e qtiqmmfsrc ! video/x-raw,format=NV12,width=1280,height=720,framerate=30/1,interlace-mode=progressive,colorimetry=bt601 ! queue ! v4l2h265enc capture-io-mode=4 output-io-mode=5 extra-controls="controls,slice_partitioning_method=1;" ! filesink location="/opt/encoded.h265"
Copy to clipboard
- 1280 × 720, slices per frame = 8:
gst-launch-1.0 -ev videotestsrc is-live=true pattern=ball ! video/x-raw,format="NV12",width=1280,height=720,framerate=30/1,interlace-mode=progressive,colorimetry=bt601 ! queue ! v4l2h265enc capture-io-mode=4 output-io-mode=4 extra-controls="controls,h265_profile=4,h265_level=14,video_bitrate=4800000,video_bitrate_mode=1,frame_level_rate_control_enable=1,video_gop_size=299,h265_entropy_mode=1,slice_partitioning_method=1,number_of_mbs_in_a_slice=450,video_peak_bitrate=32000000;" ! filesink location="/opt/slice_8_MB_720p_live.h265"
Copy to clipboard
- 1920 × 1080, slices per frame = 3:
gst-launch-1.0 -ev videotestsrc is-live=true pattern=ball ! video/x-raw,format="NV12",width=1920,height=1080,framerate=30/1,interlace-mode=progressive,colorimetry=bt601 ! queue ! v4l2h265enc capture-io-mode=4 output-io-mode=4 extra-controls="controls,h265_profile=4,h265_level=14,video_bitrate=4800000,video_bitrate_mode=1,frame_level_rate_control_enable=1,video_gop_size=299,h265_entropy_mode=1,slice_partitioning_method=1,number_of_mbs_in_a_slice=2700,video_peak_bitrate=32000000;" ! filesink location="/opt/slice_3_MB_1080p.h265"
Copy to clipboard
- 1280 × 720, Max Bytes mode:
gst-launch-1.0 -ev videotestsrc is-live=true pattern=ball ! video/x-raw,format="NV12",width=1280,height=720,framerate=30/1,interlace-mode=progressive,colorimetry=bt601 ! queue ! v4l2h264enc capture-io-mode=4 output-io-mode=4 extra-controls="controls,h264_profile=4,h265_level=14,video_bitrate=4800000,video_bitrate_mode=1,frame_level_rate_control_enable=1,video_gop_size=299,h264_entropy_mode=1,slice_partitioning_method=1,numbe_of_mbs_in_a_slice=360,video_peak_bitrate=32000000;" ! filesink location="/opt/spincalender1280X760_1200_MB_720p_live.h265"
Copy to clipboard
## Intra-frame smart codec (H.264 and H.265)
Intra-frame (I frame) is a data compression technique that allows smaller file sizes and lower bitrates. Run the use cases for the 720p@30 HEVC streams with smart codec and noise reduction.
For these use cases, the output `video.mp4` file is stored at `/opt/`.
gst-launch-1.0 -ev filesrc location=/opt/Draw_1080p_180s_30FPS_modified.mp4 ! qtdemux ! queue ! h264parse ! v4l2h264dec capture-io-mode=4 output-io-mode=4 ! video/x-raw,format=NV12 ! tee name=split ! queue ! qtismartvencbin min-buffers=10 default-gop=30 max-gop=600 levels-override="LevelsOverride,fr_static=32,fr_low=4,fr_medium=2,fr_high=1;" encoder="v4l2h264enc" name=scb ! queue ! h264parse ! queue ! mp4mux ! queue ! filesink location=/opt/smart_enc_out.mp4 split. ! queue ! qtivtransform ! video/x-raw,format=NV12,width=640,height=480 ! queue ! scb.sink_ctrl
Copy to clipboard
Note
Intra-frame smart codec with camera as input isn't supported as qtismartvencbin doesn’t support NV12\_Q08C.
Run the following use cases on the target device:
### 720p@30 HEVC stream with smart bitrate, smart framerate, and smart GOP–noise reduction enabled
Note
The following use cases aren’t supported on the Ubuntu Server.
- H.264
gst-launch-1.0 -ev qtiqmmfsrc noise-reduction=2 video_0::extra-buffers=20 video_0::type=preview name=camsrc ! video/x-raw,format=NV12_Q08C,width=1280,height=720,framerate=30/1 ! queue ! scb.sink qtismartvencbin default-gop=30 max-gop=600 smart-framerate=false smart-gop=false encoder="v4l2h264enc" max-bitrate=4200000 name=scb ! queue ! h264parse ! queue ! mp4mux ! queue ! filesink location=/opt/video.mp4 camsrc. ! video/x-raw,format=NV12_Q08C,width=640,height=480,framerate=15/1 ! queue ! scb.sink_ctrl
Copy to clipboard
- H.265
gst-launch-1.0 -ev qtiqmmfsrc noise-reduction=2 video_0::extra-buffers=20 video_0::type=preview name=camsrc ! video/x-raw,format=NV12_Q08C,width=1280,height=720,framerate=30/1 ! queue ! scb.sink qtismartvencbin default-gop=30 max-gop=600 smart-framerate=false smart-gop=false encoder="v4l2h265enc" max-bitrate=4200000 name=scb ! queue ! h265parse ! queue ! mp4mux ! queue ! filesink location=/opt/video.mp4 camsrc. ! video/x-raw,format=NV12_Q08C,width=640,height=480,framerate=15/1 ! queue ! scb.sink_ctrl
Copy to clipboard
### 720p@30 HEVC stream with smart bitrate only–noise reduction enabled
- H.264
gst-launch-1.0 -ev qtiqmmfsrc noise-reduction=2 video_0::extra-buffers=20 video_0::type=preview name=camsrc ! video/x-raw,format=NV12_Q08C,width=1280,height=720,framerate=30/1 ! queue ! scb.sink qtismartvencbin default-gop=30 max-gop=600 smart-framerate=false smart-gop=false encoder="v4l2h264enc" max-bitrate=4200000 name=scb ! queue ! h264parse ! queue ! mp4mux ! queue ! filesink location=/opt/video.mp4 camsrc. ! video/x-raw,format=NV12_Q08C,width=640,height=480,framerate=15/1 ! queue ! scb.sink_ctrl
Copy to clipboard
- H.265
gst-launch-1.0 -ev qtiqmmfsrc noise-reduction=2 video_0::extra-buffers=20 video_0::type=preview name=camsrc ! video/x-raw,format=NV12_Q08C,width=1280,height=720,framerate=30/1 ! queue ! scb.sink qtismartvencbin default-gop=30 max-gop=600 smart-framerate=false smart-gop=false encoder="v4l2h265enc" max-bitrate=4200000 name=scb ! queue ! h265parse ! queue ! mp4mux ! queue ! filesink location=/opt/video.mp4 camsrc. ! video/x-raw,format=NV12_Q08C,width=640,height=480,framerate=15/1 ! queue ! scb.sink_ctrl
Copy to clipboard
### 720p@30 HEVC stream with smart bitrate, smart framerate, and smart GOP–noise reduction disabled
- H.264
gst-launch-1.0 -ev qtiqmmfsrc video_0::extra-buffers=20 video_0::type=preview name=camsrc ! video/x-raw,format=NV12_Q08C,width=1280,height=720,framerate=30/1 ! queue ! scb.sink qtismartvencbin default-gop=30 max-gop=600 encoder="v4l2h264enc" max-bitrate=4200000 name=scb ! queue ! h264parse ! queue ! mp4mux ! queue ! filesink location=/opt/video.mp4 camsrc. ! video/x-raw,format=NV12_Q08C,width=640,height=480,framerate=15/1 ! queue ! scb.sink_ctrl
Copy to clipboard
- H.265
gst-launch-1.0 -ev qtiqmmfsrc video_0::extra-buffers=20 video_0::type=preview name=camsrc ! video/x-raw,format=NV12_Q08C,width=1280,height=720,framerate=30/1 ! queue ! scb.sink qtismartvencbin default-gop=30 max-gop=600 encoder="v4l2h265enc" max-bitrate=4200000 name=scb ! queue ! h265parse ! queue ! mp4mux ! queue ! filesink location=/opt/video.mp4 camsrc. ! video/x-raw,format=NV12_Q08C,width=640,height=480,framerate=15/1 ! queue ! scb.sink_ctrl
Copy to clipboard
### 720p@30 HEVC streamed over TCP with smart bitrate, smart framerate, and smart GOP–noise reduction enabled
- H.264
gst-launch-1.0 -ev qtiqmmfsrc noise-reduction=2 video_0::extra-buffers=20 video_0::type=preview name=camsrc ! video/x-raw,format=NV12_Q08C,width=1280,height=720,framerate=30/1 ! queue ! scb.sink qtismartvencbin default-gop=30 max-gop=600 encoder="v4l2h264enc" max-bitrate=4200000 name=scb ! queue ! h264parse config-interval=1 ! mpegtsmux name=muxer ! queue ! tcpserversink port=8900 host= camsrc. ! video/x-raw,format=NV12_Q08C,width=640,height=480,framerate=15/1 ! queue ! scb.sink_ctrl
Copy to clipboard
- H.265
gst-launch-1.0 -ev qtiqmmfsrc noise-reduction=2 video_0::extra-buffers=20 video_0::type=preview name=camsrc ! video/x-raw,format=NV12_Q08C,width=1280,height=720,framerate=30/1 ! queue ! scb.sink qtismartvencbin default-gop=30 max-gop=600 encoder="v4l2h265enc" max-bitrate=4200000 name=scb ! queue ! h265parse config-interval=1 ! mpegtsmux name=muxer ! queue ! tcpserversink port=8900 host= camsrc. ! video/x-raw,format=NV12_Q08C,width=640,height=480,framerate=15/1 ! queue ! scb.sink_ctrl
Copy to clipboard
To play the stream over TCP, do the following on the Windows host:
1. Ensure that you complete the [Prerequisites](https://docs.qualcomm.com/doc/80-80021-50/topic/download-model-and-label-files.html) and obtain the model and label files available at `/etc/models` and `/etc/labels`.
2. Open the VLC media player.
3. Select **Media** > **Open Network Stream** or use **CTRL + N**).
4. Enter `tcp://:8900/live`.
5. Select **Play**.
### 720p@30 HEVC stream with smart bitrate, smart framerate, and smart GOP–noise reduction enabled
- H.264
gst-launch-1.0 -ev qtiqmmfsrc noise-reduction=2 video_0::extra-buffers=20 video_0::type=preview name=camsrc ! video/x-raw,format=NV12_Q08C,width=1280,height=720,framerate=30/1 ! queue ! scb.sink qtismartvencbin default-gop=30 max-gop=600 encoder="v4l2h264enc" max-bitrate=1000000 name=scb ! queue ! h264parse ! queue ! mp4mux ! queue ! filesink location=/opt/video.mp4 camsrc. ! video/x-raw,format=NV12_Q08C,width=640,height=480,framerate=15/1 ! queue ! tee name=split ! queue ! scb.sink_ctrl split. ! queue ! qtimlvconverter ! queue ! qtimltflite delegate=external external-delegate-path=libQnnTFLiteDelegate.so external-delegate-options="QNNExternalDelegate,backend_type=htp;" model= ! queue ! qtimlvdetection threshold=50.0 results=5 module=yolov8 labels= constants="YOLOv8,q-offsets=<-107.0, -128.0, 0.0>,q-scales=<3.093529462814331, 0.00390625, 1.0>;" ! text/x-raw ! queue ! scb.sink_ml
Copy to clipboard
- H.265
gst-launch-1.0 -ev qtiqmmfsrc noise-reduction=2 video_0::extra-buffers=20 video_0::type=preview name=camsrc ! video/x-raw,format=NV12_Q08C,width=1280,height=720,framerate=30/1 ! queue ! scb.sink qtismartvencbin default-gop=30 max-gop=600 encoder="v4l2h265enc" max-bitrate=1000000 name=scb ! queue ! h265parse ! queue ! mp4mux ! queue ! filesink location=/opt/video.mp4 camsrc. ! video/x-raw,format=NV12_Q08C,width=640,height=480,framerate=15/1 ! queue ! tee name=split ! queue ! scb.sink_ctrl split. ! queue ! qtimlvconverter ! queue ! qtimltflite delegate=external external-delegate-path=libQnnTFLiteDelegate.so external-delegate-options="QNNExternalDelegate,backend_type=htp;" model= ! queue ! qtimlvdetection threshold=50.0 results=5 module=yolov8 labels= constants="YOLOv8,q-offsets=<-107.0, -128.0, 0.0>,q-scales=<3.093529462814331, 0.00390625, 1.0>;" ! text/x-raw ! queue ! scb.sink_ml
Copy to clipboard
### Concurrent two 720p@30 HEVC streams with smart bitrate, smart framerate, and smart GOP–noise reduction enabled
- H.264
gst-launch-1.0 -ev qtiqmmfsrc noise-reduction=2 video_0::extra-buffers=20 video_0::type=preview video_1::extra-buffers=20 name=camsrc ! video/x-raw,format=NV12_Q08C,width=1280,height=720,framerate=30/1 ! queue ! scb1.sink qtismartvencbin default-gop=30 max-gop=600 encoder="v4l2h264enc" max-bitrate=4200000 name=scb1 ! queue ! h264parse ! queue ! mp4mux ! queue ! filesink location=/opt/video_scb1.mp4 camsrc. ! video/x-raw,format=NV12_Q08C,width=1280,height=720,framerate=30/1 ! queue ! scb2.sink qtismartvencbin default-gop=30 max-gop=600 encoder="v4l2h264enc" max-bitrate=4200000 name=scb2 ! queue ! h264parse ! queue ! mp4mux ! queue ! filesink location=/opt/video_scb2.mp4 camsrc. ! video/x-raw,format=NV12_Q08C,width=640,height=480,framerate=15/1 ! queue ! tee name=ctrl_t ! queue ! scb1.sink_ctrl ctrl_t. ! queue ! scb2.sink_ctrl
Copy to clipboard
- H.265
gst-launch-1.0 -ev qtiqmmfsrc noise-reduction=2 video_0::extra-buffers=20 video_0::type=preview video_1::extra-buffers=20 name=camsrc ! video/x-raw,format=NV12_Q08C,width=1280,height=720,framerate=30/1 ! queue ! scb1.sink qtismartvencbin default-gop=30 max-gop=600 encoder="v4l2h265enc" max-bitrate=4200000 name=scb1 ! queue ! h265parse ! queue ! mp4mux ! queue ! filesink location=/opt/video_scb1.mp4 camsrc. ! video/x-raw,format=NV12_Q08C,width=1280,height=720,framerate=30/1 ! queue ! scb2.sink qtismartvencbin default-gop=30 max-gop=600 encoder="v4l2h265enc" max-bitrate=4200000 name=scb2 ! queue ! h265parse ! queue ! mp4mux ! queue ! filesink location=/opt/video_scb2.mp4 camsrc. ! video/x-raw,format=NV12_Q08C,width=640,height=480,framerate=15/1 ! queue ! tee name=ctrl_t ! queue ! scb1.sink_ctrl ctrl_t. ! queue ! scb2.sink_ctrl
Copy to clipboard
## MJPEG video encode in CPU and GPU
For MJPEG encoding, if the hardware isn't available, support is required for CPU and GPU. The use cases include the capabilities to encode a 16-channel 1080p@2fps video.
Note
For Dragonwing IQ-9075 and Dragonwing IQ-8275, the MJPEG video encoding is currently not supported.
### Prerequisites
For MJPEG encoding, support for 1080p@2fps in CPU/GPU is required.
Run the following use cases on the target device.
### YUV file 1920 × 1080@30 → 16 × JPEG-ENC → AVI file
gst-launch-1.0 -e filesrc location=/opt/1920_1080.yuv ! videoparse width=1920 height=1080 format=nv12 framerate=2/1 ! jpegenc ! avimux ! filesink location=/opt/mjpeg1.avi &
gst-launch-1.0 -e filesrc location=/opt/1920_1080.yuv ! videoparse width=1920 height=1080 format=nv12 framerate=2/1 ! jpegenc ! avimux ! filesink location=/opt/mjpeg2.avi &
gst-launch-1.0 -e filesrc location=/opt/1920_1080.yuv ! videoparse width=1920 height=1080 format=nv12 framerate=2/1 ! jpegenc ! avimux ! filesink location=/opt/mjpeg3.avi &
gst-launch-1.0 -e filesrc location=/opt/1920_1080.yuv ! videoparse width=1920 height=1080 format=nv12 framerate=2/1 ! jpegenc ! avimux ! filesink location=/opt/mjpeg4.avi &
gst-launch-1.0 -e filesrc location=/opt/1920_1080.yuv ! videoparse width=1920 height=1080 format=nv12 framerate=2/1 ! jpegenc ! avimux ! filesink location=/opt/mjpeg5.avi &
gst-launch-1.0 -e filesrc location=/opt/1920_1080.yuv ! videoparse width=1920 height=1080 format=nv12 framerate=2/1 ! jpegenc ! avimux ! filesink location=/opt/mjpeg6.avi &
gst-launch-1.0 -e filesrc location=/opt/1920_1080.yuv ! videoparse width=1920 height=1080 format=nv12 framerate=2/1 ! jpegenc ! avimux ! filesink location=/opt/mjpeg7.avi &
gst-launch-1.0 -e filesrc location=/opt/1920_1080.yuv ! videoparse width=1920 height=1080 format=nv12 framerate=2/1 ! jpegenc ! avimux ! filesink location=/opt/mjpeg8.avi &
gst-launch-1.0 -e filesrc location=/opt/1920_1080.yuv ! videoparse width=1920 height=1080 format=nv12 framerate=2/1 ! jpegenc ! avimux ! filesink location=/opt/mjpeg9.avi &
gst-launch-1.0 -e filesrc location=/opt/1920_1080.yuv ! videoparse width=1920 height=1080 format=nv12 framerate=2/1 ! jpegenc ! avimux ! filesink location=/opt/mjpeg10.avi &
gst-launch-1.0 -e filesrc location=/opt/1920_1080.yuv ! videoparse width=1920 height=1080 format=nv12 framerate=2/1 ! jpegenc ! avimux ! filesink location=/opt/mjpeg11.avi &
gst-launch-1.0 -e filesrc location=/opt/1920_1080.yuv ! videoparse width=1920 height=1080 format=nv12 framerate=2/1 ! jpegenc ! avimux ! filesink location=/opt/mjpeg12.avi &
gst-launch-1.0 -e filesrc location=/opt/1920_1080.yuv ! videoparse width=1920 height=1080 format=nv12 framerate=2/1 ! jpegenc ! avimux ! filesink location=/opt/mjpeg13.avi &
gst-launch-1.0 -e filesrc location=/opt/1920_1080.yuv ! videoparse width=1920 height=1080 format=nv12 framerate=2/1 ! jpegenc ! avimux ! filesink location=/opt/mjpeg14.avi &
gst-launch-1.0 -e filesrc location=/opt/1920_1080.yuv ! videoparse width=1920 height=1080 format=nv12 framerate=2/1 ! jpegenc ! avimux ! filesink location=/opt/mjpeg15.avi &
gst-launch-1.0 -e filesrc location=/opt/1920_1080.yuv ! videoparse width=1920 height=1080 format=nv12 framerate=2/1 ! jpegenc ! avimux ! filesink location=/opt/mjpeg16.avi
Copy to clipboard
### YUV file 1920 × 1080@30 → 12 × JPEG-ENC → AVI file and 1920 × 1080@30 AVI → 12 × JPEG-DEC > JPEG
gst-launch-1.0 -e filesrc location=/opt/mjpeg.avi ! avidemux ! queue ! jpegdec ! multifilesink location=/opt/mjpeg1_%d.jpeg max-files=1 &
gst-launch-1.0 -e filesrc location=/opt/mjpeg.avi ! avidemux ! queue ! jpegdec ! multifilesink location=/opt/mjpeg2_%d.jpeg max-files=1 &
gst-launch-1.0 -e filesrc location=/opt/mjpeg.avi ! avidemux ! queue ! jpegdec ! multifilesink location=/opt/mjpeg3_%d.jpeg max-files=1 &
gst-launch-1.0 -e filesrc location=/opt/mjpeg.avi ! avidemux ! queue ! jpegdec ! multifilesink location=/opt/mjpeg4_%d.jpeg max-files=1 &
gst-launch-1.0 -e filesrc location=/opt/mjpeg.avi ! avidemux ! queue ! jpegdec ! multifilesink location=/opt/mjpeg5_%d.jpeg max-files=1 &
gst-launch-1.0 -e filesrc location=/opt/mjpeg.avi ! avidemux ! queue ! jpegdec ! multifilesink location=/opt/mjpeg6_%d.jpeg max-files=1 &
gst-launch-1.0 -e filesrc location=/opt/mjpeg.avi ! avidemux ! queue ! jpegdec ! multifilesink location=/opt/mjpeg7_%d.jpeg max-files=1 &
gst-launch-1.0 -e filesrc location=/opt/mjpeg.avi ! avidemux ! queue ! jpegdec ! multifilesink location=/opt/mjpeg8_%d.jpeg max-files=1 &
gst-launch-1.0 -e filesrc location=/opt/mjpeg.avi ! avidemux ! queue ! jpegdec ! multifilesink location=/opt/mjpeg9_%d.jpeg max-files=1 &
gst-launch-1.0 -e filesrc location=/opt/mjpeg.avi ! avidemux ! queue ! jpegdec ! multifilesink location=/opt/mjpeg10_%d.jpeg max-files=1 &
gst-launch-1.0 -e filesrc location=/opt/mjpeg.avi ! avidemux ! queue ! jpegdec ! multifilesink location=/opt/mjpeg11_%d.jpeg max-files=1 &
gst-launch-1.0 -e filesrc location=/opt/mjpeg.avi ! avidemux ! queue ! jpegdec ! multifilesink location=/opt/mjpeg12_%d.jpeg max-files=1 &
gst-launch-1.0 -e filesrc location=/opt/1920_1080.yuv ! videoparse width=1920 height=1080 format=nv12 framerate=2/1 ! jpegenc ! avimux ! filesink location=/opt/mjpeg1.avi &
gst-launch-1.0 -e filesrc location=/opt/1920_1080.yuv ! videoparse width=1920 height=1080 format=nv12 framerate=2/1 ! jpegenc ! avimux ! filesink location=/opt/mjpeg2.avi &
gst-launch-1.0 -e filesrc location=/opt/1920_1080.yuv ! videoparse width=1920 height=1080 format=nv12 framerate=2/1 ! jpegenc ! avimux ! filesink location=/opt/mjpeg3.avi &
gst-launch-1.0 -e filesrc location=/opt/1920_1080.yuv ! videoparse width=1920 height=1080 format=nv12 framerate=2/1 ! jpegenc ! avimux ! filesink location=/opt/mjpeg4.avi &
gst-launch-1.0 -e filesrc location=/opt/1920_1080.yuv ! videoparse width=1920 height=1080 format=nv12 framerate=2/1 ! jpegenc ! avimux ! filesink location=/opt/mjpeg5.avi &
gst-launch-1.0 -e filesrc location=/opt/1920_1080.yuv ! videoparse width=1920 height=1080 format=nv12 framerate=2/1 ! jpegenc ! avimux ! filesink location=/opt/mjpeg6.avi &
gst-launch-1.0 -e filesrc location=/opt/1920_1080.yuv ! videoparse width=1920 height=1080 format=nv12 framerate=2/1 ! jpegenc ! avimux ! filesink location=/opt/mjpeg7.avi &
gst-launch-1.0 -e filesrc location=/opt/1920_1080.yuv ! videoparse width=1920 height=1080 format=nv12 framerate=2/1 ! jpegenc ! avimux ! filesink location=/opt/mjpeg8.avi &
gst-launch-1.0 -e filesrc location=/opt/1920_1080.yuv ! videoparse width=1920 height=1080 format=nv12 framerate=2/1 ! jpegenc ! avimux ! filesink location=/opt/mjpeg9.avi &
gst-launch-1.0 -e filesrc location=/opt/1920_1080.yuv ! videoparse width=1920 height=1080 format=nv12 framerate=2/1 ! jpegenc ! avimux ! filesink location=/opt/mjpeg10.avi &
gst-launch-1.0 -e filesrc location=/opt/1920_1080.yuv ! videoparse width=1920 height=1080 format=nv12 framerate=2/1 ! jpegenc ! avimux ! filesink location=/opt/mjpeg11.avi &
gst-launch-1.0 -e filesrc location=/opt/1920_1080.yuv ! videoparse width=1920 height=1080 format=nv12 framerate=2/1 ! jpegenc ! avimux ! filesink location=/opt/mjpeg12.avi
Copy to clipboard
## Enable 24 end-to-end concurrent video sessions
Run the use cases for 24 parallel 1080p streams taken from files and sent to a display. Each stream is displayed at different positions on the screen.
Note
These use cases aren’t supported on QCS6490 and Dragonwing IQ-8275.
Run the following use cases on the target device.
### H.264–24 session decode
ulimit -n 4096 && gst-launch-1.0 -e qtivcomposer name=mix sink_0::position="<0, 0>" sink_0::dimensions="<240, 270>" \
sink_1::position="<240, 0>" sink_1::dimensions="<240, 270>" \
sink_2::position="<480, 0>" sink_2::dimensions="<240, 270>" \
sink_3::position="<720, 0>" sink_3::dimensions="<240, 270>" \
sink_4::position="<960, 0>" sink_4::dimensions="<240, 270>" \
sink_5::position="<1200, 0>" sink_5::dimensions="<240, 270>" \
sink_6::position="<1440, 0>" sink_6::dimensions="<240, 270>" \
sink_7::position="<1680, 0>" sink_7::dimensions="<240, 270>" \
sink_8::position="<0, 270>" sink_8::dimensions="<240, 270>" \
sink_9::position="<240, 270>" sink_9::dimensions="<240, 270>" \
sink_10::position="<480, 270>" sink_10::dimensions="<240, 270>" \
sink_11::position="<720, 270>" sink_11::dimensions="<240, 270>" \
sink_12::position="<960, 270>" sink_12::dimensions="<240, 270>" \
sink_13::position="<1200, 270>" sink_13::dimensions="<240, 270>" \
sink_14::position="<1440, 270>" sink_14::dimensions="<240, 270>" \
sink_15::position="<1680, 270>" sink_15::dimensions="<240, 270>" \
sink_16::position="<0, 540>" sink_16::dimensions="<240, 270>" \
sink_17::position="<240, 540>" sink_17::dimensions="<240, 270>" \
sink_18::position="<480, 540>" sink_18::dimensions="<240, 270>" \
sink_19::position="<720, 540>" sink_19::dimensions="<240, 270>" \
sink_20::position="<960, 540>" sink_20::dimensions="<240, 270>" \
sink_21::position="<1200, 540>" sink_21::dimensions="<240, 270>" \
sink_22::position="<1440, 540>" sink_22::dimensions="<240, 270>" \
sink_23::position="<1680, 540>" sink_23::dimensions="<240, 270>" \
mix. ! fpsdisplaysink text-overlay=true video-sink="waylandsink fullscreen=true" -v \
filesrc location=/opt/1920_1080_h264_30fps_1min.mp4 ! qtdemux ! h264parse ! v4l2h264dec capture-io-mode=4 output-io-mode=4 ! video/x-raw, format=NV12 ! mix. \
filesrc location=/opt/1920_1080_h264_30fps_1min.mp4 ! qtdemux ! h264parse ! v4l2h264dec capture-io-mode=4 output-io-mode=4 ! video/x-raw, format=NV12 ! mix. \
filesrc location=/opt/1920_1080_h264_30fps_1min.mp4 ! qtdemux ! h264parse ! v4l2h264dec capture-io-mode=4 output-io-mode=4 ! video/x-raw, format=NV12 ! mix. \
filesrc location=/opt/1920_1080_h264_30fps_1min.mp4 ! qtdemux ! h264parse ! v4l2h264dec capture-io-mode=4 output-io-mode=4 ! video/x-raw, format=NV12 ! mix. \
filesrc location=/opt/1920_1080_h264_30fps_1min.mp4 ! qtdemux ! h264parse ! v4l2h264dec capture-io-mode=4 output-io-mode=4 ! video/x-raw, format=NV12 ! mix. \
filesrc location=/opt/1920_1080_h264_30fps_1min.mp4 ! qtdemux ! h264parse ! v4l2h264dec capture-io-mode=4 output-io-mode=4 ! video/x-raw, format=NV12 ! mix. \
filesrc location=/opt/1920_1080_h264_30fps_1min.mp4 ! qtdemux ! h264parse ! v4l2h264dec capture-io-mode=4 output-io-mode=4 ! video/x-raw, format=NV12 ! mix. \
filesrc location=/opt/1920_1080_h264_30fps_1min.mp4 ! qtdemux ! h264parse ! v4l2h264dec capture-io-mode=4 output-io-mode=4 ! video/x-raw, format=NV12 ! mix. \
filesrc location=/opt/1920_1080_h264_30fps_1min.mp4 ! qtdemux ! h264parse ! v4l2h264dec capture-io-mode=4 output-io-mode=4 ! video/x-raw, format=NV12 ! mix. \
filesrc location=/opt/1920_1080_h264_30fps_1min.mp4 ! qtdemux ! h264parse ! v4l2h264dec capture-io-mode=4 output-io-mode=4 ! video/x-raw, format=NV12 ! mix. \
filesrc location=/opt/1920_1080_h264_30fps_1min.mp4 ! qtdemux ! h264parse ! v4l2h264dec capture-io-mode=4 output-io-mode=4 ! video/x-raw, format=NV12 ! mix. \
filesrc location=/opt/1920_1080_h264_30fps_1min.mp4 ! qtdemux ! h264parse ! v4l2h264dec capture-io-mode=4 output-io-mode=4 ! video/x-raw, format=NV12 ! mix. \
filesrc location=/opt/1920_1080_h264_30fps_1min.mp4 ! qtdemux ! h264parse ! v4l2h264dec capture-io-mode=4 output-io-mode=4 ! video/x-raw, format=NV12 ! mix. \
filesrc location=/opt/1920_1080_h264_30fps_1min.mp4 ! qtdemux ! h264parse ! v4l2h264dec capture-io-mode=4 output-io-mode=4 ! video/x-raw, format=NV12 ! mix. \
filesrc location=/opt/1920_1080_h264_30fps_1min.mp4 ! qtdemux ! h264parse ! v4l2h264dec capture-io-mode=4 output-io-mode=4 ! video/x-raw, format=NV12 ! mix. \
filesrc location=/opt/1920_1080_h264_30fps_1min.mp4 ! qtdemux ! h264parse ! v4l2h264dec capture-io-mode=4 output-io-mode=4 ! video/x-raw, format=NV12 ! mix. \
filesrc location=/opt/1920_1080_h264_30fps_1min.mp4 ! qtdemux ! h264parse ! v4l2h264dec capture-io-mode=4 output-io-mode=4 ! video/x-raw, format=NV12 ! mix. \
filesrc location=/opt/1920_1080_h264_30fps_1min.mp4 ! qtdemux ! h264parse ! v4l2h264dec capture-io-mode=4 output-io-mode=4 ! video/x-raw, format=NV12 ! mix. \
filesrc location=/opt/1920_1080_h264_30fps_1min.mp4 ! qtdemux ! h264parse ! v4l2h264dec capture-io-mode=4 output-io-mode=4 ! video/x-raw, format=NV12 ! mix. \
filesrc location=/opt/1920_1080_h264_30fps_1min.mp4 ! qtdemux ! h264parse ! v4l2h264dec capture-io-mode=4 output-io-mode=4 ! video/x-raw, format=NV12 ! mix. \
filesrc location=/opt/1920_1080_h264_30fps_1min.mp4 ! qtdemux ! h264parse ! v4l2h264dec capture-io-mode=4 output-io-mode=4 ! video/x-raw, format=NV12 ! mix. \
filesrc location=/opt/1920_1080_h264_30fps_1min.mp4 ! qtdemux ! h264parse ! v4l2h264dec capture-io-mode=4 output-io-mode=4 ! video/x-raw, format=NV12 ! mix. \
filesrc location=/opt/1920_1080_h264_30fps_1min.mp4 ! qtdemux ! h264parse ! v4l2h264dec capture-io-mode=4 output-io-mode=4 ! video/x-raw, format=NV12 ! mix. \
filesrc location=/opt/1920_1080_h264_30fps_1min.mp4 ! qtdemux ! h264parse ! v4l2h264dec capture-io-mode=4 output-io-mode=4 ! video/x-raw, format=NV12 ! mix.
Copy to clipboard
### H.265–24 session decode
ulimit -n 4096 && gst-launch-1.0 -e qtivcomposer name=mix sink_0::position="<0, 0>" sink_0::dimensions="<240, 270>" \
sink_1::position="<240, 0>" sink_1::dimensions="<240, 270>" \
sink_2::position="<480, 0>" sink_2::dimensions="<240, 270>" \
sink_3::position="<720, 0>" sink_3::dimensions="<240, 270>" \
sink_4::position="<960, 0>" sink_4::dimensions="<240, 270>" \
sink_5::position="<1200, 0>" sink_5::dimensions="<240, 270>" \
sink_6::position="<1440, 0>" sink_6::dimensions="<240, 270>" \
sink_7::position="<1680, 0>" sink_7::dimensions="<240, 270>" \
sink_8::position="<0, 270>" sink_8::dimensions="<240, 270>" \
sink_9::position="<240, 270>" sink_9::dimensions="<240, 270>" \
sink_10::position="<480, 270>" sink_10::dimensions="<240, 270>" \
sink_11::position="<720, 270>" sink_11::dimensions="<240, 270>" \
sink_12::position="<960, 270>" sink_12::dimensions="<240, 270>" \
sink_13::position="<1200, 270>" sink_13::dimensions="<240, 270>" \
sink_14::position="<1440, 270>" sink_14::dimensions="<240, 270>" \
sink_15::position="<1680, 270>" sink_15::dimensions="<240, 270>" \
sink_16::position="<0, 540>" sink_16::dimensions="<240, 270>" \
sink_17::position="<240, 540>" sink_17::dimensions="<240, 270>" \
sink_18::position="<480, 540>" sink_18::dimensions="<240, 270>" \
sink_19::position="<720, 540>" sink_19::dimensions="<240, 270>" \
sink_20::position="<960, 540>" sink_20::dimensions="<240, 270>" \
sink_21::position="<1200, 540>" sink_21::dimensions="<240, 270>" \
sink_22::position="<1440, 540>" sink_22::dimensions="<240, 270>" \
sink_23::position="<1680, 540>" sink_23::dimensions="<240, 270>" \
mix. ! fpsdisplaysink text-overlay=false video-sink="waylandsink fullscreen=true" -v \
filesrc location=/opt/FlyingBirdFlock_1920x1080_30fps_HEVC_7862Kbps_withAudio.mp4 ! qtdemux ! h265parse ! v4l2h265dec capture-io-mode=4 output-io-mode=4 ! video/x-raw, format=NV12 ! mix. \
filesrc location=/opt/FlyingBirdFlock_1920x1080_30fps_HEVC_7862Kbps_withAudio.mp4 ! qtdemux ! h265parse ! v4l2h265dec capture-io-mode=4 output-io-mode=4 ! video/x-raw, format=NV12 ! mix. \
filesrc location=/opt/FlyingBirdFlock_1920x1080_30fps_HEVC_7862Kbps_withAudio.mp4 ! qtdemux ! h265parse ! v4l2h265dec capture-io-mode=4 output-io-mode=4 ! video/x-raw, format=NV12 ! mix. \
filesrc location=/opt/FlyingBirdFlock_1920x1080_30fps_HEVC_7862Kbps_withAudio.mp4 ! qtdemux ! h265parse ! v4l2h265dec capture-io-mode=4 output-io-mode=4 ! video/x-raw, format=NV12 ! mix. \
filesrc location=/opt/FlyingBirdFlock_1920x1080_30fps_HEVC_7862Kbps_withAudio.mp4 ! qtdemux ! h265parse ! v4l2h265dec capture-io-mode=4 output-io-mode=4 ! video/x-raw, format=NV12 ! mix. \
filesrc location=/opt/FlyingBirdFlock_1920x1080_30fps_HEVC_7862Kbps_withAudio.mp4 ! qtdemux ! h265parse ! v4l2h265dec capture-io-mode=4 output-io-mode=4 ! video/x-raw, format=NV12 ! mix. \
filesrc location=/opt/FlyingBirdFlock_1920x1080_30fps_HEVC_7862Kbps_withAudio.mp4 ! qtdemux ! h265parse ! v4l2h265dec capture-io-mode=4 output-io-mode=4 ! video/x-raw, format=NV12 ! mix. \
filesrc location=/opt/FlyingBirdFlock_1920x1080_30fps_HEVC_7862Kbps_withAudio.mp4 ! qtdemux ! h265parse ! v4l2h265dec capture-io-mode=4 output-io-mode=4 ! video/x-raw, format=NV12 ! mix. \
filesrc location=/opt/FlyingBirdFlock_1920x1080_30fps_HEVC_7862Kbps_withAudio.mp4 ! qtdemux ! h265parse ! v4l2h265dec capture-io-mode=4 output-io-mode=4 ! video/x-raw, format=NV12 ! mix. \
filesrc location=/opt/FlyingBirdFlock_1920x1080_30fps_HEVC_7862Kbps_withAudio.mp4 ! qtdemux ! h265parse ! v4l2h265dec capture-io-mode=4 output-io-mode=4 ! video/x-raw, format=NV12 ! mix. \
filesrc location=/opt/FlyingBirdFlock_1920x1080_30fps_HEVC_7862Kbps_withAudio.mp4 ! qtdemux ! h265parse ! v4l2h265dec capture-io-mode=4 output-io-mode=4 ! video/x-raw, format=NV12 ! mix. \
filesrc location=/opt/FlyingBirdFlock_1920x1080_30fps_HEVC_7862Kbps_withAudio.mp4 ! qtdemux ! h265parse ! v4l2h265dec capture-io-mode=4 output-io-mode=4 ! video/x-raw, format=NV12 ! mix. \
filesrc location=/opt/FlyingBirdFlock_1920x1080_30fps_HEVC_7862Kbps_withAudio.mp4 ! qtdemux ! h265parse ! v4l2h265dec capture-io-mode=4 output-io-mode=4 ! video/x-raw, format=NV12 ! mix. \
filesrc location=/opt/FlyingBirdFlock_1920x1080_30fps_HEVC_7862Kbps_withAudio.mp4 ! qtdemux ! h265parse ! v4l2h265dec capture-io-mode=4 output-io-mode=4 ! video/x-raw, format=NV12 ! mix. \
filesrc location=/opt/FlyingBirdFlock_1920x1080_30fps_HEVC_7862Kbps_withAudio.mp4 ! qtdemux ! h265parse ! v4l2h265dec capture-io-mode=4 output-io-mode=4 ! video/x-raw, format=NV12 ! mix. \
filesrc location=/opt/FlyingBirdFlock_1920x1080_30fps_HEVC_7862Kbps_withAudio.mp4 ! qtdemux ! h265parse ! v4l2h265dec capture-io-mode=4 output-io-mode=4 ! video/x-raw, format=NV12 ! mix. \
filesrc location=/opt/FlyingBirdFlock_1920x1080_30fps_HEVC_7862Kbps_withAudio.mp4 ! qtdemux ! h265parse ! v4l2h265dec capture-io-mode=4 output-io-mode=4 ! video/x-raw, format=NV12 ! mix. \
filesrc location=/opt/FlyingBirdFlock_1920x1080_30fps_HEVC_7862Kbps_withAudio.mp4 ! qtdemux ! h265parse ! v4l2h265dec capture-io-mode=4 output-io-mode=4 ! video/x-raw, format=NV12 ! mix. \
filesrc location=/opt/FlyingBirdFlock_1920x1080_30fps_HEVC_7862Kbps_withAudio.mp4 ! qtdemux ! h265parse ! v4l2h265dec capture-io-mode=4 output-io-mode=4 ! video/x-raw, format=NV12 ! mix. \
filesrc location=/opt/FlyingBirdFlock_1920x1080_30fps_HEVC_7862Kbps_withAudio.mp4 ! qtdemux ! h265parse ! v4l2h265dec capture-io-mode=4 output-io-mode=4 ! video/x-raw, format=NV12 ! mix. \
filesrc location=/opt/FlyingBirdFlock_1920x1080_30fps_HEVC_7862Kbps_withAudio.mp4 ! qtdemux ! h265parse ! v4l2h265dec capture-io-mode=4 output-io-mode=4 ! video/x-raw, format=NV12 ! mix. \
filesrc location=/opt/FlyingBirdFlock_1920x1080_30fps_HEVC_7862Kbps_withAudio.mp4 ! qtdemux ! h265parse ! v4l2h265dec capture-io-mode=4 output-io-mode=4 ! video/x-raw, format=NV12 ! mix. \
filesrc location=/opt/FlyingBirdFlock_1920x1080_30fps_HEVC_7862Kbps_withAudio.mp4 ! qtdemux ! h265parse ! v4l2h265dec capture-io-mode=4 output-io-mode=4 ! video/x-raw, format=NV12 ! mix. \
filesrc location=/opt/FlyingBirdFlock_1920x1080_30fps_HEVC_7862Kbps_withAudio.mp4 ! qtdemux ! h265parse ! v4l2h265dec capture-io-mode=4 output-io-mode=4 ! video/x-raw, format=NV12 ! mix.
Copy to clipboard
### AV1–24 session decode
ulimit -n 4096 && gst-launch-1.0 -e qtivcomposer name=mix sink_0::position="<0, 0>" sink_0::dimensions="<240, 270>" \
sink_1::position="<240, 0>" sink_1::dimensions="<240, 270>" \
sink_2::position="<480, 0>" sink_2::dimensions="<240, 270>" \
sink_3::position="<720, 0>" sink_3::dimensions="<240, 270>" \
sink_4::position="<960, 0>" sink_4::dimensions="<240, 270>" \
sink_5::position="<1200, 0>" sink_5::dimensions="<240, 270>" \
sink_6::position="<1440, 0>" sink_6::dimensions="<240, 270>" \
sink_7::position="<1680, 0>" sink_7::dimensions="<240, 270>" \
sink_8::position="<0, 270>" sink_8::dimensions="<240, 270>" \
sink_9::position="<240, 270>" sink_9::dimensions="<240, 270>" \
sink_10::position="<480, 270>" sink_10::dimensions="<240, 270>" \
sink_11::position="<720, 270>" sink_11::dimensions="<240, 270>" \
sink_12::position="<960, 270>" sink_12::dimensions="<240, 270>" \
sink_13::position="<1200, 270>" sink_13::dimensions="<240, 270>" \
sink_14::position="<1440, 270>" sink_14::dimensions="<240, 270>" \
sink_15::position="<1680, 270>" sink_15::dimensions="<240, 270>" \
sink_16::position="<0, 540>" sink_16::dimensions="<240, 270>" \
sink_17::position="<240, 540>" sink_17::dimensions="<240, 270>" \
sink_18::position="<480, 540>" sink_18::dimensions="<240, 270>" \
sink_19::position="<720, 540>" sink_19::dimensions="<240, 270>" \
sink_20::position="<960, 540>" sink_20::dimensions="<240, 270>" \
sink_21::position="<1200, 540>" sink_21::dimensions="<240, 270>" \
sink_22::position="<1440, 540>" sink_22::dimensions="<240, 270>" \
sink_23::position="<1680, 540>" sink_23::dimensions="<240, 270>" \
mix. ! fpsdisplaysink text-overlay=false video-sink="waylandsink fullscreen=true" -v \
filesrc location=/opt/sjxbqm_1080p30fps_25_4882Kbps.mp4 ! qtdemux ! av1parse ! v4l2av1dec capture-io-mode=4 output-io-mode=4 ! mix. \
filesrc location=/opt/sjxbqm_1080p30fps_25_4882Kbps.mp4 ! qtdemux ! av1parse ! v4l2av1dec capture-io-mode=4 output-io-mode=4 ! mix. \
filesrc location=/opt/sjxbqm_1080p30fps_25_4882Kbps.mp4 ! qtdemux ! av1parse ! v4l2av1dec capture-io-mode=4 output-io-mode=4 ! mix. \
filesrc location=/opt/sjxbqm_1080p30fps_25_4882Kbps.mp4 ! qtdemux ! av1parse ! v4l2av1dec capture-io-mode=4 output-io-mode=4 ! mix. \
filesrc location=/opt/sjxbqm_1080p30fps_25_4882Kbps.mp4 ! qtdemux ! av1parse ! v4l2av1dec capture-io-mode=4 output-io-mode=4 ! mix. \
filesrc location=/opt/sjxbqm_1080p30fps_25_4882Kbps.mp4 ! qtdemux ! av1parse ! v4l2av1dec capture-io-mode=4 output-io-mode=4 ! mix. \
filesrc location=/opt/sjxbqm_1080p30fps_25_4882Kbps.mp4 ! qtdemux ! av1parse ! v4l2av1dec capture-io-mode=4 output-io-mode=4 ! mix. \
filesrc location=/opt/sjxbqm_1080p30fps_25_4882Kbps.mp4 ! qtdemux ! av1parse ! v4l2av1dec capture-io-mode=4 output-io-mode=4 ! mix. \
filesrc location=/opt/sjxbqm_1080p30fps_25_4882Kbps.mp4 ! qtdemux ! av1parse ! v4l2av1dec capture-io-mode=4 output-io-mode=4 ! mix. \
filesrc location=/opt/sjxbqm_1080p30fps_25_4882Kbps.mp4 ! qtdemux ! av1parse ! v4l2av1dec capture-io-mode=4 output-io-mode=4 ! mix. \
filesrc location=/opt/sjxbqm_1080p30fps_25_4882Kbps.mp4 ! qtdemux ! av1parse ! v4l2av1dec capture-io-mode=4 output-io-mode=4 ! mix. \
filesrc location=/opt/sjxbqm_1080p30fps_25_4882Kbps.mp4 ! qtdemux ! av1parse ! v4l2av1dec capture-io-mode=4 output-io-mode=4 ! mix. \
filesrc location=/opt/sjxbqm_1080p30fps_25_4882Kbps.mp4 ! qtdemux ! av1parse ! v4l2av1dec capture-io-mode=4 output-io-mode=4 ! mix. \
filesrc location=/opt/sjxbqm_1080p30fps_25_4882Kbps.mp4 ! qtdemux ! av1parse ! v4l2av1dec capture-io-mode=4 output-io-mode=4 ! mix. \
filesrc location=/opt/sjxbqm_1080p30fps_25_4882Kbps.mp4 ! qtdemux ! av1parse ! v4l2av1dec capture-io-mode=4 output-io-mode=4 ! mix. \
filesrc location=/opt/sjxbqm_1080p30fps_25_4882Kbps.mp4 ! qtdemux ! av1parse ! v4l2av1dec capture-io-mode=4 output-io-mode=4 ! mix. \
filesrc location=/opt/sjxbqm_1080p30fps_25_4882Kbps.mp4 ! qtdemux ! av1parse ! v4l2av1dec capture-io-mode=4 output-io-mode=4 ! mix. \
filesrc location=/opt/sjxbqm_1080p30fps_25_4882Kbps.mp4 ! qtdemux ! av1parse ! v4l2av1dec capture-io-mode=4 output-io-mode=4 ! mix. \
filesrc location=/opt/sjxbqm_1080p30fps_25_4882Kbps.mp4 ! qtdemux ! av1parse ! v4l2av1dec capture-io-mode=4 output-io-mode=4 ! mix. \
filesrc location=/opt/sjxbqm_1080p30fps_25_4882Kbps.mp4 ! qtdemux ! av1parse ! v4l2av1dec capture-io-mode=4 output-io-mode=4 ! mix. \
filesrc location=/opt/sjxbqm_1080p30fps_25_4882Kbps.mp4 ! qtdemux ! av1parse ! v4l2av1dec capture-io-mode=4 output-io-mode=4 ! mix. \
filesrc location=/opt/sjxbqm_1080p30fps_25_4882Kbps.mp4 ! qtdemux ! av1parse ! v4l2av1dec capture-io-mode=4 output-io-mode=4 ! mix. \
filesrc location=/opt/sjxbqm_1080p30fps_25_4882Kbps.mp4 ! qtdemux ! av1parse ! v4l2av1dec capture-io-mode=4 output-io-mode=4 ! mix. \
filesrc location=/opt/sjxbqm_1080p30fps_25_4882Kbps.mp4 ! qtdemux ! av1parse ! v4l2av1dec capture-io-mode=4 output-io-mode=4 ! mix.
Copy to clipboard
### H.264–12 sessions decode and encode
ulimit -n 4096 && gst-launch-1.0 -e filesrc location=/opt/1920_1080_h264_30fps_1min.mp4 ! qtdemux ! h264parse ! v4l2h264dec capture-io-mode=4 output-io-mode=4 ! v4l2h264enc capture-io-mode=4 output-io-mode=5 ! h264parse ! mp4mux ! filesink location=/opt/enc_1.mp4 \
filesrc location=/opt/1920_1080_h264_30fps_1min.mp4 ! qtdemux ! h264parse ! v4l2h264dec capture-io-mode=4 output-io-mode=4 ! v4l2h264enc capture-io-mode=4 output-io-mode=5 ! h264parse ! mp4mux ! filesink location=/opt/enc_2.mp4 \
filesrc location=/opt/1920_1080_h264_30fps_1min.mp4 ! qtdemux ! h264parse ! v4l2h264dec capture-io-mode=4 output-io-mode=4 ! v4l2h264enc capture-io-mode=4 output-io-mode=5 ! h264parse ! mp4mux ! filesink location=/opt/enc_3.mp4 \
filesrc location=/opt/1920_1080_h264_30fps_1min.mp4 ! qtdemux ! h264parse ! v4l2h264dec capture-io-mode=4 output-io-mode=4 ! v4l2h264enc capture-io-mode=4 output-io-mode=5 ! h264parse ! mp4mux ! filesink location=/opt/enc_4.mp4 \
filesrc location=/opt/1920_1080_h264_30fps_1min.mp4 ! qtdemux ! h264parse ! v4l2h264dec capture-io-mode=4 output-io-mode=4 ! v4l2h264enc capture-io-mode=4 output-io-mode=5 ! h264parse ! mp4mux ! filesink location=/opt/enc_5.mp4 \
filesrc location=/opt/1920_1080_h264_30fps_1min.mp4 ! qtdemux ! h264parse ! v4l2h264dec capture-io-mode=4 output-io-mode=4 ! v4l2h264enc capture-io-mode=4 output-io-mode=5 ! h264parse ! mp4mux ! filesink location=/opt/enc_6.mp4 \
filesrc location=/opt/1920_1080_h264_30fps_1min.mp4 ! qtdemux ! h264parse ! v4l2h264dec capture-io-mode=4 output-io-mode=4 ! v4l2h264enc capture-io-mode=4 output-io-mode=5 ! h264parse ! mp4mux ! filesink location=/opt/enc_7.mp4 \
filesrc location=/opt/1920_1080_h264_30fps_1min.mp4 ! qtdemux ! h264parse ! v4l2h264dec capture-io-mode=4 output-io-mode=4 ! v4l2h264enc capture-io-mode=4 output-io-mode=5 ! h264parse ! mp4mux ! filesink location=/opt/enc_8.mp4 \
filesrc location=/opt/1920_1080_h264_30fps_1min.mp4 ! qtdemux ! h264parse ! v4l2h264dec capture-io-mode=4 output-io-mode=4 ! v4l2h264enc capture-io-mode=4 output-io-mode=5 ! h264parse ! mp4mux ! filesink location=/opt/enc_9.mp4 \
filesrc location=/opt/1920_1080_h264_30fps_1min.mp4 ! qtdemux ! h264parse ! v4l2h264dec capture-io-mode=4 output-io-mode=4 ! v4l2h264enc capture-io-mode=4 output-io-mode=5 ! h264parse ! mp4mux ! filesink location=/opt/enc_10.mp4 \
filesrc location=/opt/1920_1080_h264_30fps_1min.mp4 ! qtdemux ! h264parse ! v4l2h264dec capture-io-mode=4 output-io-mode=4 ! v4l2h264enc capture-io-mode=4 output-io-mode=5 ! h264parse ! mp4mux ! filesink location=/opt/enc_11.mp4 \
filesrc location=/opt/1920_1080_h264_30fps_1min.mp4 ! qtdemux ! h264parse ! v4l2h264dec capture-io-mode=4 output-io-mode=4 ! v4l2h264enc capture-io-mode=4 output-io-mode=5 ! h264parse ! mp4mux ! filesink location=/opt/enc_12.mp4
Copy to clipboard
### H264–24 sessions encode
Note
Qualcomm Dragonwing^™^ RB3 Gen 2 supports up to 16 sessions encode.
gst-launch-1.0 -e filesrc blocksize=3133440 location=/tmp/dump_1080.yuv ! video/x-raw,format="NV12",width=1920,height=1080,framerate=30/1,interlace-mode=progressive,colorimetry=bt601 ! v4l2h264enc capture-io-mode=4 output-io-mode=4 ! filesink location=/opt/enc_0.h264 \
filesrc blocksize=3133440 location=/opt/dump_1080.yuv ! video/x-raw,format="NV12",width=1920,height=1080,framerate=30/1,interlace-mode=progressive,colorimetry=bt601 ! v4l2h264enc capture-io-mode=4 output-io-mode=4 ! filesink location=/opt/enc_1.h264 \
filesrc blocksize=3133440 location=/opt/dump_1080.yuv ! video/x-raw,format="NV12",width=1920,height=1080,framerate=30/1,interlace-mode=progressive,colorimetry=bt601 ! v4l2h264enc capture-io-mode=4 output-io-mode=4 ! filesink location=/opt/enc_2.h264 \
filesrc blocksize=3133440 location=/opt/dump_1080.yuv ! video/x-raw,format="NV12",width=1920,height=1080,framerate=30/1,interlace-mode=progressive,colorimetry=bt601 ! v4l2h264enc capture-io-mode=4 output-io-mode=4 ! filesink location=/opt/enc_3.h264 \
filesrc blocksize=3133440 location=/opt/dump_1080.yuv ! video/x-raw,format="NV12",width=1920,height=1080,framerate=30/1,interlace-mode=progressive,colorimetry=bt601 ! v4l2h264enc capture-io-mode=4 output-io-mode=4 ! filesink location=/opt/enc_4.h264 \
filesrc blocksize=3133440 location=/opt/dump_1080.yuv ! video/x-raw,format="NV12",width=1920,height=1080,framerate=30/1,interlace-mode=progressive,colorimetry=bt601 ! v4l2h264enc capture-io-mode=4 output-io-mode=4 ! filesink location=/opt/enc_5.h264 \
filesrc blocksize=3133440 location=/opt/dump_1080.yuv ! video/x-raw,format="NV12",width=1920,height=1080,framerate=30/1,interlace-mode=progressive,colorimetry=bt601 ! v4l2h264enc capture-io-mode=4 output-io-mode=4 ! filesink location=/opt/enc_6.h264 \
filesrc blocksize=3133440 location=/opt/dump_1080.yuv ! video/x-raw,format="NV12",width=1920,height=1080,framerate=30/1,interlace-mode=progressive,colorimetry=bt601 ! v4l2h264enc capture-io-mode=4 output-io-mode=4 ! filesink location=/opt/enc_7.h264 \
filesrc blocksize=3133440 location=/opt/dump_1080.yuv ! video/x-raw,format="NV12",width=1920,height=1080,framerate=30/1,interlace-mode=progressive,colorimetry=bt601 ! v4l2h264enc capture-io-mode=4 output-io-mode=4 ! filesink location=/opt/enc_8.h264 \
filesrc blocksize=3133440 location=/opt/dump_1080.yuv ! video/x-raw,format="NV12",width=1920,height=1080,framerate=30/1,interlace-mode=progressive,colorimetry=bt601 ! v4l2h264enc capture-io-mode=4 output-io-mode=4 ! filesink location=/opt/enc_9.h264 \
filesrc blocksize=3133440 location=/opt/dump_1080.yuv ! video/x-raw,format="NV12",width=1920,height=1080,framerate=30/1,interlace-mode=progressive,colorimetry=bt601 ! v4l2h264enc capture-io-mode=4 output-io-mode=4 ! filesink location=/opt/enc_10.h264 \
filesrc blocksize=3133440 location=/opt/dump_1080.yuv ! video/x-raw,format="NV12",width=1920,height=1080,framerate=30/1,interlace-mode=progressive,colorimetry=bt601 ! v4l2h264enc capture-io-mode=4 output-io-mode=4 ! filesink location=/opt/enc_11.h264 \
filesrc blocksize=3133440 location=/opt/dump_1080.yuv ! video/x-raw,format="NV12",width=1920,height=1080,framerate=30/1,interlace-mode=progressive,colorimetry=bt601 ! v4l2h264enc capture-io-mode=4 output-io-mode=4 ! filesink location=/opt/enc_12.h264 \
filesrc blocksize=3133440 location=/opt/dump_1080.yuv ! video/x-raw,format="NV12",width=1920,height=1080,framerate=30/1,interlace-mode=progressive,colorimetry=bt601 ! v4l2h264enc capture-io-mode=4 output-io-mode=4 ! filesink location=/opt/enc_13.h264 \
filesrc blocksize=3133440 location=/opt/dump_1080.yuv ! video/x-raw,format="NV12",width=1920,height=1080,framerate=30/1,interlace-mode=progressive,colorimetry=bt601 ! v4l2h264enc capture-io-mode=4 output-io-mode=4 ! filesink location=/opt/enc_14.h264 \
filesrc blocksize=3133440 location=/opt/dump_1080.yuv ! video/x-raw,format="NV12",width=1920,height=1080,framerate=30/1,interlace-mode=progressive,colorimetry=bt601 ! v4l2h264enc capture-io-mode=4 output-io-mode=4 ! filesink location=/opt/enc_15.h264 \
filesrc blocksize=3133440 location=/opt/dump_1080.yuv ! video/x-raw,format="NV12",width=1920,height=1080,framerate=30/1,interlace-mode=progressive,colorimetry=bt601 ! v4l2h264enc capture-io-mode=4 output-io-mode=4 ! filesink location=/opt/enc_16.h264 \
filesrc blocksize=3133440 location=/opt/dump_1080.yuv ! video/x-raw,format="NV12",width=1920,height=1080,framerate=30/1,interlace-mode=progressive,colorimetry=bt601 ! v4l2h264enc capture-io-mode=4 output-io-mode=4 ! filesink location=/opt/enc_17.h264 \
filesrc blocksize=3133440 location=/opt/dump_1080.yuv ! video/x-raw,format="NV12",width=1920,height=1080,framerate=30/1,interlace-mode=progressive,colorimetry=bt601 ! v4l2h264enc capture-io-mode=4 output-io-mode=4 ! filesink location=/opt/enc_18.h264 \
filesrc blocksize=3133440 location=/opt/dump_1080.yuv ! video/x-raw,format="NV12",width=1920,height=1080,framerate=30/1,interlace-mode=progressive,colorimetry=bt601 ! v4l2h264enc capture-io-mode=4 output-io-mode=4 ! filesink location=/opt/enc_19.h264 \
filesrc blocksize=3133440 location=/opt/dump_1080.yuv ! video/x-raw,format="NV12",width=1920,height=1080,framerate=30/1,interlace-mode=progressive,colorimetry=bt601 ! v4l2h264enc capture-io-mode=4 output-io-mode=4 ! filesink location=/opt/enc_20.h264 \
filesrc blocksize=3133440 location=/opt/dump_1080.yuv ! video/x-raw,format="NV12",width=1920,height=1080,framerate=30/1,interlace-mode=progressive,colorimetry=bt601 ! v4l2h264enc capture-io-mode=4 output-io-mode=4 ! filesink location=/opt/enc_21.h264 \
filesrc blocksize=3133440 location=/opt/dump_1080.yuv ! video/x-raw,format="NV12",width=1920,height=1080,framerate=30/1,interlace-mode=progressive,colorimetry=bt601 ! v4l2h264enc capture-io-mode=4 output-io-mode=4 ! filesink location=/opt/enc_22.h264 \
filesrc blocksize=3133440 location=/opt/dump_1080.yuv ! video/x-raw,format="NV12",width=1920,height=1080,framerate=30/1,interlace-mode=progressive,colorimetry=bt601 ! v4l2h264enc capture-io-mode=4 output-io-mode=4 ! filesink location=/opt/enc_23.h264
Copy to clipboard
Qualcomm Dragonwing^™^ RB3 Gen 2 supports up to 16 sessions encode:
ulimit -n 4096 && gst-launch-1.0 -e filesrc blocksize=460800 location=/opt/dump_640_480.yuv ! video/x-raw,format="NV12",width=640,height=480,framerate=30/1,interlace-mode=progressive,colorimetry=bt601 ! v4l2h264enc capture-io-mode=4 output-io-mode=4 ! filesink location=/opt/enc_0.h264 \
filesrc blocksize=460800 location=/opt/dump_640_480.yuv ! video/x-raw,format="NV12",width=640,height=480,framerate=30/1,interlace-mode=progressive,colorimetry=bt601 ! v4l2h264enc capture-io-mode=4 output-io-mode=4 ! filesink location=/opt/enc_1.h264 \
filesrc blocksize=460800 location=/opt/dump_640_480.yuv ! video/x-raw,format="NV12",width=640,height=480,framerate=30/1,interlace-mode=progressive,colorimetry=bt601 ! v4l2h264enc capture-io-mode=4 output-io-mode=4 ! filesink location=/opt/enc_2.h264 \
filesrc blocksize=460800 location=/opt/dump_640_480.yuv ! video/x-raw,format="NV12",width=640,height=480,framerate=30/1,interlace-mode=progressive,colorimetry=bt601 ! v4l2h264enc capture-io-mode=4 output-io-mode=4 ! filesink location=/opt/enc_3.h264 \
filesrc blocksize=460800 location=/opt/dump_640_480.yuv ! video/x-raw,format="NV12",width=640,height=480,framerate=30/1,interlace-mode=progressive,colorimetry=bt601 ! v4l2h264enc capture-io-mode=4 output-io-mode=4 ! filesink location=/opt/enc_4.h264 \
filesrc blocksize=460800 location=/opt/dump_640_480.yuv ! video/x-raw,format="NV12",width=640,height=480,framerate=30/1,interlace-mode=progressive,colorimetry=bt601 ! v4l2h264enc capture-io-mode=4 output-io-mode=4 ! filesink location=/opt/enc_5.h264 \
filesrc blocksize=460800 location=/opt/dump_640_480.yuv ! video/x-raw,format="NV12",width=640,height=480,framerate=30/1,interlace-mode=progressive,colorimetry=bt601 ! v4l2h264enc capture-io-mode=4 output-io-mode=4 ! filesink location=/opt/enc_6.h264 \
filesrc blocksize=460800 location=/opt/dump_640_480.yuv ! video/x-raw,format="NV12",width=640,height=480,framerate=30/1,interlace-mode=progressive,colorimetry=bt601 ! v4l2h264enc capture-io-mode=4 output-io-mode=4 ! filesink location=/opt/enc_7.h264 \
filesrc blocksize=460800 location=/opt/dump_640_480.yuv ! video/x-raw,format="NV12",width=640,height=480,framerate=30/1,interlace-mode=progressive,colorimetry=bt601 ! v4l2h264enc capture-io-mode=4 output-io-mode=4 ! filesink location=/opt/enc_8.h264 \
filesrc blocksize=460800 location=/opt/dump_640_480.yuv ! video/x-raw,format="NV12",width=640,height=480,framerate=30/1,interlace-mode=progressive,colorimetry=bt601 ! v4l2h264enc capture-io-mode=4 output-io-mode=4 ! filesink location=/opt/enc_9.h264 \
filesrc blocksize=460800 location=/opt/dump_640_480.yuv ! video/x-raw,format="NV12",width=640,height=480,framerate=30/1,interlace-mode=progressive,colorimetry=bt601 ! v4l2h264enc capture-io-mode=4 output-io-mode=4 ! filesink location=/opt/enc_10.h264 \
filesrc blocksize=460800 location=/opt/dump_640_480.yuv ! video/x-raw,format="NV12",width=640,height=480,framerate=30/1,interlace-mode=progressive,colorimetry=bt601 ! v4l2h264enc capture-io-mode=4 output-io-mode=4 ! filesink location=/opt/enc_11.h264 \
filesrc blocksize=460800 location=/opt/dump_640_480.yuv ! video/x-raw,format="NV12",width=640,height=480,framerate=30/1,interlace-mode=progressive,colorimetry=bt601 ! v4l2h264enc capture-io-mode=4 output-io-mode=4 ! filesink location=/opt/enc_12.h264 \
filesrc blocksize=460800 location=/opt/dump_640_480.yuv ! video/x-raw,format="NV12",width=640,height=480,framerate=30/1,interlace-mode=progressive,colorimetry=bt601 ! v4l2h264enc capture-io-mode=4 output-io-mode=4 ! filesink location=/opt/enc_13.h264 \
filesrc blocksize=460800 location=/opt/dump_640_480.yuv ! video/x-raw,format="NV12",width=640,height=480,framerate=30/1,interlace-mode=progressive,colorimetry=bt601 ! v4l2h264enc capture-io-mode=4 output-io-mode=4 ! filesink location=/opt/enc_14.h264 \
filesrc blocksize=460800 location=/opt/dump_640_480.yuv ! video/x-raw,format="NV12",width=640,height=480,framerate=30/1,interlace-mode=progressive,colorimetry=bt601 ! v4l2h264enc capture-io-mode=4 output-io-mode=4 ! filesink location=/opt/enc_15.h264
Copy to clipboard
## AV1 decoder and 4K VP9 decoder with 240 fps playback
Run the decoding use cases with the AV1 and VP9 decoders. These use cases are only applicable to Dragonwing IQ-9075.
Run the following use cases on the target device.
### AV1 use cases
- 3840 × 2160
gst-launch-1.0 -e filesrc location=/opt/SeaOtters_AV1_3840x2160_30_25.0Mbps_Main_no_audio_30.0.mp4 ! qtdemux ! av1parse ! v4l2av1dec capture-io-mode=4 output-io-mode=4 ! fpsdisplaysink video-sink="waylandsink fullscreen=true" -v
Copy to clipboard
- 1920 × 1080
gst-launch-1.0 -e filesrc location=/opt/CaribouHerd_AV1_1920x1080_30_39.38Mbps_Main_AAC_34.472.mp4 ! qtdemux ! av1parse ! v4l2av1dec capture-io-mode=4 output-io-mode=4 ! fpsdisplaysink video-sink="waylandsink fullscreen=true" -v
Copy to clipboard
- 1280 × 720
gst-launch-1.0 -e filesrc location=/opt/av1.mp4 ! qtdemux ! av1parse ! v4l2av1dec capture-io-mode=4 output-io-mode=4 ! fpsdisplaysink video-sink="waylandsink fullscreen=true" -v
Copy to clipboard
### VP9 use cases
3840 × 2160 with 240 fps
gst-launch-1.0 -e filesrc location=/opt/test_UHD_240FPS.ivf ! ivfparse ! queue ! v4l2vp9dec capture-io-mode=4 output-io-mode=4 ! video/x-raw,format=NV12 ! queue ! fpsdisplaysink text-overlay=false video-sink="fakesink" -v
Copy to clipboard
Last Published: Mar 26, 2026
[Previous Topic
Camera](https://docs.qualcomm.com/bundle/publicresource/80-80021-50/topics/camera.md) [Next Topic
Multi-camera/Multi-client use cases](https://docs.qualcomm.com/bundle/publicresource/80-80021-50/topics/multi-camera-multi-client-use-cases.md)