PINE64
Camera test on Phosh - Printable Version

+- PINE64 (https://forum.pine64.org)
+-- Forum: PinePhone (https://forum.pine64.org/forumdisplay.php?fid=120)
+--- Forum: PinePhone Software (https://forum.pine64.org/forumdisplay.php?fid=121)
+---- Forum: Debian on PinePhone (https://forum.pine64.org/forumdisplay.php?fid=139)
+---- Thread: Camera test on Phosh (/showthread.php?tid=9784)



Camera test on Phosh - Luke - 05-03-2020




RE: Camera test on Phosh - nas - 05-04-2020

Are there any instructions? I tried the below guide but no luck capturing any images.

https://wiki.st.com/stm32mpu/wiki/V4L2_camera_overview


RE: Camera test on Phosh - nas - 05-06-2020

Played around with the commands in the previous link and everything seems to work - except outputting an image or video. Also, installed a modified ffmpeg but still no luck.

https://github.com/stulluk/FFmpeg-Cedrus

Appears the pmOS example is using python and opencv so the below tool might work. Unfortunately, it won't build for me - debphosh is on the bullseye release which has moved onto newer versions of required packages libopencv-dev and python-opencv.

https://github.com/avafinger/cap-v4l2

Tried downgrading but resulted in unmet dependency mess. Just posting the info in case it helps someone get it working.


RE: Camera test on Phosh - pizzalovingnerd - 05-22-2020

(05-03-2020, 03:41 PM)Luke Wrote:

Can you link the python app?


RE: Camera test on Phosh - edge - 05-23-2020

Any information on the driver used for camera access?

On Mobian, only /dev/video1 claims video capture capability via the sun6i driver and no controls are reported.


Code:
mobian@mobian:~$ v4l2-ctl --list-devices
cedrus (platform:cedrus):
/dev/video0
/dev/media0

sun6i-csi (platform:csi):
/dev/video1

mobian@mobian:~$ v4l2-ctl -d /dev/video0 -D
Driver Info:
Driver name      : cedrus
Card type        : cedrus
Bus info         : platform:cedrus
Driver version   : 5.6.0
Capabilities     : 0x84208000
Video Memory-to-Memory
Streaming
Extended Pix Format
Device Capabilities
Device Caps      : 0x04208000
Video Memory-to-Memory
Streaming
Extended Pix Format
Media Driver Info:
Driver name      : cedrus
Model            : cedrus
Serial           :
Bus info         : platform:cedrus
Media version    : 5.6.0
Hardware revision: 0x00000000 (0)
Driver version   : 5.6.0
Interface Info:
ID               : 0x0300000c
Type             : V4L Video
Entity Info:
ID               : 0x00000001 (1)
Name             : cedrus-source
Function         : V4L2 I/O
Pad 0x01000002   : 0: Source
 Link 0x02000008: to remote pad 0x1000004 of entity 'cedrus-proc': Data, Enabled, Immutable
mobian@mobian:~$ v4l2-ctl -d /dev/media0 -D
Unable to detect what device /dev/media0 is, exiting.
mobian@mobian:~$ v4l2-ctl -d /dev/video1 -D
Driver Info:
Driver name      : sun6i-video
Card type        : sun6i-csi
Bus info         : platform:csi
Driver version   : 5.6.0
Capabilities     : 0x84200001
Video Capture
Streaming
Extended Pix Format
Device Capabilities
Device Caps      : 0x04200001
Video Capture
Streaming
Extended Pix Format
mobian@mobian:~$ v4l2-ctl -L

Codec Controls

       mpeg_2_slice_parameters 0x009909fa (unknown): type=103 flags=has-payload
  mpeg_2_quantization_matrices 0x009909fb (unknown): type=104 flags=has-payload
   h264_sequence_parameter_set 0x00990ce8 (unknown): type=110 flags=has-payload
    h264_picture_parameter_set 0x00990ce9 (unknown): type=111 flags=has-payload
           h264_scaling_matrix 0x00990cea (unknown): type=112 flags=has-payload
         h264_slice_parameters 0x00990ceb (unknown): type=113 flags=has-payload
        h264_decode_parameters 0x00990cec (unknown): type=114 flags=has-payload
              h264_decode_mode 0x00990ced (menu)   : min=0 max=0 default=0 value=0
0: Slice-Based
               h264_start_code 0x00990cee (menu)   : min=0 max=0 default=0 value=0
0: No Start Code
   hevc_sequence_parameter_set 0x00990cf0 (unknown): type=120 flags=has-payload
    hevc_picture_parameter_set 0x00990cf1 (unknown): type=121 flags=has-payload
         hevc_slice_parameters 0x00990cf2 (unknown): type=122 flags=has-payload
              hevc_decode_mode 0x00990cf7 (menu)   : min=0 max=0 default=0 value=0
0: Slice-Based
               hevc_start_code 0x00990cf8 (menu)   : min=0 max=0 default=0 value=0
0: No Start Code
mobian@mobian:~$ v4l2-ctl --list-formats-ext
ioctl: VIDIOC_ENUM_FMT
Type: Video Capture

[0]: 'ST12' (Sunxi Tiled NV12 Format, compressed)
[1]: 'NV12' (Y/CbCr 4:2:0)


https://twongkee.wordpress.com/2020/03/28/pineapple-pinephone-pic/ appears to use the ov5640 driver.


RE: Camera test on Phosh - edge - 05-25-2020

Poked around a bit more and there is a dmesg error for the ov5640 device for Mobian.

On pmOS, the camera "works" as a video device without autofocus. A video player is used for the viewfinder and can be used to "take photos".


RE: Camera test on Phosh - a-wai - 05-26-2020

Yes, last I checked the driver is loaded, but it can't init the camera, not sure what the problem is yet