Skip to main content
Explorer II
September 27, 2025
Question

USB Camera Support in AI Demos on STM32MP257 (MP2x) – Limited to libcamera?

  • September 27, 2025
  • 1 reply
  • 312 views

 

Hello ST Team and Community,

I'm working with the STM32MP257F-DK board and exploring the provided AI demo examples. I noticed that most of the camera-related demos (especially those involving image inference or real-time processing) are designed around libcamera as the default source, as indicated in code snippets like:

parser.add_argument("--camera_src", default="LIBCAMERA", help="use V4L2SRC for MP1x and LIBCAMERA for MP2x")

While I understand that libcamera is appropriate for MIPI-CSI cameras (which MP2x supports), I'm currently using a USB UVC camera, which libcamera does not support.

From what I know, USB webcams work well with V4L2 but are ignored by libcamera due to its pipeline design.

My questions:

  1. Are there any official plans or guidance for supporting USB cameras on STM32MP2x using V4L2, especially in AI demos?

  2. Why is V4L2 support not more visible or included as an option in the MP2x examples, considering the popularity of USB webcams for quick prototyping?

  3. Would ST consider providing dual-path examples (libcamera and V4L2) for broader compatibility?

I believe many developers would benefit from having clearer USB camera support, especially when MIPI modules are not readily available.

Any advice, roadmap updates, or workarounds would be greatly appreciated.

Thanks in advance!

    This topic has been closed for replies.

    1 reply

    Technical Moderator
    September 29, 2025

    Hello @Duc ,
    You should still find V4L2 based demonstration example for MP1 series in X-LINUX-AI Expansion Package. As far as I know, AI team spread their examples a libcamera based dual pipe for MP2, and V4L2 based single pipe for MP1.

    Then, he who can do more can do less. UVC camera is just a simplified version of V4L2 based CSI examples. You do not have to configure the DCMIPP and so on, just to take back the video device created for your UVC camera. 

    Today, there is no plan to port all the applications for both MIPI-CSI and UVC cam, but you adapt it on your side based on the provided example.

    Kind regards,
    Erwan.

    DucAuthor
    Explorer II
    September 30, 2025

    Hi @Erwan SZYMANSKI,

    Yeah, I’m aware that I can use my board with V4L2. However, the main point I was trying to raise is that the demo provided doesn’t cover all aspects, which leaves customers like me feeling somewhat dissatisfied. Nevertheless, I appreciate your reply and thank you for that.

    Technical Moderator
    October 2, 2025

    @Duc ,
    Understood, thank you for your feedback. As one of the main feature used for AI is the dual DCMIPP pipes (1 HW pipe for display, 1HW pipe for NN), the AI team preferred to focus on this use CSI use case to take benefits from this MP2 specific feature.

    I will let them know your feedback on it.

    Kind regards,
    Erwan.