Xilinx ZYNQ UltraScale+ Video Encoding using GStreamer pipelines
Xilinx ZYNQ UltraScale+ MPSoC | ||||
---|---|---|---|---|
Introduction | ||||
Getting Started | ||||
Xilinx Kria | ||||
Development | ||||
Development Flows Examples | ||||
GStreamer | ||||
|
||||
Contact Us |
The following pipelines were tested using the smartcam firmware, which is based on the kv260_ispMipiRx_vcu_DP Vitis platform provided by Xilinx. This platform contains the following input pipeline:
AR1335 camera -> AP1302 ISP -> MIPI CSI-2 RX Subsystem -> Video Frame Buffer Write
Camera to disk
4K
H.264
gst-launch-1.0 -e mediasrcbin media-device=/dev/media0 v4l2src0::io-mode=4 ! video/x-raw, width=3840, height=2160, format=NV12, framerate=30/1 ! omxh264enc ! h264parse ! mp4mux ! filesink location=test.mp4
H.265
gst-launch-1.0 -e mediasrcbin media-device=/dev/media0 v4l2src0::io-mode=4 ! video/x-raw, width=3840, height=2160, format=NV12, framerate=30/1 ! omxh265enc ! h265parse ! mp4mux ! filesink location=test.mp4
1080p
H.264
gst-launch-1.0 -e mediasrcbin media-device=/dev/media0 v4l2src0::io-mode=4 ! video/x-raw, width=1920, height=1080, format=NV12, framerate=30/1 ! omxh264enc ! h264parse ! mp4mux ! filesink location=test.mp4
H.265
gst-launch-1.0 -e mediasrcbin media-device=/dev/media0 v4l2src0::io-mode=4 ! video/x-raw, width=1920, height=1080, format=NV12, framerate=30/1 ! omxh265enc ! h265parse ! mp4mux ! filesink location=test.mp4
Camera to network
We optimized these pipelines to show the low-latency capabilities of this device.
For the receiving pipeline please see the Video Decoding examples.
4K
H.264
gst-launch-1.0 -e mediasrcbin media-device=/dev/media0 v4l2src0::io-mode=4 ! video/x-raw, width=3840, height=2160, format=NV12, framerate=30/1 ! queue ! omxh264enc control-rate=low-latency target-bitrate=25000 prefetch-buffer=true num-slices=8 periodicity-idr=240 cpb-size=500 initial-delay=250 gdr-mode=horizontal gop-mode=low-delay-p ! video/x-h264, alignment=nal ! queue max-size-buffers=0 ! rtph264pay ! udpsink host=127.0.0.1 port=5000 buffer-size=60000000
H.265
gst-launch-1.0 -e mediasrcbin media-device=/dev/media0 v4l2src0::io-mode=4 ! video/x-raw, width=3840, height=2160, format=NV12, framerate=30/1 ! queue ! omxh265enc control-rate=low-latency target-bitrate=25000 prefetch-buffer=true num-slices=8 periodicity-idr=240 cpb-size=500 initial-delay=250 gdr-mode=horizontal gop-mode=low-delay-p ! video/x-h265, alignment=nal ! queue max-size-buffers=0 ! rtph265pay ! udpsink host=127.0.0.1 port=5000 buffer-size=60000000
1080p
H.264
gst-launch-1.0 -e mediasrcbin media-device=/dev/media0 v4l2src0::io-mode=4 ! video/x-raw, width=1920, height=1080, format=NV12, framerate=30/1 ! queue ! omxh264enc control-rate=low-latency target-bitrate=6000 prefetch-buffer=true num-slices=8 periodicity-idr=240 cpb-size=500 initial-delay=250 gdr-mode=horizontal gop-mode=low-delay-p ! video/x-h264, alignment=nal ! queue max-size-buffers=0 ! rtph264pay ! udpsink host=127.0.0.1 port=5000
H.265
gst-launch-1.0 -e mediasrcbin media-device=/dev/media0 v4l2src0::io-mode=4 ! video/x-raw, width=1920, height=1080, format=NV12, framerate=30/1 ! omxh265enc control-rate=low-latency target-bitrate=6000 prefetch-buffer=true num-slices=8 periodicity-idr=240 cpb-size=500 initial-delay=250 gdr-mode=horizontal gop-mode=low-delay-p ! video/x-h265, alignment=nal ! queue max-size-buffers=0 ! rtph265pay ! udpsink host=127.0.0.1 port=5000