Toradex Maivin setup problems

Hello @Reimonder,

I was able to reproduce the issue you faced.
The camera can sometimes fail to initialize and cause the following error:

ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Device ‘/dev/video0’ is not a capture device.

To workaround this issue, you can power-cycle the board.
If this does not solve the issue, it is possible the camera cable was partially disconnected, either in shipping or when entering recovery mode. The recommendation then would be to reconnect it, making sure the flat cable is fully seated before locking it in place.

To easily test the Au-Zone demo, you can run the following command:

docker run -it --rm --privileged --network host maivin/faceblur:latest

Please let me know if this works for you.

Best Regards,
Bruno

Hello @bruno.tx,

Do you face any issues when trying to use docker with these images?

Using the images from https://maivin.deepviewml.com/image_list.json the 6.X version seems to have no docker included. I´ve tried to pull images from the hub and the os could not find docker. The 5.X version is the same i am currently using and having the issues on.

Best regards.

To workaround this issue, you can power-cycle the board.
If this does not solve the issue, it is possible the camera cable was partially disconnected, either in shipping or when entering recovery mode. The recommendation then would be to reconnect it, making sure the flat cable is fully seated before locking it in place.

I re-seated the camera cable and power cycled the board several times but when starting the faceblur example i still get the error

/dev/video0 is not a video capture device

Camera itself is plugged in at the J3 connector as stated in the datasheet

The strange thin is, that the camera worked with the pre-installed os on the SOM but as soon as i installed the


i get the error with the dev/video0 is not a video capture device

I also tried using

sudo docker run -t -i --privileged -v --device=/dev/video0 --network host maivin/faceblur:latest

which gives me the errormessage

/dev/video0 is not a video capture device

Hello @Reimonder,

Thanks for the clarifications.

The strange thin is, that the camera worked with the pre-installed os on the SOM but as soon as i installed the

i get the error with the dev/video0 is not a video capture device

What I am thinking now is that your version of the Maivin may make the camera available on a different device.

Can you try the following?

  1. Start a container on the device:
docker run --privileged --rm -it torizon/debian:${CT_TAG_DEBIAN}
  1. Install v4l-utils on the container:
apt update && apt install v4l-utils -y
  1. List the video devices:
v4l2-ctl --list-devices

With that you should see in what device mxc-isi-cap is, that device should be the camera.

You can then exit the container and pass the device as an argument for the Au-Zone demo:

docker run -it --rm --privileged --network host maivin/faceblur:latest -d /dev/videoX

Best Regards,
Bruno

Hey @bruno.tx,
thank you for your quick response.

Can you try the following?

I started a debian container on the maivin and performed the commands you posted.
The output of the v412-ctl --list-devices is the following:

root@b2ddbba41a5c:/# v4l2-ctl --list-devices
mxc-isi-m2m (platform:32e00000.isi:m2m_devic):
/dev/video0

If i then try to start the faceblur container like this

docker run -it --rm --privileged --network host maivin/faceblur:latest -d /dev/video0

I still get the /dev/video0 is not a video capture device error

Here would be the detailed driver info

root@e67ce723d742:/# v4l2-ctl --all -d /dev/video0
Driver Info:
Driver name : mxc-isi-m2m
Card type : mxc-isi-m2m
Bus info : platform:32e00000.isi:m2m_devic
Driver version : 5.4.193
Capabilities : 0x84204000
Video Memory-to-Memory Multiplanar
Streaming
Extended Pix Format
Device Capabilities
Device Caps : 0x04204000
Video Memory-to-Memory Multiplanar
Streaming
Extended Pix Format
Priority: 2

There would be more here, but the device crashes after it has reached the Priority: 2 line

Hello @Reimonder,

From your output, it seems the sensor is not available.

Which sensor is on your Maivin device?
Is it the 5MP or the 8MP?

Best Regards,
Bruno

Hey @bruno.tx,

on my device, there is the Au-Zone MVN-2107 (R00B 010623) sensor. I don´t know which one it is specifically because my shopping department just ordered.

I measured the voltage on the camera board side on the ribbon connector and there are voltages between 0,7 and 3.3 volts.

Hello @Reimonder,

These codes should be useful.

I will contact Au-Zone to better understand the situation and send an update on this thread once there are further recommendations.

Best Regards,
Bruno

Hello @bruno.tx,

thank you very much. In the meantime i double check again.
Just got the order confirmation from Au-Zone from my shopping department and the sensor should be the OmniVision 8MP Sensor.

EDIT:
In the meantime i found this update guide and updated to the latest version 6.5.0.0 which now gives the following output on the v4l2:

