libopx 1.4.0

dotnet add package libopx --version 1.4.0
                    
NuGet\Install-Package libopx -Version 1.4.0
                    
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="libopx" Version="1.4.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="libopx" Version="1.4.0" />
                    
Directory.Packages.props
<PackageReference Include="libopx" />
                    
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 libopx --version 1.4.0
                    
#r "nuget: libopx, 1.4.0"
                    
#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 libopx@1.4.0
                    
#: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=libopx&version=1.4.0
                    
Install as a Cake Addin
#tool nuget:?package=libopx&version=1.4.0
                    
Install as a Cake Tool

libopx

NuGet GitHub Release Build Status License: MIT .NET

A .NET 9 C# library for parsing and extracting data from MXF (Material Exchange Format), BIN (MXF caption data stream), VBI (Vertical Blanking Interval), and T42 (Teletext packet stream) files, with SMPTE timecode and Teletext caption support.

Features

  • Multi-format support: BIN, VBI, T42, and MXF file parsing
  • Format conversion: Automatic VBI ↔ T42 conversion
  • Teletext filtering: Magazine and row-based filtering with Unicode mapping
  • SMPTE timecode: Full timecode calculations with various frame rates
  • MXF processing: Stream extraction and demuxing capabilities
  • CLI tool: Unified opx command-line interface

Format conversions: Convert between HD and SD T42 and VBI formats or vice versa. You can even pipe that data to other applications like ffmpeg or mpv.

Piping Example

ANSI Escaped Teletext: Supports parsing and filtering of teletext data with ANSI escape sequences:

VHS Teletext Comparison

Quick Start

Installation

Add the package reference to your project file from NuGet.org.

dotnet add package libopx

Or download the latest release from GitHub Releases.

Using the CLI Tool

# Filter teletext data by magazine and rows
opx filter -m 8 -r 20,22 input.vbi

# Convert between formats
opx convert -o t42 input.vbi

# Extract streams from MXF files
opx extract -k d,v input.mxf

Using the Library

using nathanbutlerDEV.libopx.Formats;

// Parse and filter teletext data
using var vbi = new VBI("input.vbi");
foreach (var line in vbi.Parse(magazine: 8, rows: new[] { 20, 22 }))
{
    Console.WriteLine(line);
}

Documentation

Project Structure

libopx/
├── apps/opx/         # CLI tool
├── lib/              # Main library
│   ├── Formats/      # Format parsers (MXF, BIN, VBI, T42)
│   ├── SMPTE/        # SMPTE metadata system
│   └── Enums/        # Enumeration definitions
├── samples/          # Sample files for testing
├── scripts/          # Development scripts
└── tests/            # xUnit test suite

Development

# Clone and build
git clone https://github.com/nathanpbutler/libopx
cd libopx
dotnet build

# Run tests
dotnet test

Requirements

  • .NET 9 or later
  • Supported platforms: Windows, Linux, macOS

Dependencies

  • System.CommandLine (v2.0.0-beta6)
  • xUnit (testing)
  • coverlet (code coverage)

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests for new functionality
  5. Ensure all tests pass
  6. Submit a pull request

License

MIT - see the LICENSE file for details.

Acknowledgments

  • vhs-teletext - Software to recover teletext data from VHS recordings (inspiration for filter command)
  • MXFInspect - Tool for displaying the internal structure of MXF files (was super helpful for understanding MXF parsing and the intricacies of SMPTE timecodes)
  • bmxtranswrap - BBC's MXF processing library and utilities (inspiration for extract command)
  • SubtitleEdit - An incredibly useful C# library and software for subtitle editing and processing
  • CCExtractor - Closed caption and subtitle extraction and processing
  • ffmpeg - The swiss army knife of multimedia processing

Support

For questions and support, please open an issue.

Product Compatible and additional computed target framework versions.
.NET net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  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.
  • net9.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.4.0 17 9/2/2025
1.3.0 103 8/17/2025
1.2.0 57 8/16/2025
1.1.0 139 8/13/2025
1.0.0 56 8/3/2025

v1.4.0: Added async parsing methods with ArrayPool buffer management for 30-45% memory reduction and improved performance. Enhanced CLI with Ctrl+C cancellation support and progress reporting. Includes ParseAsync() methods for all formats and new AsyncHelpers utility class.