TSDuck is a free, open-source framework designed for working with MPEG transport streams in digital television and video streaming systems. With its modular C++ architecture and extensive plugin system, it provides tools for testing, monitoring, analyzing, and manipulating transport streams across various standards and protocols.
TSDuck represents a significant tool in the domain of digital video broadcasting and streaming. As a comprehensive open-source framework for MPEG transport streams, it offers digital television engineers and video streaming professionals a robust set of utilities for testing, monitoring, integration, debugging, and lab work.
Core Functionality
At its heart, TSDuck provides capabilities for transport stream acquisition and transmodulation across multiple standards including DVB, ATSC, ISDB, ASI, and IP multicast. The framework allows for deep analysis of transport streams, including PSI/SI signalization, bitrates, and timestamps. Engineers can perform on-the-fly transformations, extractions, or injections of content and signalization within transport streams.
One of TSDuck's strengths lies in its ability to manipulate tables and descriptors using XML, JSON, or binary formats. The framework supports most standard tables and descriptors as defined by MPEG, DVB, ISDB, ATSC, and SCTE standards. This enables users to modify, remove, rename, or extract services with precision.
Specialized Features
TSDuck includes several specialized features that address specific needs in digital video workflows:
- SCTE 35 splice information analysis and injection
- Multi-Protocol Encapsulation (MPE) extraction or injection between TS and UDP/IP
- Electronic Program Guide (EPG) generation and EIT injection according to ETSI TS 101 211
- Comprehensive monitoring of stream conditions including video and audio properties, bitrates, crypto-periods, and signalization
- Integration with monitoring systems through bitrate and ETSI TR 101 290 metrics reporting to InfluxDB and Grafana
- Inter-packet Arrival Time (IAT) monitoring on datagram-based networks
Hardware Support
The framework supports a wide range of hardware configurations, from consumer-grade to professional broadcast equipment:
- Cheap DVB, ATSC, or ISDB tuners (USB, PCI)
- Professional Dektec devices, ASI, and modulators (USB, PCI)
- HiDes USB modulators
- AstroMeta-based USB modulators (formerly VATek) such as the Suntechtv U3
TSDuck can work with live transport streams from various sources including DVB-S/C/T, ATSC, ISDB-S/T, ASI, IP-TV, HTTP, HLS, SRT, RIST, or offline transport stream files and pcap captured files. It also allows for re-routing transport streams to other applications and extraction of specific encapsulated data like Teletext, T2-MI, and DVB-NIP.
Architecture and Extensibility
Developed in C++, TSDuck employs a modular architecture designed for extensibility. The framework was created with the primary requirement that any new feature could be implemented within a couple of hours, which has typically been achievable. This simplicity enables easy extension through plugins.
TSDuck consists of command-line tools and plugins, with each utility or plugin performing a single elementary feature that can be combined in any order. This Unix-philosophy approach allows for flexible workflows while keeping the codebase maintainable.
Beyond command-line tools, TSDuck provides a substantial library for manipulating MPEG transport streams. It offers bindings for C++, Java, and Python, enabling developers to integrate transport stream processing capabilities into their own applications.
Integration Capabilities
TSDuck can emulate a Conditional Access System (CAS) head-end using DVB SimulCrypt interfaces to and from ECMG (Entitlement Control Message Generator) or EMMG (Entitlement Management Message Generator). This capability is particularly valuable for testing and integration scenarios in secure broadcasting environments.
The framework also supports integration with monitoring dashboards through its ability to send metrics to InfluxDB and Grafana, making it suitable for larger broadcast operations requiring comprehensive monitoring solutions.
Platform Support and Availability
TSDuck is open source, released under the BSD license, and designed for portability across multiple platforms. It is built and tested for Windows, Linux, macOS, and BSD systems. Pre-built binary packages are available for Windows, Fedora, Ubuntu, RedHat, and Debian (both Intel x64 and Arm64).
The framework can be installed through standard package managers:
- On macOS: Homebrew
- On Windows: Winget
- On FreeBSD: Ports
For those needing to customize or rebuild TSDuck, documentation is provided for building with or without binary installers and packages.
Limitations
While TSDuck is comprehensive, it has some limitations to consider:
- There is no sophisticated GUI; the tool relies on command-line interfaces
- Hardware support varies by platform, with DVB tuners, Dektec devices, and HiDes modulators supported only on Windows and Linux
- AstroMeta-based modulators are supported on macOS in addition to Windows and Linux
Conclusion
TSDuck stands as a general-purpose toolbox for digital television engineers rather than a specialized application for production operators. Its modular design, extensive feature set, and support for multiple standards make it a valuable tool for anyone working with MPEG transport streams in broadcasting or streaming environments.
The framework's commitment to being free and open source, combined with its technical capabilities, positions it as a significant resource in the digital video ecosystem. Whether for testing, monitoring, integration, or development, TSDuck provides the tools needed to work effectively with transport streams across various platforms and standards.
For more information or to download TSDuck, visit the official project page. Issues can be reported and questions asked through the project's issue tracker.
Comments
Please log in or register to join the discussion