Use v4l2 camera with multiple processes

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

Use v4l2 camera with multiple processes

Jump to solution
4,612 Views
thomasquartier
Contributor II

Dear community,

I'm using an i.MX 6Dual running Linux build with Yocto.

Is there a good way to access a single v4l2 camera with multiple processes (mjpg_streamer, ...)? These processes only support the v4l2 interface.

I'm trying to use a combination of gstreamer to split the stream (tee element) with multiple v4l2 loopback devices, but no luck so far.

Are there any other strategies?

Thanks,

Thomas

Labels (3)
1 Solution
2,886 Views
thomasquartier
Contributor II

Hi Yuri,

Thank you for your response, I wasn't aware of the Linux Docs.

After installing the latest version of the gstreamer imx plugins [1], I'm able to use a tee in gstreamer and sink to multiple v4l2looback devices [2].

This is the gstreamer pipeline:

gst-launch-1.0 imxv4l2videosrc device=/dev/video0 \

     ! tee name=tp

     tp. \

          ! queue \

          ! v4l2sink device=/dev/video1

     tp. \

          ! queue \

          ! v4l2sink device=/dev/video2

[1] Freescale/gstreamer-imx · GitHub

[2] umlaeute/v4l2loopback · GitHub

Regards,

Thomas

View solution in original post

3 Replies
2,886 Views
Yuri
NXP Employee
NXP Employee

Hello,

  if You use one of recent FSL / NXP BSPs, please refer to section 7.3 (Multimedia use cases)

of "i.MX_Linux_User's_Guide.pdf".

http://www.freescale.com/webapp/Download?colCode=L3.14.38_6UL_LINUX_DOCS


Have a great day,
Yuri

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

2,887 Views
thomasquartier
Contributor II

Hi Yuri,

Thank you for your response, I wasn't aware of the Linux Docs.

After installing the latest version of the gstreamer imx plugins [1], I'm able to use a tee in gstreamer and sink to multiple v4l2looback devices [2].

This is the gstreamer pipeline:

gst-launch-1.0 imxv4l2videosrc device=/dev/video0 \

     ! tee name=tp

     tp. \

          ! queue \

          ! v4l2sink device=/dev/video1

     tp. \

          ! queue \

          ! v4l2sink device=/dev/video2

[1] Freescale/gstreamer-imx · GitHub

[2] umlaeute/v4l2loopback · GitHub

Regards,

Thomas

1,574 Views
dimitarmaznekov
Contributor II

How did you manage to install v4l2loopback drviers for IMX6 under Yocto ?

Do you have a recipe?

0 Kudos