Hi @Hsu_Shawn,
I have edited the previous message and added the answer for [6.1].
[6.1] Error code
ret=0x98600800 indicates that video_open() failed at the driver layer. This return value corresponds to the ERR_ID_DRV_VIDEO_INVALID_CROP_SIZE error.
However, we are unable to share the mapping table at this time as it contains confidential information. If you encounter any similar errors in the future, feel free to let us know, and we will be happy to assist you in identifying the issue.
VOE_OPEN_CMD does more than just open a handle. It asks the VOE firmware side to set up and start the entire video stream, including the sensor, ISP, encoder, and stream buffers. If any part of that setup fails, VOE returns 0xff.
Some common reasons:
- Channel already open — the engine refuses to create a stream on a channel that’s already running.
- The codec, resolution, FPS, or stream format combination is not supported. For example, the requested H264/JPEG/YUV combination may not work with the selected sensor.
- Sensor/ISP not ready at open — The sensor may have failed to initialize, have an I2C/IQ/FCS problem, or already be used by another feature such as USB UVC.
- VOE engine not properly booted / firmware mismatch — The VOE engine may not have booted correctly.
- Not enough memory for the encoder/stream buffers in the VOE heap.
In the SDK’s default JPEG flow, JPEG is primarily intended for snapshot-type usage rather than continuous streaming. The JPEG path keeps a buffer roughly corresponding to one NV12 frame at the configured resolution. If the JPEG callback holds the buffer for too long—for example, while writing the image to storage—the JPEG buffer can become full.
The JPEG buffer-full condition can also be improved by:
- increasing the JPEG buffer size, or
- lowering the JPEG quality level (
qlevel) to reduce the encoded frame size.
If continuous MJPEG streaming is required, a queue-based mechanism similar to the H.264 path may be more appropriate. But for this particular JPEG streaming flow has not been extensively validated.
The maximum achievable frame rate would also ultimately be limited by the sensor’s supported FPS.
At this point, we do not have confirmation of an officially supported SDK mechanism that reserves an FHD-sized JPEG buffer at boot and guarantees that the same allocation is retained across runtime H.264/H.265/JPEG codec switches. The current SDK flow recalculates/reconfigures the required memory according to the active video parameters.
Let me look into it and get back to you.