root@d6e50888dcf1:/# v4l2-ctl --list-devices
vsi_v4l2dec (platform:vsi_v4l2dec):
/dev/video1
vsi_v4l2enc (platform:vsi_v4l2enc):
/dev/video0
viv_media (platform:vvcam-video):
/dev/media0

I tried starting the container on video1 and video0 but i still get the same error: /dev/video0 or /video1 is not a video capture device

Hello @Reimonder,

After checking with Au-Zone, the situation is a bit clearer:

The Maivin version you have, with the OmniVision 8MP sensor, is only supported in the newer versions of Torizon for Maivin, as this sensor is a relatively recent addition.
This is why the camera sensor is not available in the Torizon for Maivin Image on our Toradex Easy Installer feeds.

The camera works on the new Torizon for Maivin 6 images, available on the Au-Zone feed.
Unfortunately, these images do not have docker, as you mentioned earlier.

A 6.5.0.1 release of Torizon for Maivin should be available later this week, with full docker support.


Following the update guide you sent, you can get the 6.5.0.0 image, which does contain docker and may work with your setup.
For both 6.5.0.1 and 6.5.0.0, the devicetree overlay for the camera it is not enabled by default.

To enable the camera, you can do the following:

  1. Open the overlays.txt file with vi, please note that if you updated to 6.5.0.0, there will be two different torizon- folders, you need to edit the file from the newest one.
sudo vi /boot/ostree/torizon-<ostree hash>/dtb/overlays.txt
  1. Set the contents of the file to:
fdt_overlays=maivin1.dtbo maivin1-os08a20-csi1.dtbo
  1. Reboot the board

The camera should now be working and available in one of the video devices. You can follow the same procedure as before to find the capture device.

If you have issues with 6.5.0.0, it may be worth waiting for 6.5.0.1.

Best Regards,
Bruno

Hey @bruno.tx,
Thank you for the reply. The v4l2 command brings this output now

root@c400b0542296:/# v4l2-ctl --list-devices
():
/dev/v4l-subdev0
/dev/v4l-subdev2
/dev/v4l-subdev3
():
/dev/v4l-subdev4
/dev/v4l-subdev5
(csi0):
/dev/v4l-subdev1
FSL Capture Media Device (platform:mxc-md):
/dev/media1
VIV (platform:viv0):
/dev/video2
VIV (platform:viv1):
/dev/video3
vsi_v4l2dec (platform:vsi_v4l2dec):
/dev/video1
vsi_v4l2enc (platform:vsi_v4l2enc):
/dev/video0
viv_media (platform:vvcam-video):
/dev/media0

Now trying to start the faceblur example with

docker run -it --rm --privileged --network host maivin/faceblur:latest -d /dev/video0

video0 and video1 both bring the “is not a video capture device” error

video2 and video3 brings up this error and freezes the maivin after the Init model line:

docker run -it --rm --privileged --network host maivin/faceblur:latest -d /dev/video2
VisionPack 1.2.18 EVALUATION - Copyright 2022 Au-Zone Technologies
Display connected
====== VPUENC: 4.5.7 build on Apr 14 2023 20:31:42. ======
wrapper: 3.0.0 (VPUWRAPPER_ARM64_LINUX Build on Apr 14 2023 18:47:55)
vpulib: 1.1.1
firmware: 1.1.1.65535
** (faceblurgl_headless:1): ERROR **: 11:10:31.175: Could not start pipeline
Mirror failedMirror failed ‘/dev/video2’: 22, Invalid argumentInit camera
Init model

Starting the faceblur example like stated on the Au-Zone page the output is this:

ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Device ‘/dev/video0’ is not a capture device.

So i found no way to get the faceblur example up and running.

I also installed ffpmeg to try and startup a camera with it

ffpmeg /dev/video2

is the only one that starts up without bringing up the error “not a video capture device”

And with the

ffmpeg -f v4l2 -video_size 1280x720 -i /dev/video2 -frames 1 out.jpg

command i can create a image but i have no way to display it due to its runtime inside the debian docker.

Hello @Reimonder,

Could you send me the output for the following commands?

  • v4l2-ctl --device /dev/video2 -D
  • v4l2-ctl --device /dev/video2 --list-formats-ext
  • v4l2-ctl --device /dev/video3 -D
  • v4l2-ctl --device /dev/video3 --list-formats-ext

I think the demo may be trying to use an unsupported capture size for the 8MP camera.

Best Regards,
Bruno

Hello @bruno.tx,

meanwhille i have updated my OS to the Version 6.5.0.2 of the torizon/maivin/release and updated the overlays.txt as you suggested in your previous post.

