Video from OV5640, bpi-m2 zero

Hello all, is the bpi camera able to capture video stream? With which image and which kernel? I have tried with several images from the wiki (raspbian/4.4, raspbian/3.4,ubuntu/5.3.5, Armbian/3.4). I am now at Ubuntu server 16.04 kernel 4.4.

With fswebcam I only get single frames, not video.

ffmpeg -f v4l2 -list_formats all -i /dev/video0 says: ‘ioctl(VIDIOC_ENUMINPUT): Invalid argument /dev/video0: Invalid argument’

Gstreamer is not working and I am uncertain whether it needs a patch for the capabilities(software) or it is the camera interface that is not fully supported as I read in the forum. For ‘gst-launch-1.0 v4l2src device=/dev/video0 ! video/x-raw,format=YUY2,width=1280,height=720 ! fakesink dump=1’ it returns: ‘Call to S_FMT failed for YUYV @ 1280x720: Operation not permitted’

If anyone has achieved video stream, at least let me know that it is possible. Thank you.

On armbian/3.4 you can use guvcview or mjpg streamer. If you have the ov5640 available in 4.4 I think it should work as well.

For kernel 5.x you need to make some settings (configure capture options) before you use the sensor in a v4l2 application (v4l2-ctl, ffmpeg, mjpg streamer).

This may help:

DTB (with ov5640 support)

Hello, thanks for the quick reply. I cannot yet take video from the camera, perhaps I am missing something obvious? mjpg_streamer in Ubuntu 4.4 always hangs in uninterrupted sleep, I cannot kill it. I didn’t get any capture file, with this command and variations:

mjpg_streamer -i "input_uvc.so -d /dev/video0 -f 15" -o "output_file.so -f /home/pi/kamera-test/"

Unable to set format: 1196444237 res: 640x480
	Init v4L2 failed !! exit fatal
	 i: init_VideoIn failed

I switched to Raspbian/3.4 I get the same error as above except mjpg_streamer doesn’t hang. I also have input_raspicam available:

       mjpg_streamer -i "input_raspicam.so -fps 15" -o "output_file.so -f /home/pi/kamera-test/"
     	i: Starting Camera
    	* failed to open vchiq instance

here is part of lsmod:

lsmod
   vfe_v4l2             1015939  0
   videobuf_dma_contig     4217  1 vfe_v4l2
   videobuf_core          16380  2 vfe_v4l2,videobuf_dma_contig
   ov5640                 42234  0
   vfe_subdev              4507  2 vfe_v4l2,ov5640
   cci                    22800  2 vfe_v4l2,ov5640
   vfe_os                  4277  3 cci,vfe_v4l2,vfe_subdev

edit: the user is in video group

Run htop, F4, mjp, select the mjpg_streamer from the list and F9 to KILL.

There are a lot of mjpg_streamer out there but this should work:

mjpg_streamer -i "input_uvc.so -d /dev/video0 -f 30 -y -r 640x480 -q 80" -o "output_file.so -f /home/pi/kamera-test/"