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

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

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

Jump to solution
12,936 Views
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 Kudos
Reply
1 Solution
11,910 Views
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

View solution in original post

43 Replies
4,221 Views
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 Kudos
Reply
1,107 Views
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