How to USB video out on verdin imx8mm board?

How to output video on USB on verdin imx8mm board?

Is it possible or not? if yes then how?

Hi @vivek338,

We have not tested any such configuration neither we have any steps or article for same.
As per my understanding it should be possible to write usb client driver to make linux act as UVC compliant camera and can be connected to other USB host but don’t know how much effort that will involve.

May I know what is your usecase to further understand your requirement?

Best Regards
Ritesh Kumar

HI @ritesh.tx ,

Iam working on a project where we take input from one USB and video out on another USB,

I have done the first part and searching solution for the second part and I think if video in is possible then video out also, like USB webcam gadget.

The reason for going on USB video out is HDMI licensing issue, if u have solution for HDMI or any other video out then it will be helpful for me.

Please help !!!

Hi @vivek338,

Can you confirm if i get this right. You will be using Verdin as USB device, once it connect to USB host of other PC/system, this provide video stream captured from USB device connected to verdin?
If above if true then you will need to use UVC gadget driver in Linux and application in userspace which somehow map the video stream from USB camera to UVC gadget.
We don’t have exact steps for same but below post will atleast get you starting

Linux UVC Gadget Driver — The Linux Kernel documentation

Best Regards
Ritesh Kumar

HI @ritesh.tx ,

Thanks for your help and I succeed to create USB_WEBCAM_GADGET on my host PC but not able to stream video on host PC. I tested webcam working fine using GSTREAMER on VERDIN board. Camera is connected on USB hub and I use X34 USB type C connector for video out. Below is the screenshot of the error I got when I run Cheese or VLC player on my host PC.

Command use to stream:-
./uvc-gadget -v /dev/video3 -u /dev/video2 -r 1 -f 1

video3 is webcam is used and video2 is UVC

Before running camera software.

After running camera software like cheese or VLC.

Please help its being long time I am trying!!!

Hi @vivek338,

Thanks for sharing detail. Since we never tested such usecase, will you be able to share complete steps. We will test at our end and try to help you in between.

Best Regards
Ritesh Kumar

HI @ritesh.tx ,

Steps are as follow:-

  • Enable UVC-webcam gadget in kernel.
  • Build image is “tdx-reference-multimedia-image” and machine is “verdin-imx8mm”.
  • And follow the steps in the solution in below link.
  • https://community.nxp.com/t5/i-MX-Processors/UVC-webcam-gadget-on-i-MX8-HW/td-p/1371140
  • Connect USB-HP webcam on USB hub and connect USB-C port to my host pc for streaming on PC.
  • Also I did not patch dts file and app according to the above link, is that required? if yes then how to do?

Please help!!!

HI @ritesh.tx

Any update on this.

Hi @vivek338,

We tried partial steps what all mentioned from different document but unfortunately we are not able to get this working. I find similar post on Toradex community where customer able to get this working, please check and see if that helps.

Meanwhile we will still try to spend some more time and see if we get this working and update you accordingly.

Best Regards
Ritesh Kumar

Hi @ritesh.tx ,

Thanks for reply!

My issue has been resolved on NXP imx8m-mini development board. I have successfully able to stream usb-camera which is input of usb1 and out on usb2. But I didn’t try again with toradex verdin board but I think it is possible on toradex board also, I will try in future, but for now I am going with NXP board.

Thanks for your support!