question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

VideoDevice does not work on raspberry os arm64 rtm

See original GitHub issue

Describe 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:closed
  • Created 2 years ago
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
krwqcommented, Jun 30, 2022

[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

0reactions
raffaelercommented, Jul 1, 2022

I updated my comment here to clarify the short/medium/long term strategies to successfully access a video device.

Read more comments on GitHub >

github_iconTop Results From Across the Web

libwidevinecdm0:arm64 not working properly
I tried to reinstall the latest Raspberry Pi OS 64-bit, which should support widevinecdm0:arm64 by default in the package, but also that fresh ......
Read more >
Fedora ARM 64 Does Not Work On Raspberry Pi 4
I've had reports of issues with HDMI cables on the upstream kernels that work with the RPi foundation kernels that are used by...
Read more >
Any reason not to use Bullseye arm64 on a Pi4 ? Desktop ...
I'm using the official beta image. Same software are present in the repo and those I installed run identically. I can also run...
Read more >
Synergy - Do I install ARMHF or ARM64 on my Raspberry Pi?
When downloading Synergy for Raspberry Pi, you'll need to choose between ARMHF and ARM64. If you're unfamiliar with what "ARMHF" and "ARM64" mean, ......
Read more >
I installed Raspbian 32 bit. But 'arch' writes aarch64
The switch to running a 64-bit kernel by default on Pi 4 is intentional. We believe it gives a better experience with few...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found