AnsweredAssumed Answered

Converting MJPEG USB example from MJPEG to YUV2

Question asked by Tamir Michael on Apr 8, 2020
Latest reply on Apr 13, 2020 by Sabina Bruce


I have tried to convert the SDK example "evkmimxrt1064_dev_video_virtual_camera_bm" to use YUV2 instead of MJPEG. Basically I have changed the format and frame descriptors (see attachment), and provided a YUV2 image source instead of the MJPEG source provided with the example. In addition I changed the dimensions of the image to 640x512 and updated the bit rate, and no longer using the function "USB_DeviceVideoPrepareVideoData". Device enumerates correctly.

Problem is no video is streamed when connected my device to a windows 10 host (also Linux hosts don't work). I know this because the function "USB_DeviceVideoStreamIn" is never called (but "USB_DeviceVideoControlIn" is).



I tried to only change the descriptors in the example expecting the host to display noise (because of MJPEG data clockouted out as YUV2), but despite of "USB_DeviceVideoStreamIn" being called this time, I don't think the host receives anything at all.



Adding the UVC header, kernel module logging indicates data transfer but I don't see any image. Is there a NXP sample out there demonstrating how to stream data using YUV2?



Make sure you send the expected number of bytes to the host - then it works.


Can you help me figure this out? I have attached my configuration descriptor.

Thank you.