Zeayii.Vexo.Task.Assembly.Media
0.0.32
dotnet add package Zeayii.Vexo.Task.Assembly.Media --version 0.0.32
NuGet\Install-Package Zeayii.Vexo.Task.Assembly.Media -Version 0.0.32
<PackageReference Include="Zeayii.Vexo.Task.Assembly.Media" Version="0.0.32" />
<PackageVersion Include="Zeayii.Vexo.Task.Assembly.Media" Version="0.0.32" />
<PackageReference Include="Zeayii.Vexo.Task.Assembly.Media" />
paket add Zeayii.Vexo.Task.Assembly.Media --version 0.0.32
#r "nuget: Zeayii.Vexo.Task.Assembly.Media, 0.0.32"
#:package Zeayii.Vexo.Task.Assembly.Media@0.0.32
#addin nuget:?package=Zeayii.Vexo.Task.Assembly.Media&version=0.0.32
#tool nuget:?package=Zeayii.Vexo.Task.Assembly.Media&version=0.0.32
Vexo.Task.Assembly.Media
English | 简体中文
Organization: zeayii
Project: vexo
ISO BMFF / MP4 / WebM / EBML structural parsing and fragment modeling library
Targeted for players, downloaders, repackagers, DRM/forensics toolchains
Overview
Vexo.Task.Assembly.Media delivers high-performance, AOT/trimming-friendly media container parsing. It focuses on structural understanding rather than decoding: identifying box/element boundaries, extracting fragment metadata, and feeding reliable structure hints to upper pipelines (download, decrypt, remux, manifest generation).
Highlights
- Streaming MP4 / ISO BMFF parsing: Incremental feed with registered callbacks for moov/moof/mdat/pssh and more; works with fragmented MP4, CMAF, DASH segments.
- Fragment modeling: Track/init/media fragment builders (
Fragmentsdirectory) that map parsed boxes into consumable metadata. - EBML/WebM support: EBML primitives (VarInt/UInt/Int) and WebM element models for future Matroska/WebM timeline parsing.
- AOT-first: No reflection or dynamic loading; exception-free hot paths to suit constrained runtimes.
- Zero-copy buffering:
ByteQueuerelies onArrayPool<byte>and a sliding window design to minimize GC and large memory moves.
Layout
Common/IO: Foundational I/O utilities (ByteQueue,BytesWriter) providing zero-copy buffers for streaming scenarios.Ebml: EBML types, parsing context, and exception model supporting WebM/Matroska structural reads.MP4:Boxes: ISO BMFF boxes (File/Track/Fragment/Encryption) grouped by hierarchy for structural detection and field reads.Core: Generic box parser (Parser,ParseContext,ParseBox) with handler registration, container recursion, and mdat events.Fragments: Init/fragment modeling and build states that translate moov/moof/stbl insights into track/sample layouts.
WebM: WebM elements and cue models built atop EBML primitives.
Design tenets
- Narrow scope: Structural parsing and metadata building only; no media decode, DRM decryption, or file persistence.
- Streaming-first: Parsers ingest incremental spans;
ParseContexttracks global offsets/states (e.g.,ParsingBoxes,EmittingSamples) so callers can consume mdat payload as soon as the event fires. - Pluggable handlers:
Parser.Box/FullBox/SampleEntryBoxregister only the boxes you care about; unregistered types are skipped with zero payload copy. - Robustness: Strict length/state checks; throws instead of guessing incomplete structures. Encryption-related boxes (pssh/senc/saiz/saio, etc.) retain offsets for downstream decryptors.
- Compatibility: Targets
net10.0, trimmable, and free of dynamic code.
Key flow
- Context setup: Create a
ParseContext, configure buffer sizing and callbacks. - Register handlers: Choose the boxes you need (moov/moof/mdat/pssh, etc.).
- Feed data: Repeatedly call
Parser.Parse(ReadOnlySpan<byte>)with network/file chunks. - React to events:
MdatBegin: Discover media data start/length.BoxHandler: Handle payload when a registered box is fully read (zero-copy view).- Use
ParseChildrento recurse into container boxes.
- Fragment modeling: Combine
Fragmentsbuild state to produce init/media fragment descriptions (tracks, timestamps, sample layouts).
Collaboration with other layers
- Task metadata: Works with task/stream/fragment models from
Vexo.Task.Assembly.Abstractions. - Manifest extraction:
Vexo.Task.Assembly.Manifestconsumes this module for fMP4 parsing and sidx/range handling when expanding DASH/HLS manifests. - Pipeline fit: Typical chain—download → Media.Parser → fragment modeling → decrypt/merge/persist.
Extension tips
- New box: add a definition under
MP4/Boxesand register a handler inParser. - New EBML element: extend
Ebml/TypesandWebM/Elementswith models and parsing logic. - Performance tuning: Adjust
ByteQueueinitial size to your I/O pattern; register only necessary boxes to reduce payload copying.
Development & testing
- Build:
dotnet build Vexo.Task.Assembly.sln(use an SDK that supportsnet10.0). - Static analysis: Enable IDE analyzers and nullable checks to match project settings.
- Real fixtures:
Media.Tests/TestData/real-media-cachenow stores raw binary.mp4fixtures and tests read bytes directly (no Base64 text decoding). - Samples: Author small console harnesses to validate streaming parsing and event timing.
License
This module follows the repository root LICENSE. Ensure compliance when redistributing or embedding.
| Product | Versions 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. |
-
net10.0
- Zeayii.Vexo.Task.Assembly.Abstractions (>= 0.0.32)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Zeayii.Vexo.Task.Assembly.Media:
| Package | Downloads |
|---|---|
|
Zeayii.Vexo.Task.Assembly.Manifest
Vexo Task Assembly Manifest for Vexo. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.0.32 | 145 | 2/20/2026 |
| 0.0.31 | 138 | 2/20/2026 |
| 0.0.30 | 136 | 2/19/2026 |
| 0.0.29 | 132 | 2/19/2026 |
| 0.0.28 | 135 | 2/19/2026 |
| 0.0.27 | 123 | 2/19/2026 |
| 0.0.26 | 134 | 2/18/2026 |
| 0.0.25 | 131 | 2/18/2026 |
| 0.0.24 | 138 | 2/17/2026 |
| 0.0.23 | 142 | 2/16/2026 |
| 0.0.22 | 140 | 2/16/2026 |
| 0.0.21 | 139 | 2/16/2026 |
| 0.0.20 | 142 | 2/15/2026 |
| 0.0.19 | 151 | 2/15/2026 |
| 0.0.18 | 150 | 1/3/2026 |
| 0.0.17 | 145 | 1/1/2026 |
| 0.0.16 | 138 | 1/1/2026 |
| 0.0.15 | 141 | 1/1/2026 |
| 0.0.14 | 150 | 12/31/2025 |
| 0.0.13 | 135 | 12/30/2025 |