OV7251 not being recognized

1.Which seller did you purchase the product(s) from?
Amazon
2.The Model number of the product(s) you have purchased?
https://www.amazon.com/gp/product/B07V215NHN/ref=ppx_yo_dt_b_asin_title_o00_s00?ie=UTF8&psc=1
3.Which Platform are you using the product(s) on?
Raspberry Pi 3B+ Rev 1.3
4.Which instruction are you following?
https://unix.stackexchange.com/questions/3304/how-do-i-watch-my-webcams-feed-on-linux
5.Has your product ever worked properly?
No
6.What problems are you experiencing?
I’ve followed the instructions here - https://www.arducam.com/docs/cameras-for-raspberry-pi/migrated/ov7251-0-3mp-global-shutter-raspberrypi-camera/ -

This appears to work -

$ v4l2-ctl --stream-mmap --stream-count=-1 -d /dev/video0 --stream-to=/dev/null

<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 30.00 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 30.00 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 30.00 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 30.00 fps

But I can’t see video or images from /dev/video0 - tried using gst-launch, vlc, mplayer, cheese, and ffplay - they seem to recognize the camera but give various errors…

gst-launch:

$ gst-launch-1.0 v4l2src device=/dev/video0 ! xvimagesink
Setting pipeline to PAUSED …
ERROR: Pipeline doesn’t want to pause.
ERROR: from element /GstPipeline:pipeline0/GstXvImageSink:xvimagesink0: Could not initialise Xv output
Additional debug info:
xvimagesink.c(1773): gst_xv_image_sink_open (): /GstPipeline:pipeline0/GstXvImageSink:xvimagesink0:
No Xv Port available
Setting pipeline to NULL …
Freeing pipeline …

vlc:

$ vlc
VLC media player 3.0.11 Vetinari (revision 3.0.11-0-gdc0c5ced72)
[00374b40] main libvlc: Running vlc with the default interface. Use ‘cvlc’ to use vlc without interface.
libEGL warning: DRI2: failed to authenticate
[003d0b28] main playlist: playlist is empty
[59600cb8] main demux error: option v4l2-exposure does not exist
[59607050] main decoder error: buffer deadlock prevented
QObject::~QObject: Timers cannot be stopped from another thread

mplayer:

$ mplayer /dev/video0
MPlayer 1.3.0 (Debian), built with gcc-8 (C) 2000-2016 MPlayer Team
do_connect: could not connect to socket
connect: No such file or directory
Failed to open LIRC support. You will not be able to use your remote control.

Playing /dev/video0.
libavformat version 58.20.100 (external)
Cannot seek backward in linear streams!
Seek failed

cheese:

“There was an error playing video from webcam”

ffplay:

$ ffplay /dev/video0

[video4linux2,v4l2 @ 0x64a00720] Cannot find a proper format for codec ‘none’ (id 0), pixel format ‘none’ (id -1)
Assertion *codec_id != AV_CODEC_ID_NONE failed at src/libavdevice/v4l2.c:811
Aborted

 
7.What attempts at troubleshooting have you already made?

8.How would you like us to help you?
Does anyone recognize what the issue might be?

Oh, but yavta does seem to capture the video -

$ ./yavta /dev/video0
Device /dev/video0 opened.
Device unicam’ onplatform:3f801000.csi’ (driver ‘unicam’) is a video capture (without mplanes) device.
Video format: Y10P (50303159) 640x480 (stride 800) field none buffer size 384000
Current frame rate: 100/3000

11 (2) [-] none 11 384000 B 971.278313 971.288062 30.010 fps ts mono/EoF
12 (0) [-] none 12 384000 B 971.311651 971.321310 29.996 fps ts mono/EoF
13 (1) [-] none 13 384000 B 971.344981 971.354678 30.003 fps ts mono/EoF
14 (2) [-] none 14 384000 B 971.378297 971.388034 30.016 fps ts mono/EoF

Captured 1000 frames in 33.314939 seconds (30.016564 fps, 11526360.488117 B/s).
Total number of frames dropped 0
Releasing vcsm handle 73728
Closing dma_buf 8
Releasing vcsm handle 77824
Closing dma_buf 9
Releasing vcsm handle 81920
Closing dma_buf 10
3 buffers released.
Failed to find matching V4L2 buffer for mmal buffer 0x1804190

Then this works -

$ ffplay file.h264


What I’m trying to do is use the camera with VisionAppster - I haven’t been able to get a video feed from the camera into that, so was trying with the basic applications like vlc first.

 

 

To be clearer, is it possible to see the /dev/video0 output for the ov7251, other than through yavta recordings?

My understanding was that this camera uses the V4L2 driver (?) - does that not mean it works with standard video apps?

 

The closest I’ve been able to get to a video feed so far is with this -

$ ffplay -f rawvideo -pixel_format Y10 -video_size 640x480 /dev/video0

it shows mostly white with random black speckles.

 

Hello, Thanks for your business, Don’t worry and I will try my best to help you.

It is due to the format error. The VLC and ffplay does not supports decode RAW10 format.

The oV7251 or 9281 output with raw10 format. YOu can use yata or arducamstill tool to see image. They will convert the raw10 to YUV420 format.

https://github.com/ArduCAM/Arducam_OBISP_MIPI_Camera_Module/tree/master/arducamstill

Let me know if you need more help.

 

 

Oh I see - thanks, bin.

If anyone ever gets one of these working with Vision Appster please let me know.

In the meantime, I’ll keep working on an adaption of https://github.com/ArduCAM/MIPI_Camera/blob/master/RPI/qrcode_detection.cpp

 

You are welcome. Feel free to let me know if you need more help.

You are welcome. Feel free to let me know if you need more help.