How to bind camera output to HTTP?

Viewed 19

问题描述


Is there any way to bind camera output to HTTP service for displaying stream on webpage? Just like WBC RTSP.

硬件板卡


CanMV-K230-LP4-V3.0

软件版本


CanMV_K230_V3P0_micropython_v1.4-0-g6cce59c_nncase_v2.9.0.img

1 Answers

Currently, the development board only supports outputting RTSP streams. If an HTTP stream needs to be output ultimately, a streaming media server is required.
With Nginx combined with relevant modules, the RTSP stream from the board can be converted into an HTTP stream (such as HLS format) that can be directly played on web pages, and finally displayed in a browser.
Implementation idea: Pull the RTSP stream → Convert to HLS → Push to Nginx, using a command similar to the following:
ffmpeg -i rtsp://your_board_IP/stream_address -c:v libx264 -f hls -hls_time 2 -hls_list_size 3 /nginx_web_directory/stream.m3u8