Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CSI-2 2 & 4 Lane Support #120

Open
ETE-Design opened this issue Nov 30, 2023 · 12 comments
Open

CSI-2 2 & 4 Lane Support #120

ETE-Design opened this issue Nov 30, 2023 · 12 comments

Comments

@ETE-Design
Copy link

Hi.

The Raspberry Pi 5 seems to Support CSI-2 - 4 Lane, and there is already some camera chip that support 4-lane. Wouldn't it give a performance gain to support it? And do you know how to make this part?

@kbingham
Copy link

Yes, the RPi5 supports 4 lane cameras. I have a couple here that I am testing. But this is probably a discussion more appropriate for the raspberry pi forums or kernel repository https://github.com/raspberrypi/linux/ rather than a camera streamer application.

@kbingham
Copy link

kbingham commented Nov 30, 2023

In terms of 'performance gain' ... it really depends on what you're trying to achieve. You can either transfer twice the pixels in the same amount of time, or you can use half the clock speeds to transfer the same quantity of data.

But all of that is dependant upon the sensors and drivers supporting those modes and settings.

4 Lane support does however give a bigger range of cameras that can be supported. Some modules are only supported in 4 lane configurations for instance.

@ETE-Design
Copy link
Author

@kbingham So when the kernel support 4-lane this software will automatic support it, is that correct understod?
Would like to live stream 4k60Hz Video over Lan, so was hoping 4-lane would make it possible.

@ayufan
Copy link
Owner

ayufan commented Nov 30, 2023

@ETE-Design Unlikely to happen, since 4k60HZ are unlikely to be software encoded by the CPU. I will be testing this yet, but I would not have my hopes high. I'm looking at adding software encoding in camera-streamer now, as this appears as an only way to make some features to work.

@kbingham
Copy link

kbingham commented Dec 1, 2023

Indeed, you're going to hit encoder performance limitations long before you hit MIPI Data lane limitations I believe.

@kbingham
Copy link

kbingham commented Dec 1, 2023

@ayufan Note that Pi5 does not have a hardware encoder at all. RPi use ffmpeg in their rpicam-apps on pi5.

@ayufan
Copy link
Owner

ayufan commented Dec 1, 2023

@kbingham Yeah, I corrected my message. I know which makes even h264 1080p@60fps at the edge on pi5 :)

@kbingham
Copy link

kbingham commented Dec 1, 2023

Encoding is one of the troubling points for me. So many people "expect" libcamera to handle it - but it's not libcamera's job. ... Maybe it should be 'libencoders' job - but there's already ffmpeg and gstreamer for all that.

@ayufan
Copy link
Owner

ayufan commented Dec 1, 2023

I'm thinking the same, so I will use ffmpeg for that. There's no reason to reinvent a wheel.

@kbingham
Copy link

kbingham commented Dec 1, 2023

The awesome part then will mean your camera-streamer will really not be tied to RPi devices ... and it would run on /any/ libcamera supported platform.

@ayufan
Copy link
Owner

ayufan commented Dec 1, 2023

Correct. That is the idea. I also work on reverse process: support USB h264 compatible cams, to decode h264 to provide JPEG screenshots. Which would work on any device. As doing jpeg/yuyv re-encoding to h264 is rather too expensive for majority devices.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants