SER.Lib 1.0.91

This package has a SemVer 2.0.0 package version: 1.0.91+24b6593f85a66a5b774e4bf9afecdebe1fcec2a6.
There is a newer version of this package available.
See the version list below for details.
dotnet add package SER.Lib --version 1.0.91
                    
NuGet\Install-Package SER.Lib -Version 1.0.91
                    
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="SER.Lib" Version="1.0.91" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="SER.Lib" Version="1.0.91" />
                    
Directory.Packages.props
<PackageReference Include="SER.Lib" />
                    
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 SER.Lib --version 1.0.91
                    
#r "nuget: SER.Lib, 1.0.91"
                    
#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 SER.Lib@1.0.91
                    
#: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=SER.Lib&version=1.0.91
                    
Install as a Cake Addin
#tool nuget:?package=SER.Lib&version=1.0.91
                    
Install as a Cake Tool

SER.Lib

A pure-managed reader and writer for the SER planetary-imaging video format (the Lucam Recorder format, spec v3).

SER is the de-facto container for lunar / planetary / solar lucky-imaging captures: thousands of raw mono, Bayer, or RGB frames in one file, with optional per-frame UTC timestamps. SER.Lib decodes and encodes it with memory-mapped, frame-accurate random access (seek to any frame in O(1), even in multi-gigabyte files), and is AOT- and trim-friendly with zero external dependencies.

Part of the SharpAstro family (alongside FITS.Lib). It is consumed by TianWen, whose tianwen-fits viewer opens SER captures as a frame sequence.

Install

dotnet add package SER.Lib

Quick start

using SharpAstro.Ser;

using var ser = SerReader.Open("jupiter.ser");

Console.WriteLine($"{ser.Width}x{ser.Height}  {ser.ColorId}  " +
                  $"{ser.PixelDepthPerPlane}-bit  {ser.FrameCount} frames");

// Random access: decode frame 1000 into a reusable buffer (no per-frame allocation).
var frame = new ushort[ser.Width * ser.Height * ser.ColorId.PlaneCount];
ser.ReadFrame16(index: 1000, frame);

// Per-frame UTC timestamps (when the file carries the optional trailer).
if (ser.HasTimestamps)
    Console.WriteLine(ser.Timestamps[1000].ToString("u"));

Writing:

using var w = new SerWriter("out.ser", width: 640, height: 480,
    colorId: SerColorId.BayerRGGB, pixelDepthPerPlane: 8);

foreach (var (bytes, time) in frames)
    w.AppendFrame(bytes, time);   // timestamps -> the v3 trailer on Close()

Format notes & gotchas

The on-disk format is a fixed 178-byte little-endian header, the frame data, and an optional per-frame timestamp trailer. A few real-world subtleties SER.Lib handles for you:

  • The LittleEndian header flag is interpreted the way SER Player / PIPP do (the de-facto reference): for 16-bit data, LittleEndian == 0 means little-endian samples and LittleEndian == 1 means big-endian — the opposite of what the field name suggests. This is a well-known wart in the ecosystem; matching the reference players is what makes real captures display correctly. The header's own integers are always little-endian regardless of this flag.
  • Timestamps are .NET DateTime ticks (100 ns since 0001-01-01). SER.Lib surfaces them as UTC DateTimeOffsets, applying the same UTC-vs-local detection the reference player uses.
  • Frames are stored top-row-first (the first pixel is the upper-left); SER.Lib does not flip rows.
  • v2 vs v3: RGB/BGR true colour, arbitrary bit depths (1-16 with MSB/LSB alignment), and the timestamp trailer + UTC start time are v3 additions. SER.Lib reads v2 files (mono/Bayer, 8/16-bit, no trailer) transparently.

License

MIT - see LICENSE.

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 SER.Lib:

Package Downloads
TianWen.Lib

Package Description

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.1.131 73 7/4/2026
1.1.111 33 6/23/2026
1.0.91 230 6/23/2026
1.0.71 31 6/22/2026
1.0.51 42 6/22/2026
1.0.41 34 6/22/2026
1.0.31 34 6/22/2026
1.0.21 27 6/22/2026
1.0.11 33 6/22/2026