LibcameraSharp.Core 10.1.2

dotnet add package LibcameraSharp.Core --version 10.1.2
                    
NuGet\Install-Package LibcameraSharp.Core -Version 10.1.2
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="LibcameraSharp.Core" Version="10.1.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="LibcameraSharp.Core" Version="10.1.2" />
                    
Directory.Packages.props
<PackageReference Include="LibcameraSharp.Core" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add LibcameraSharp.Core --version 10.1.2
                    
#r "nuget: LibcameraSharp.Core, 10.1.2"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package LibcameraSharp.Core@10.1.2
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=LibcameraSharp.Core&version=10.1.2
                    
Install as a Cake Addin
#tool nuget:?package=LibcameraSharp.Core&version=10.1.2
                    
Install as a Cake Tool

<div align="center">

LibcameraSharp logo

LibcameraSharp

Your Raspberry Pi camera, from C#.

Photos, video and live frames in a few lines of .NET.

License: MIT

</div>

Photos · RAW to DNG · H.264 & MJPEG · Live frames · Typed camera controls


⭐ Quick Start

dotnet add package LibcameraSharp
using LibcameraSharp;

await using CameraDevice camera = CameraDevice.Open();

Photo photo = await camera.CapturePhotoAsync();
await photo.SaveAsync("photo.jpg");

A full-resolution JPEG with EXIF. Cameras with autofocus focus first.


🎬 A little more

Record a video:

VideoRecording recording = await camera.StartRecordingAsync("clip.mp4");
await Task.Delay(TimeSpan.FromSeconds(10));
await recording.StopAsync();

Stream to a browser (ASP.NET Core):

app.MapGet("/live.mp4", (CameraDevice camera, CancellationToken ct) =>
    Results.Stream(body => camera.RecordToAsync(body, new VideoOptions(), VideoContainer.Mp4, ct), "video/mp4"));

Read frames for motion detection or a model:

await foreach (VideoFrame frame in camera.ReadFramesAsync(new FrameOptions()))
    using (frame)
        Analyse(frame.Plane(0), frame.Stride(0));

Take control of exposure, gain, focus and more:

var manual = new PhotoOptions
{
    Controls = new CameraControls { Exposure = ExposureMode.Fixed(TimeSpan.FromMilliseconds(8)), Gain = GainMode.Fixed(2.0f) },
};
Photo sharp = await camera.CapturePhotoAsync(manual);

📦 Packages

Package
LibcameraSharp Photos, video and frames. Start here
LibcameraSharp.Core libcamera itself, for building your own pipeline. Included in the one above

Runs on .NET 10 and 64-bit Raspberry Pi OS (tested on a Pi 4), with any camera libcamera supports.


📚 Documentation

Getting started Install, first photo, options
Photos JPEG, PNG, RAW and EXIF
Video Recording and streaming
Frames Pixels for your own code
Controls Exposure, gain, focus, zoom
Cameras Several cameras, sensor modes
Raspberry Pi setup Checking the camera, deploying, troubleshooting
LibcameraSharp.Core libcamera, directly
Demos A photo booth and a browser webcam

FAQ

Only Raspberry Pi? No. Any camera libcamera drives on Linux, USB webcams included. The Pi is just where libcamera is most at home.

Is video encoded in hardware? On a Pi 4, yes, up to 1080p30. A Pi 5 encodes in software.

What does it need installed? Raspberry Pi OS has everything: libcamera, FFmpeg, libtiff and libexif.


Credits

Built on libcamera, FFmpeg, SkiaSharp, libtiff and libexif. The C shim comes from libcamera-rs. Much of the design, and the reference output the tests compare against, comes from picamera2, rpicam-apps and PiDNG.

License

MIT

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net10.0

    • No dependencies.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on LibcameraSharp.Core:

Package Downloads
LibcameraSharp

Photos, video and live frames from a Raspberry Pi camera in a few lines of C#: JPEG with EXIF, PNG and DNG; H.264 and MJPEG recordings to MP4, Matroska or MPEG-TS; frames you can hand to your own code. Built on LibcameraSharp.Core.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
10.1.2 148 10/5/2026
10.1.1 125 10/3/2026
10.1.0 124 10/1/2026
10.0.0 125 9/28/2026