of course i can do that. Here are the infos for all /dev/video devices i got through the --list-devices:

():
/dev/v4l-subdev0
/dev/v4l-subdev1
():
/dev/v4l-subdev2
/dev/v4l-subdev3
mxc-isi-cap (platform:32e00000.isi:cap_devic):
/dev/video4
VIV (platform:viv0):
/dev/video2
VIV (platform:viv1):
/dev/video3
vsi_v4l2dec (platform:vsi_v4l2dec):
/dev/video1
vsi_v4l2enc (platform:vsi_v4l2enc):
/dev/video0
viv_media (platform:vvcam-video):
/dev/media0

  • v4l2-ctl --device /dev/video0 -D

Driver Info:
Driver name : vsi_v4l2
Card type : vsi_v4l2enc
Bus info : platform:vsi_v4l2enc
Driver version : 5.15.129
Capabilities : 0x84204000
Video Memory-to-Memory Multiplanar
Streaming
Extended Pix Format
Device Capabilities
Device Caps : 0x04204000
Video Memory-to-Memory Multiplanar
Streaming
Extended Pix Format

  • v4l2-ctl --device /dev/video0 --list-formats-ext

ioctl: VIDIOC_ENUM_FMT
Type: Video Capture Multiplanar
[0]: ‘HEVC’ (HEVC, compressed, dyn-resolution)
Size: Stepwise 136x136 - 1920x8192 with step 2/2
[1]: ‘H264’ (H.264, compressed, dyn-resolution)
Size: Stepwise 144x144 - 1920x8192 with step 2/2

  • v4l2-ctl --device /dev/video1 -D

Driver Info:
Driver name : vsi_v4l2
Card type : vsi_v4l2dec
Bus info : platform:vsi_v4l2dec
Driver version : 5.15.129
Capabilities : 0x84208000
Video Memory-to-Memory
Streaming
Extended Pix Format
Device Capabilities
Device Caps : 0x04208000
Video Memory-to-Memory
Streaming
Extended Pix Format

  • v4l2-ctl --device /dev/video1 --list-formats-ext

Driver Info:
Driver name : vsi_v4l2
Card type : vsi_v4l2dec
Bus info : platform:vsi_v4l2dec
Driver version : 5.15.129
Capabilities : 0x84208000
Video Memory-to-Memory
Streaming
Extended Pix Format
Device Capabilities
Device Caps : 0x04208000
Video Memory-to-Memory
Streaming
Extended Pix Format
root@887c25a560d9:/# v4l2-ctl --device /dev/video1 --list-formats-ext
ioctl: VIDIOC_ENUM_FMT
Type: Video Capture
[0]: ‘NV12’ (Y/CbCr 4:2:0)
[1]: ‘DTRC’ (VSI DTRC)
[2]: ‘P010’ (P010)
[3]: ‘NVX2’ (NV12 10Bit)
[4]: ‘DTRX’ (DTRC 10Bit)

  • v4l2-ctl --device /dev/video2 -D

Driver Info:
Driver name : viv_v4l2_device
Card type : VIV
Bus info : platform:viv0
Driver version : 5.15.129
Capabilities : 0x84201001
Video Capture
Video Capture Multiplanar
Streaming
Extended Pix Format
Device Capabilities
Device Caps : 0x04200001
Video Capture
Streaming
Extended Pix Format
Media Driver Info:
Driver name : vvcam-video
Model : viv_media
Serial :
Bus info :
Media version : 5.15.129
Hardware revision: 0x00000000 (0)
Driver version : 5.15.129
Interface Info:
ID : 0x03000003
Type : V4L Video
Entity Info:
ID : 0x00000001 (1)
Name : viv_v4l20
Function : V4L2 I/O
Pad 0x01000002 : 0: Sink, Must Connect
Link 0x02000011: from remote pad 0x1000010 of entity ‘vvcam-isp.0’ (V4L2 I/O): Data, Enabled

  • v4l2-ctl --device /dev/video2 --list-formats-ext

ioctl: VIDIOC_ENUM_FMT
Type: Video Capture
[0]: ‘YUYV’ (YUYV 4:2:2)
Size: Stepwise 176x144 - 4096x3072 with step 16/8
[1]: ‘NV12’ (Y/CbCr 4:2:0)
Size: Stepwise 176x144 - 4096x3072 with step 16/8
[2]: ‘NV16’ (Y/CbCr 4:2:2)
Size: Stepwise 176x144 - 4096x3072 with step 16/8

  • v4l2-ctl --device /dev/video3 -D

