4 ms·
I don't get it. Why create a new, competing library instead of working with the devs of the existing library? From the faq: "We see libcamera as a continuation
by trelane 4y ago
I don't get it. Why create a new, competing library instead of working with the devs of the existing library?
From the faq: "We see libcamera as a continuation of V4L2." Ok, why not just contine v4l2?
Or why not work with gstreamer?
- MartijnBraam 4y agolibcamera: from the people who made v4l2 a mess
- robert_foss 4y agoThat's both uncharitable & incorrect
- fdfaz 4y agofrom the name I guess v4l2 is the second version of something? So third time's the charm?
- TheCycoONE 4y agoVideo 4 Linux, and yes it's the second version. v4l was added to the kernel in the late 90s, and v4l2 replaced it in the early 2000s. https://en.wikipedia.org/wiki/Video4Linux https://en.wikipedia.org/wiki/Video4Linux
- ognarb 4y agoInteresting statement from the author of megapixels https://git.sr.ht/~martijnbraam/megapixels https://git.sr.ht/~martijnbraam/megapixels
- johndough 4y agoThe people who downvote this comment probably have not used libcamera. All the smart pointer stuff makes it needlessly difficult. Ironically, the first example on how to use libcamera that I could find leaks memory.
- mort96 4y agoIn my opinion, video4linux is already a decent kernel API which exposes cameras to userspace. However, as embedded camera setups are becoming more and more complex, with more and more programmable image processors and configurable subdevice node graphs, the userspace code to interact with the mess is becoming more and more complex. My understanding is that libcamera builds on top of the video4linux kernel API, but presents a much simpler interface. And they already work with gsteramer. Libcamera provides a gstreamer plug-in. But because libcamera is also a separate library, people who don't want to add all of gstreamer as a dependency can still get the benefits. I'd love it if people who are more involved could correct me if anything I said is inaccurate.
- trelane 4y agoOk, a simpler library on top of, and in collaboration with, the existing library I can get behind. Perhaps they should add this to their FAQ.
- HarHarVeryFunny 4y agoFrom the project documentation there's no indication of it being based "on top of" V4L2, in fact the exact opposite. libcamera has compatability layers that add V4L2 and "Android Camera HAL v3" (which I'm not familiar with) on top of libcamera. https://libcamera.org/docs.html https://libcamera.org/docs.html
- mort96 4y agoA lot of software uses the video4linux kernel interface directly. That v4l2 compatibility layer is to make those applications go through libcamera even though they think they're using the kernel interface directly.
- HarHarVeryFunny 4y agoExactly - that's the definition of a compatibility layer! If you need to use a camera that's supported by libcamera, but not natively by v4l2, and prefer to use the v4l2 API, then libcamera's v4l2 compatability layer will let you do that. But it seems the goals of libcamera are quite different than v4l2. v4l2 (which I used to use years ago) seems more about supporting the minimum common feature set of cameras - basic video streaming, while libcamera appears more about supporting the greatest common feature set - with CPU implementation of features where necessary (hence the Mesa comparison).
- xaerise 4y ago[flagged]
- mort96 4y agoThis is a case of "We already have a good kernel interface for interacting with cameras (video4linux, but the userspace code which uses that kernel interface is getting increasingly complex as hardware evolves. Let's factor that complexity out into its own library."
- Manfred 4y agoI don't know the reasons of this specific group or person, so I'm obviously not speaking for them. When I work on something I like to do it my way. I don't think I or anyone else has the moral obligation to donate their time to existing projects, just because we have similar interests or goals.
- grepLeigh 4y agoLibcamera does work with gstreamer. Libcamera is a glue framework between proprietary IPA-packaged code and v4l2 subsystem. Many of the tasks you'd want to use libcamera for are outside the scope of v4l2. API glue: https://libcamera.org/api-html/namespacelibcamera.html https://libcamera.org/api-html/namespacelibcamera.html