[iMX8MPlus] How to mix two video sources into one with Gstreamer ?

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

[iMX8MPlus] How to mix two video sources into one with Gstreamer ?

跳至解决方案
12,932 次查看
khang_letruong
Senior Contributor III

Dear Community,

Gstreamer has the notion of Composition for outputting multiple video displays but I need to do the opposite way:  I would like to mix/combine two H264-encoded videos (from /dev/video0 and /dev/video1 for example) from iMX8M Plus. Is it possible with Gstreamer, please ?

Best regards,
Khang

 

0 项奖励
回复
1 解答
11,906 次查看
dianapredescu
NXP Employee
NXP Employee

Khang,

For 1.b. case: can you try the following command on your side and let me know if the performance is increased?

root@imx8mpevk:~# export DISPLAY=:0
root@imx8mpevk:~# gst-launch-1.0 -vvv imxcompositor_g2d name=comp \
sink_0::xpos=0 sink_0::ypos=0 sink_0::width=1440 sink_0::height=1080 \
sink_1::xpos=0 sink_1::ypos=1080 sink_1::width=1440 sink_1::height=1080 \
! queue ! video/x-raw, width=1440, height=2160 ! fpsdisplaysink video-sink="ximagesink" text-overlay=false sync=false \
v4l2src device=/dev/video2 ! video/x-raw, width=1440, height=1080, framerate=15/1 ! comp.sink_0 \
v4l2src device=/dev/video3 ! video/x-raw, width=1440, height=1080, framerate=15/1 ! comp.sink_1

On my side it looks better than previous pipeline. (I'm using 2 Basler cameras)

Best regards,

Diana

在原帖中查看解决方案

43 回复数
4,219 次查看
khang_letruong
Senior Contributor III

Hi @dianapredescu,

Thanks very much for your effort to reproduce the issue as well to test the gst commands in newer BSP.

I am looking forward to hearing from your findings.

Best Regards,
Khang

0 项奖励
回复
1,105 次查看
khang_letruong
Senior Contributor III

Dear @dianapredescu ,

You can test 1920x1080 which is popular. However I confirm that vpuenc_h264 works with 1440x1080 which is the resolution of my sensors and vpuenc_h264 element or the hardware accelerated H264 encoder is one of the main interests of iMX8MP.

Regards,
Khang