How to implement ffmpeg command same time with ai_demo/face_detection?

Viewed 116

重现步骤

I want run ai_demo/face_detection and same time run ffmpeg cmd push stream to my rtsp server.
But, i get err: /dev/video1: Device or resource busy
期待结果和实际结果

What is solution for my issue?
软硬件版本信息

HW: 01studio canmv
FW: k230_linux_sdk

错误日志

尝试解决过程

补充材料

1 Answers

/dev/video1~3 are the three channels output by the camera. The AI uses /dev/video1 and /dev/video2. If you want to run the AI demo and rtsp stream simultaneously, the streaming needs to use /dev/video3.

ffmpeg -f v4l2 -input_format nv12 -r 30 -s 1920x1080 -i /dev/video3 -c:v h264_v4l2m2m -b:v 2M -vsync passthrough -f rtsp -rtsp_transport tcp rtsp://<your-rtsp-server-address>/*