Camera test on Phosh
#1
You can find me on IRC, Discord and Twitter


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

https://wiki.st.com/stm32mpu/wiki/V4L2_camera_overview
  Reply
#3
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.
  Reply
#4
(05-03-2020, 03:41 PM)Luke Wrote:

Can you link the python app?
  Reply
#5
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/2...phone-pic/ appears to use the ov5640 driver.
  Reply
#6
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".
  Reply
#7
Yes, last I checked the driver is loaded, but it can't init the camera, not sure what the problem is yet
  Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Camera app down, megapixels up daniel 4 493 09-22-2020, 07:34 AM
Last Post: bcnaz
  Enabling nighlight in mobian phosh joz_mak 2 335 09-18-2020, 06:11 PM
Last Post: joz_mak
  debian+phosh running on PinePhone a-wai 548 96,355 09-03-2020, 08:27 AM
Last Post: thisishuey
  Camera support progress a-wai 73 11,634 08-18-2020, 02:46 PM
Last Post: bcnaz
  Xwayland on Phosh works? paju1986 1 360 08-03-2020, 08:06 AM
Last Post: wibble
  Camera use on Mobian/Brave Heart bcnaz 6 1,033 07-08-2020, 02:37 PM
Last Post: bcnaz

Forum Jump:


Users browsing this thread: 1 Guest(s)