2026-01-29 2:37 AM - last edited on 2026-01-29 9:10 AM by FBL
Hello ST Community,
I am working on STM32N6 with an IMX335 camera sensor, ThreadX + USBX, and trying to stream live camera video over USB Type-C (UVC) to an external screen / PC.
Current status:
- Camera + ISP + DCMIPP pipeline is working correctly
- Live video is already displayed on the STM32N6 board screen
- I want the same live video to be streamed via USB Video
Camera / ISP configuration:
- Sensor: IMX335
- Sensor output: RAW10
- ISP enabled and processing the RAW data
- Frame size currently: 800 × 480
- Pixel size in memory: 2 bytes per pixel
- DCMIPP is writing frames to memory using DMA
My main confusion is:
What is the exact output format from the ISP to memory?
Is it RAW, RGB, or YUV (YUY2 / NV12), and how do we confirm this from the HAL / ISP configuration?
USB UVC configuration
I am using USBX Device Video (UVC) generated from CubeMX.
CubeMX gives two main options for video streaming format:
UNCOMPRESSED
MJPEG
UNCOMPRESSED:
I understand this usually means YUY2 (YUV422) for UVC hosts.
MJPEG:
I tried enabling VENC JPEG in CubeMX to generate MJPEG support.
Main Issue (Blocking Problem)
When I select VENC JPEG (MJPEG) in CubeMX:
-No driver code is generated
-No VENC/JPEG related source files appear
- USB video class remains unchanged
-Tried on multiple CubeMX versions and multiple laptops
-Regenerating code does nothing
So effectively:
Selecting VENC JPEG has no effect on generated code
Questions
What is the correct ISP output format to use for USB UVC streaming on STM32N6?
RAW?
RGB565?
YUV422 (YUY2)?
For MJPEG over UVC:
Is the VENC JPEG supposed to automatically generate code?
Are there additional middleware, packs, or licenses required?
Is MJPEG encoding currently supported on STM32N6 + USBX?
If MJPEG is not supported yet:
Is UNCOMPRESSED YUY2 the recommended approach?
Are there any official ST examples for camera → ISP → USB UVC streaming?
Goal
Stream live camera video from STM32N6 to a PC / external screen via USB Type-C
Prefer MJPEG if supported, otherwise uncompressed YUY2
Understand the correct CubeMX + HAL + USBX configuration
Any clarification from ST engineers or users who have implemented UVC streaming on STM32N6 would be greatly appreciated.
Thank you!
2026-01-29 9:10 AM
Hi @Grace_04
Would you attach your IOC file?
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2026-01-29 9:21 PM - edited 2026-01-30 2:39 AM
Thank you for the response.
Please find the STM32CubeMX .ioc file attached as requested.
To clarify our requirement:
The camera live video is already working correctly and is displayed on the STM32N6 onboard screen using the IMX335 → ISP → DCMIPP pipeline. Our objective is to share the same live camera stream to an external display or PC via USB Type-C, using the USB Video Class (UVC).
In other words, we want to directly forward the processed camera frame buffer to the USB UVC device, so that when the STM32N6 board is connected to a laptop or external screen, the live video is visible on the host.
At this stage, we would like clarification on the following points:
- Can the ISP output be directly passed to the USB Video class in uncompressed format (e.g. YUV / YUY2), or
- Is compression (MJPEG) mandatory or strongly recommended for UVC streaming on STM32N6?
Regarding MJPEG / VENC:
We have enabled VENC JPEG in STM32CubeMX (as shown in the attached screenshot). However, after code generation:
- No VENC or JPEG-related driver/source files are generated
- The USB Video (UVC) code remains unchanged
- Regenerating code and trying different CubeMX versions does not change the result
So currently, enabling VENC JPEG in CubeMX has no visible effect on the generated code.
This raises the following questions:
- Is MJPEG over UVC currently supported on STM32N6 using CubeMX + USBX?
- Are there additional middleware, packs, or steps required to enable VENC JPEG integration?
- If MJPEG is not supported yet, is uncompressed UVC streaming the recommended approach?
This clarification will help us finalize the correct camera output format and USB configuration.
Thank you for your support.
2026-02-01 9:46 PM
Hi @FBL
We are following up on the query below, as we have not yet received a response.
As shared earlier, the STM32CubeMX .ioc file has already been attached. To restate our requirement briefly:
The live camera stream is already working correctly on the STM32N6 onboard display using the IMX335 → ISP → DCMIPP pipeline. Our goal is to forward this same live camera stream to an external PC or display over USB Type-C using USB Video Class (UVC), so that the video is visible on the host when the board is connected.
At this stage, we are mainly looking for clarification on:
- Whether the ISP output can be directly streamed over UVC in an uncompressed format (such as YUV/YUY2), or
- Whether MJPEG compression is mandatory or strongly recommended for UVC streaming on STM32N6.
Regarding MJPEG / VENC, although VENC JPEG is enabled in STM32CubeMX, no VENC or JPEG-related source files are generated, and the USB UVC code remains unchanged even after regenerating the project with different CubeMX versions.
Hence, we would appreciate clarification on:
- Current support for MJPEG over UVC on STM32N6 using CubeMX + USBX
- Any additional middleware, packs, or manual integration steps required for VENC JPEG
- The recommended approach if MJPEG support is not available yet
This information will help us finalize the camera output format and USB UVC configuration.
Thank you for your support, and we look forward to your guidance.
2026-02-03 10:48 PM - edited 2026-02-04 1:55 AM
Hello @FBL ,
Any update for query which i have posted? Let me know if need anything else from my end.
2026-02-05 5:17 AM
Hello @FBL ,
Any update for query which i have posted? Let me know if need anything else from my end.
2026-02-05 10:44 AM - edited 2026-02-05 11:03 AM
Hi @Grace_04
Indeed, MJPEG is recommended for high bandwidth. It compresses video frames into JPEG format, significantly reducing the amount of data to be transmitted over USB. It has limitations such as data loss and frame corruption during high bandwidth operations. YUY2 is considered valid solution as well especially when bandwidth is not constraint. Both are supported by the N6 hardware. You can refer to this example from CubeN6:
> To test other stream change number of included file "ux_device_video.c":
- stream1 FORMAT : MJPEG and Width = 320, Height = 236.
Also you can refer to this application VENC USB project as reference.
Moreover another applicative project can be useful :
About CubeMX issue, an internal ticket 226744 is submitted to dedicated team to check:
static void MX_VENC_Init(void)
{
/* USER CODE BEGIN VENC_Init 0 */
/* USER CODE END VENC_Init 0 */
/* USER CODE BEGIN VENC_Init 1 */
/* USER CODE END VENC_Init 1 */
/* USER CODE BEGIN VENC_Init 2 */
/* USER CODE END VENC_Init 2 */
}
MX_VENC_Init seems empty !
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2026-02-09 9:34 PM
Hi @FBL ,
Thank you for the detailed explanation and the references. Regarding the CubeMX issue and the internal ticket 226744 raised for the empty MX_VENC_Init() function, could you please let us know the current status of this ticket?
Has the issue been analyzed or resolved, or is there any recommended workaround in the meantime? This information would help us proceed with the VENC integration.
Thanks for your support.
2026-02-16 9:59 PM
Hi @FBL ,
Thank you for the detailed explanation and the references. Regarding the CubeMX issue and the internal ticket 226744 raised for the empty MX_VENC_Init() function, could you please let us know the current status of this ticket?
Has the issue been analyzed or resolved, or is there any recommended workaround in the meantime? This information would help us proceed with the VENC integration.
Thanks for your support.
2026-02-17 9:39 AM
Hi @Grace_04
Unfortunately, VideoEncoder_EWL is not supported by STM32CubeMX, which is why these files are not generated. This should have been documented in CubeMX release note. As of now, you must manually copy the VideoEncoder middleware from the VENC reference examples into their project and integrate it.
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.