admin管理员组

文章数量:1356288

Summary:

I'm trying to build a dual camera setup for an FPV drone with small form factor devices.

For this, I purchased three devices:

  1. Luckfox Pico Mini B
  2. SC3336 CSI Camera Module (B)
  3. A generic USB Camera (for testing)

Luckfox Pico Mini B is running Buildroot image on SPI NAND Flash (128MB). Luckfox Pico Mini B and SC3336 camera module are compatible with each other on Buildroot but not via Ubuntu as mentioned here: due to which, I'm constrained to run my USB camera on Buildroot.

I'm able to get RTSP feed over ethernet for the SC3336.

I'm accessing board console over SSH on eth0 interface (192.168.144.93) and configured usb0 port as a host to run the USB camera.

Objective: To stream the USB Camera over RTSP in addition to SC3336 (that is already streaming). It doesn't matter whether the two RTSP feeds are over different ports or same (via a different URL).

What I've already done

  • I was able to run ethernet on Luckfox Pico Mini B.
  • I have been able to get the USB camera detected on the board. Running the command v4l2-ctl --list-devices I get this:
C[root@luckfox root]# v4l2-ctl --list-devices
rkisp-statistics (platform: rkisp):
        /dev/video21
        /dev/video22

rkcif-mipi-lvds (platform:rkcif):
        /dev/media1

rkcif (platform:rkcif-mipi-lvds):
        /dev/video2
        /dev/video3
        /dev/video4
        /dev/video5
        /dev/video6
        /dev/video7
        /dev/video8
        /dev/video9
        /dev/video10
        /dev/video11
        /dev/video12

rkisp_mainpath (platform:rkisp-vir0):
        /dev/video13
        /dev/video14
        /dev/video15
        /dev/video16
        /dev/video17
        /dev/video18
        /dev/video19
        /dev/video20
        /dev/media2

USB2.0 PC CAMERA: USB2.0 PC CAM (usb-xhci-hcd.0.auto-1):
        /dev/video0
        /dev/video1
        /dev/media0

I have been able to capture image frames and record a small video locally on Buildroot using ffmpeg but not able to further stream it on RTSP.

If I try to run ffmpeg in order to start another stream on port 8554, I loose the SSH access to the board:

ffmpeg -f v4l2 -i /dev/video0 -c:v libx264 -f rtsp rtsp://0.0.0.0:8554/usb

And then I have to re-login. I tried vlc as well but no luck. I have tried a lot of intricate command combinations for FFmpeg in order for this to work over days but still the same disconnection problem.

I then thought to integrate the USB camera to the already running RTSP server for the CSI camera since I was already able to capture the video frames as mentioned above. The already working RTSP links for the CSI camera are:

rtsp://192.168.144.93/live/0
rtsp://192.168.144.93/live/1

I thought that I'll do something like this for the USB camera:

rtsp://192.168.144.93/live/2
rtsp://192.168.144.93/live/3

However, the only thing that I'm able to figure out now is how to stop and start the RTSP server.

To Stop:
./RkLaunch-stop.sh
To start:
./rkipc

I further looked into these in the SDK but I'm not able to understand or figure out where to integrate the USB camera along with the CSI camera and therefore I need help with that.

Additionally I see the following scripts already loaded in the Buildroot path /oem/usr/bin/ but not sure how to use them. I tried running them but they RTSP stream doesn't work:

sample_demo_dual_camera
sample_demo_dual_camera_wrap
sample_demo_multi_camera_eptz

I can provide as much info as required in order to get help on this. Please let me know.

Looking for help with this project.

本文标签: video streamingNot able to stream USB camera over RTSP on Luckfox Pico Mini BStack Overflow