2025-12-07 9:15 PM
Hello,
I am using the VENC_RTSP_Server example located i
STM32Cube\Repository\STM32Cube_FW_N6_V1.2.0\Projects\STM32N6570-DK\Applications\VENC
This example shows how to use the VENC block and stream H.264 video through RTP/RTSP using Ethernet.
I want to send the encoded H.264 video stream to another controller through SPI instead of RTP/RTSP.
My questions are:
1. What is the input data format of the H.264 encoder (VENC)?
Is it receiving YUV420/NV12 from DCMIPP, or some other format?
2. Is there an API in the VENC example that allows access to the encoded H.264 bitstream buffer
(pointer + size), before it is sent through the RTSP server?
3. Is there any example or documentation that shows how to use the H.264 encoder output without RTP/RTSP?
For example:
Camera → DCMIPP → VENC(H264) → SPI
I only need to sending the encoded H.264 data through SPI to another controller.
Thank you!
2025-12-31 8:24 PM
Hi @Grace_04 ,
I am hoping you came right and that the following is just auxiliary information for you.
1. The VENC input format can be adjusted in the `encoder_prepare()` function:
Options of input types:
This would be based on your camera output of course. For debugging perhaps extract the preprocessed frame memory and view to verify it matches the expected encoder format.
2. The easiest would be to capture the data similar to how its done in `app_rtsp_over_rtp.c`. After the VENC_APP_GetData() function, the data is available at this point. (Don't forget to include the H264 headers in your stream).
3. The VENC_SDCard example uses the `save_stream()` function to save the data to the SDCard. You could do something similar and send over SPI here instead.
I am assuming you already came right, and got the SPI streaming well. I am curious to know the device that you would be streaming to.