Skip to main content
Graduate
September 19, 2025
Question

VENC_USB UVC Stream Not Showing in Windows Camera or VLC (STM32N6570-DK)

  • September 19, 2025
  • 1 reply
  • 286 views

Hello,

I am using the VENC_USB example from the STM32N6570-DK repository.
The example enumerates correctly as a UVC device — I can see the device in Windows Device Manager without any issues.

The descriptors in the example are configured for H.264 format only.

When I run the demo, the stream is visible in ffplay (so the encoder and USB transfers seem to be working).

However, the video is not visible in Windows Camera or VLC. Both detect the device, but no image is shown.

My Questions:

1.Why is the image visible only in ffplay but not in Windows Camera or VLC?

2.What changes need to be made in the UVC descriptors or stream configuration to allow Windows Camera and VLC to properly display the H.264 encoded stream?

    This topic has been closed for replies.

    1 reply

    Technical Moderator
    September 19, 2025

    Hi @saikumar 

    I think raw H.264 NAL unit streaming is not directly supported by Windows Camera or VLC . You can check Microsoft documentation.

    To achieve compatibility with Windows Camera and VLC, I recommend:

    • Implement UVC 1.5 compliance in  bcdUVC.
    • Use the MPEG-2 TS format descriptor for H.264 in USB descriptors.
      pVideoPayForDesc->bDescriptorSubType = 0x0E //(VS_FORMAT_MPEG2TS)
    • Update the format GUID for MPEG-2 TS is: 

      __ALIGN_BEGIN static uint8_t mpeg2ts_guid[16] __ALIGN_END = {
      0x26, 0x80, 0x6D, 0xE0, 0x46, 0xDB, 0xCF, 0x11,
      0xB4, 0xD1, 0x00, 0x80, 0x5F, 0x6C, 0xBB, 0xEA
      };
    • Packetize the H.264 stream as MPEG-2 TS packets, not raw NAL units.
    • Follow Microsoft’s UVC H.264 firmware guidelines and descriptor specifications.

    To use the MPEG-2 Transport Stream (TS) format descriptor for H.264 in your USB Video Class (UVC) descriptors, you need to modify your video streaming interface descriptors.

    pVideoPayForDesc->bDescriptorSubType = 0x0EU; // to be checked VS_FORMAT_MPEG2TS or UX_DEVICE_CLASS_VIDEO_VS_FORMAT_MJPEG
    pVideoPayForDesc->bFormatIndex = 0x01U;
    pVideoPayForDesc->bNumFrameDescriptors = 0x01U;
    pVideoPayForDesc->bDefaultFrameIndex = 0x01U;
    //pVideoPayForDesc->bBitsPerPixel = 0x00U; // NA for MPEG-2 TS
    pVideoPayForDesc->bmFlags = 0x00U;
    pVideoPayForDesc->bDefaultFrameIndex = 0x01U;
    pVideoPayForDesc->bAspectRatioX = 0x00U;
    pVideoPayForDesc->bAspectRatioY = 0x00U;
    pVideoPayForDesc->bmInterlaceFlags = 0x00U;
    pVideoPayForDesc->bCopyProtect = 0x00U;
    pVideoPayForDesc->bVariableSize = 0x01U; // Variable packet size
    
    // MPEG-2 TS GUID
    ux_utility_memory_copy(pVideoPayForDesc->pGiudFormat, mpeg2ts_guid, 16);
    

     

    • Adjust Frame Descriptor for MPEG-2 TS, the frame descriptor is simpler because the stream is packetized transport stream packets, not raw frames. You can set the frame descriptor as follows:
    pVideoFrameDesc->bDescriptorSubType = 0x0EU; // VS_FRAME_MPEG2TS
    pVideoFrameDesc->bFrameIndex = 0x01U;
    pVideoFrameDesc->bmCapabilities = 0x00U; 
    pVideoFrameDesc->wWidth = UVC_FRAME_WIDTH;// Width to be checked
    pVideoFrameDesc->wHeight = UVC_FRAME_HEIGHT;// Height to be checked
    ..