Streaming raw video over USB

Hello all,

I am trying to capture RAW PAL video input and stream it over USB.
It’s sort of an intelligent USB camera project.

Capturing PAL video works without problems.
I was wondering if you can guide me regarding streaming raw video over USB.

If possible it would be great to act as a camera that supports usb video class.
My platform is apalis imx6 and ixora

Best Regards
Rifo

Hi @rifo !

Could you please share the output (as text) of tdx-info on your module (Getting Device Information with Tdx-Info | Toradex Developer Center)?

Could you please share a block diagram of what you are trying to accomplish? It will help us to understand your use case.

Best regards,

Hello,

You can find the block diagram above.

Ixora gets raw data from PAL camera. This works fine.

I plan to stream this “raw” video data from Ixora to USB with gst-launch. I would be happy if you can guide me regarding this.

ps: I will post tdx-info output later on when I have access to the hardware again.

Best Regards
rifo

Hi rifo

To act as UVC camera, you need UVC USB gadget. If you have functioning /dev/video? of your capture device, then it should be quite easy to feed it to UVC gadget device. Hope this thread will help
Solved: UVC webcam gadget on i.MX8 HW - NXP Community

Edward

Thanks a lot.

I understand that UVC webcam gadget sends mjpeg encoded video stream.

I will check whether I can use mjpeg encoding in a lossless way.

Rifo

Unfortunately I did only bare metal UVC camera project in the past and didn’t try myself the same on Linux. UVC supports not only compressed stream- and frame based payloads, but as well uncompressed frame based payload (either packed 4:2:2 YUV format (YUY2) or 4:2:0 YUV format (NV12)).
uvc-gadget -f switch:

-f <format>    Select frame format
            0 = V4L2_PIX_FMT_YUYV
            1 = V4L2_PIX_FMT_MJPEG

Googling reveals that “V4L2_PIX_FMT_YUYV is known in the Windows environment as YUY2”. So this seems to be what you need for uncompressed video.

Thanks a lot Edward,

I think this will be fine with my case

Best Regards
rifo