4

You know raspberry pi compute module has two CSI camera inputs. I can connect two camera and activate both of them. I have a project with raspberry pi that I need to preview from both camera simultaneously and seperately. picamera (python lib) has options only stereoscopic view in one window by two cameras. Is there any solution about it ?

SlySven
  • 3,631
  • 1
  • 20
  • 46
Memik
  • 136
  • 8

1 Answers1

1

I think you should be able to pull this off by creating separate device nodes for each camera using uv4l. There's a walkthrough here on linux-projects.org, which suggests that running the following commands should allow you to 'access them individually through /dev/video0 and /dev/video1 with any Video4Linux2-complaint application'. They've applied their own encoding settings to the nodes, but you should be able to tweak those to whatever you need.

uv4l --driver raspicam --auto-video_nr --encoding=h264 --width=1280 --height=768 --camera-number=0

uv4l --driver raspicam --auto-video_nr --encoding=mjpeg --width=640 --height=480 --camera-number=1 --server-option='--port=9000'
goobering
  • 10,750
  • 4
  • 40
  • 64