Driver Info:
Driver name : viv_v4l2_device
Card type : VIV
Bus info : platform:viv1
Driver version : 5.15.129
Capabilities : 0x84201001
Video Capture
Video Capture Multiplanar
Streaming
Extended Pix Format
Device Capabilities
Device Caps : 0x04200001
Video Capture
Streaming
Extended Pix Format
Media Driver Info:
Driver name : vvcam-video
Model : viv_media
Serial :
Bus info :
Media version : 5.15.129
Hardware revision: 0x00000000 (0)
Driver version : 5.15.129
Interface Info:
ID : 0x0300000a
Type : V4L Video
Entity Info:
ID : 0x00000008 (8)
Name : viv_v4l21
Function : V4L2 I/O
Pad 0x01000009 : 0: Sink, Must Connect
Link 0x02000019: from remote pad 0x1000018 of entity ‘vvcam-isp.1’ (V4L2 I/O): Data, Enabled

  • v4l2-ctl --device /dev/video3 --list-formats-ext

ioctl: VIDIOC_ENUM_FMT
Type: Video Capture
[0]: ‘YUYV’ (YUYV 4:2:2)
Size: Stepwise 176x144 - 4096x3072 with step 16/8
[1]: ‘NV12’ (Y/CbCr 4:2:0)
Size: Stepwise 176x144 - 4096x3072 with step 16/8
[2]: ‘NV16’ (Y/CbCr 4:2:2)
Size: Stepwise 176x144 - 4096x3072 with step 16/8

Thank you in advance.

Hello @Reimonder,

Thanks for all the information.

From the following line, it would seem that the camera does not support the default capture format of 1920x1080:

The following similar resolutions should work:

  • 1920x1016
  • 2048x1080

Then, to run the demo, the following command should work:

docker run -it --rm --privileged --network host maivin/faceblur:latest -d /dev/video2 -r 2048x1080

Best Regards,
Bruno

Hello @bruno.tx,

thank you for the quick reply. I tried to run the command you provided but sadly i get this output when the container is starting up.

docker run -it --rm --privileged --network host maivin/faceblur:latest -d /dev/video2 -r 2048x1080
VisionPack 1.2.18 EVALUATION - Copyright 2022 Au-Zone Technologies
Display connected
====== VPUENC: 4.5.7 build on Apr 14 2023 20:31:42. ======
wrapper: 3.0.0 (VPUWRAPPER_ARM64_LINUX Build on Apr 14 2023 18:47:55)
vpulib: 1.1.1
firmware: 1.1.1.65535
** (faceblurgl_headless:1): ERROR **: 14:01:36.492: Could not start pipeline
/dev/video2 does not support memory mapping

I also tried running it on other video devices but on video1/video0 I get the “not a video capture device” error and on the video4 i get a “VIDIOC_S_FMT error 16, Device or resource busy” error.

Here´s a screenshot of how i tried it, maybe its an error i am making when testing it

Hello @Reimonder,

It seems there are some limitations on how the camera image can be captured.

To solve this, adding -f dma, -f mem or -f phys to the end of the command you are using should solve the issue. For example:

docker run -it --rm --privileged --network host maivin/faceblur:latest -d /dev/video2 -r 2048x1080 -f dma

If this does not work, it may be that this demo is incompatible with the 8MP version of the Maivin.

Best Regards,
Bruno

Hi @bruno.tx,

i tried all possibilities you provided, but all have the same outcome, the video device does not support memory mapping.

Do you have any information about what demo´s are supported by the 8MP sensor? Because as i got the Maivin there was some sort of “human segmentation” running on it. Since i installed the new OS without any demo apps from Au-Zone i could not get the camera to work again.

Should i maybe try to create a own camera application which is just getting the video stream with opencv and display it in a e.g. flask server? Do you think this would get the camera working faster.

Best regards,
Simon

Hello @Reimonder,

Not specifically, I only have the 5MP sensor to test here. I would recommend that you check with Au-Zone about Docker demos that work on the 8MP sensor.

I think this would be a good alternative, as your current version of Torizon for Maivin includes support for the 8MP camera.

Best Regards,
Bruno

Hello @bruno.tx,

thank you for the reply. I am in contact with Sébastien from Au-Zone now. The demo´s of the application Zoo from Au-Zone do only display a black camera image. I will try to run my own application on the Maivin. As soon as I / we found a solution for my issue i will post it in here, so that in the future other developers with the same issue have something to look it up.

Thank you very much for your help and best regards,
Simon

What I am also thinking of, is connecting another camera to the Maivin I have laying around from my Verdin devkit. That would be the ACC-IXORA-WTB-ADP with a e-con systems camera. Maybe this is working.