imxv4l2src & videomixer

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

imxv4l2src & videomixer

1,799 Views
erikraynolds
Contributor III

Dears,

I'd like "mix" side by side 2 webcams.

I did try:

gst-launch-1.0 -e videomixer name=mix ! autovideosink \

videotestsrc ! video/x-raw, framerate=10/1, width=640, height=360 ! mix.sink_0 \

videotestsrc pattern="snow" ! video/x-raw, framerate=10/1, width=200, height=150 ! mix.sink_1

it works.

Now I want 2 (multiple cams) side by side or kind of grid for more than 2 cams.

I did try it and got:

root@imx6qpsabreauto:~# gst-launch-1.0 -e videomixer name=mix \

>     ! autovideosink \

>     imxv4l2src device=/dev/video0\

>             ! video/x-raw, framerate=10/1, width=640, height=360 \

>             ! mix.sink_0 \

>     imxv4l2src device=/dev/video1 \

>             ! video/x-raw, framerate=10/1, width=200, height=150 \

>             ! mix.sink_1

====== IMXV4L2SRC: 4.0.8 build on Jul 22 2016 21:34:28. ======

====== IMXV4L2SRC: 4.0.8 build on Jul 22 2016 21:34:28. ======

WARNING: erroneous pipeline: could not link imxv4l2src0 to mix

root@imx6qpsabreauto:~#

Can you please advice how to build such pipeline to have side by side multiple cams?

How to setup pipeline to overlay multiple cams (picture-in-picture)?

Thank you.

0 Kudos
2 Replies

1,078 Views
Yuri
NXP Employee
NXP Employee

Hello,

  The simplest way to get overlay under Linux - using overlaysink plugin, as described in
section  7.5 (Overlaysink usage) of “i.MX_Linux_User's_Guide.pdf” :

“The overlaysink plugin is based on the GPU. It provides two main functions for video rendering:

• Video Overlay: composites multiple video playbacks into the same display.

• Multiple Display: shows videos to multiple displays, up to four displays.”

Please refer to section 7.3.1.6.3 (Multiple videos overlay) for example.

http://www.nxp.com/webapp/Download?colCode=L4.1.15_1.1.0_LINUX_DOCS&Parent_nodeId=133769948107170617...

i.MX 6 Series Software and Development Tool|NXP

Have a great day,
Yuri

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

1,078 Views
erikraynolds
Contributor III

I did use example from documentation... 7.3.1.6.3 Multiple videos overlay

gst-launch-1.0 playbin uri=file:video0.mp4

    video-sink="overlaysink overlay-width=512 overlay-height=384"

    playbin uri=file:video1.mp4 flags=0x41

    video-sink="overlaysink overlay-left=512 overlay-width=512 overlay-height=384"

    playbin uri=file:video2.mp4 flags=0x41

    video-sink="overlaysink overlay-top=384 overlay-width=512 overlay-height=384"

    playbin uri=file:video3.mp4 flags=0x41

    video-sink="overlaysink overlay-left=512 overlay-top=384 overlay-width=512

    overlay-height=384"

    playbin uri=file:video0.mp4 flags=0x41

    video-sink="overlaysink overlay-left=352 overlay-top=264 overlay-width=320

    overlay-height=240 zorder=1"

and I'm getting this

root@imx6qpsabreauto:~/gst_overlay# ./gst_overlay

Setting pipeline to PAUSED ...

ERROR: Pipeline doesn't want to pause.

ERROR: from element /GstURIDecodeBin:uridecodebin0/GstGioSrc:source: Could not open resource for reading.

Additional debug info:

/mnt/work/Linux/fsl-release-3.14.52-1.1.0_ga/build-x11-full/tmp/work/cortexa9hf-vfp-neon-mx6qdl-poky-linux-gnueabi/gstreamer1.0-plugins-base/1.4.5-r0/gst-plugins-base-1.4.5/gst/gio/gstgiosrc.c(332): gst_gio_src_get_stream (): /GstPlayBin:playbin0/GstURIDecodeBin:uridecodebin0/GstGioSrc:source:

Could not open location file:video0.mp4 for reading: Operation not supported

Setting pipeline to NULL ...

Freeing pipeline ...

./gst_overlay: line 2: video-sink=overlaysink overlay-width=512 overlay-height=384: command not found

./gst_overlay: line 3: playbin: command not found

./gst_overlay: line 4: video-sink=overlaysink overlay-left=512 overlay-width=512 overlay-height=384: command not found

./gst_overlay: line 5: playbin: command not found

./gst_overlay: line 6: video-sink=overlaysink overlay-top=384 overlay-width=512 overlay-height=384: command not found

./gst_overlay: line 7: playbin: command not found

./gst_overlay: line 9: $'video-sink=overlaysink overlay-left=512 overlay-top=384 overlay-width=512 \r\n    overlay-height=384\r': command not found

./gst_overlay: line 10: playbin: command not found

./gst_overlay: line 12: $'video-sink=overlaysink overlay-left=352 overlay-top=264 overlay-width=320 \r\n    overlay-height=240 zorder=1\r': command not found

root@imx6qpsabreauto:~/gst_overlay#

what I'm doing wrong?

0 Kudos