VideoDevice does not work on raspberry os arm64 rtm
See original GitHub issueDescribe the bug
The RTM release of raspberry pi arm64 os, based on bullseye, was released earlier this week. When attempting to run the sample MJPEG project on a raspberry pi 4 using this OS, the code runs without error, however, invalid images are produced.
I suspect this is due to the fact that the os now relies on the unicam driver for offically supported raspberry pi cameras, instead of the original broadcom implementation. I’ve been running the MJPEG sample on the earlier releases of this release that didn’t use that driver, and they worked fine excluding the issues mentioned in #1688 and #1689.
Steps to reproduce
run the sample MJPEG project on a device using the new raspberry pi os with an offical raspberry pi camera. I was using the pi cam v2
Expected behavior
an image is produced with the following starting bytes, captured in vscode:
[0] [byte]:255 [1] [byte]:216 [2] [byte]:255 [3] [byte]:225
Images produced with the new inbuilt libcamera-still/libcamera-vid tools do correctly produce these starting bytes.
Actual behavior
no errors occur, but the frames returned are not valid.
again debuging with vscode, the following bytes are returned for the start of the image:
Example 1:
[0] [byte]:16 [1] [byte]:17 [2] [byte]:16 [3] [byte]:16
Example 2:
[0] [byte]:17 [1] [byte]:17 [2] [byte]:16 [3] [byte]:16
Example 3:
[0] [byte]:16 [1] [byte]:16 [2] [byte]:16 [3] [byte]:16
my tests consistenly result in some combination of 16/17 as the starting bytes in the frame.
Versions used
.NET SDK (reflecting any global.json):
Version: 6.0.100
Commit: 9e8b04bbff
Runtime Environment:
OS Name: debian
OS Version: 11
OS Platform: Linux
RID: debian.11-arm64
Base Path: /home/pi/dotnet/sdk/6.0.100/
Host (useful for support):
Version: 6.0.0
Commit: 4822e3c3aa
.NET SDKs installed:
6.0.100 [/home/pi/dotnet/sdk]
.NET runtimes installed:
Microsoft.AspNetCore.App 6.0.0 [/home/pi/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 6.0.0 [/home/pi/dotnet/shared/Microsoft.NETCore.App]
To install additional .NET runtimes or SDKs:
https://aka.ms/dotnet-download
- Version of
System.Device.Gpio
package: built from main - Version of
Iot.Device.Bindings
package: built from main
Issue Analytics
- State:
- Created 2 years ago
- Comments:7 (7 by maintainers)
Top GitHub Comments
[Triage] Marking as blocked: there are bugs in the libcamera compatibility layer. Current workaround is to enable the legacy stack in RPi using raspi-config. @raffaeler will provide more details
I updated my comment here to clarify the short/medium/long term strategies to successfully access a video device.