MPSOC VCU多路视频编解码(基于gstreamer)
MPSOC VCU多路视频编解码
2020.09.12
软件平台:
Vivado 2019.1
PetaLinux 2019.1
Ubuntu16.04.6真机
硬件平台:
ZCU106 (ZynqMP)
Example Gstreamer pipelines
A pipeline showing the 4 Hdmi inputs and outputs
v4l2-ctl -d /dev/video0 --set-fmt-video=width=960,height=540,pixelformat='NV12'
xmedia-ctl -d /dev/media8 -V "\"a0080000.v_proc_ss\":1 [fmt:VYYUYY8_1X24/960x540 field:none]"
v4l2-ctl -d /dev/video3 --set-fmt-video=width=960,height=540,pixelformat='NV12'
xmedia-ctl -d /dev/media0 -V "\"a02f0000.dummy\":0 [fmt:VYYUYY8_1X24/960x540 field:none]"
v4l2-ctl -d /dev/video4 --set-fmt-video=width=960,height=540,pixelformat='NV12'
xmedia-ctl -d /dev/media1 -V "\"a02f0100.dummy_2\":0 [fmt:VYYUYY8_1X24/960x540 field:none]"
v4l2-ctl -d /dev/video5 --set-fmt-video=width=960,height=540,pixelformat='NV12'
xmedia-ctl -d /dev/media2 -V "\"a02f0200.dummy_3\":0 [fmt:VYYUYY8_1X24/960x540 field:none]"
gst-launch-1.0 -v v4l2src device=/dev/video0 io-mode=4 ! video/x-raw, format=NV12, framerate=60/1, width=960, height=540 ! omxh265enc target-bitrate=15000 control-rate=2 prefetch-buffer=true gop-length=60 filler-data=true ! h265parse ! omxh265dec ! queue max-size-bytes=0 ! kmssink plane_id=31 render-rectangle="<0,0,960,540>" bus-id=a0070000.v_mix &
gst-launch-1.0 -v v4l2src device=/dev/video4 io-mode=4 ! video/x-raw, format=NV12, framerate=60/1, width=960, height=540 ! omxh265enc target-bitrate=15000 control-rate=2 prefetch-buffer=true gop-length=60 filler-data=true ! h265parse ! omxh265dec ! queue max-size-bytes=0 ! kmssink plane_id=32 render-rectangle="<960,0,960,540>" bus-id=a0070000.v_mix &
gst-launch-1.0 -v v4l2src device=/dev/video3 io-mode=4 ! video/x-raw, format=NV12, framerate=60/1, width=960, height=540 ! omxh265enc target-bitrate=15000 control-rate=2 prefetch-buffer=true gop-length=60 filler-data=true ! h265parse ! omxh265dec ! queue max-size-bytes=0 ! kmssink plane_id=33 render-rectangle="<960,540,960,540>" bus-id=a0070000.v_mix &
gst-launch-1.0 -v v4l2src device=/dev/video5 io-mode=4 ! video/x-raw, format=NV12, framerate=60/1, width=960, height=540 ! omxh265enc target-bitrate=15000 control-rate=2 prefetch-buffer=true gop-length=60 filler-data=true ! h265parse ! omxh265dec ! queue max-size-bytes=0 ! kmssink plane_id=34 render-rectangle="<0,540,960,540>" bus-id=a0070000.v_mix
Tips: Note: The format will vary based on the format that you are using. For example:
XV20 when using 4:2:2 10-bit
NV12 when using 4:2:0 8-bit