# TSDuck: a command line toolkit for MPEG transport streams

> TSDuck is a C++ framework for acquiring, inspecting and rewriting MPEG transport streams, built as a set of small command line tools and plugins that compose into a pipeline, with Python and Java bindings for calling the same machinery. It suits a broadcast engineer testing signalization or a developer who has to get inside a TS file and change what is in it.

**tsduck/tsduck** — MPEG Transport Stream Toolkit 

- Repository: https://github.com/tsduck/tsduck
- Website: https://tsduck.io
- Stars: 1,092 · Forks: 242
- Language: C++
- License: BSD-2-Clause
- Published: 2026-10-19 · Updated: 2026-10-19 · Language: en
- Canonical page: https://hysenlabs.com/projects/tsduck-tsduck

## What the toolkit is for

TSDuck is the free and open-source reference framework for MPEG transport streams, and it is used in digital television systems for test, monitoring, integration, debug, lab or demo work. The list of practical uses is long and specific. Transport stream acquisition or transmodulation, including DVB, ATSC, ISDB, ASI and IP multicast. Analysis of transport streams, PSI/SI signalization, bitrates and timestamps. On-the-fly transformation or injection of content and signalization, with manipulation of tables and descriptors using XML, JSON or binary formats, and most standard tables and descriptors supported as defined by MPEG, DVB, ISDB, ATSC and SCTE. Modify, remove, rename or extract services. Analyse and inject SCTE 35 splice information. And extract or inject Multi-Protocol Encapsulation between TS and UDP/IP. The primary language is C++, the licence is BSD-2-Clause, and the homepage is tsduck.io.

## The philosophy, small tools in any order

The design statement is worth reading closely, because it explains everything about how the project feels to use. TSDuck is developed in C++ in a modular architecture and is easy to extend through plugins. It is simple, and the simplicity means it is a collection of command line tools and plugins with no sophisticated GUI. Each utility or plugin performs only one elementary feature, and they can be combined in any order. That is a Unix-style commitment stated explicitly, and it has a concrete consequence. A task like reading a stream, rewriting the PSI tables and writing a new file is three separate programs joined by a pipe, and each of them can be swapped or replaced without touching the others. The alternative, a single application with a configuration file describing a pipeline, would be easier to use and much harder to extend.

## tsp, the piece everything else plugs into

Through `tsp`, the Transport Stream Processor, many types of analysis and transformation can be applied on live or recorded transport streams, and this utility can be extended through plugins. Existing plugins can be enhanced and new plugins developed using a library of C++ classes. The point of the design is that the processor is the composition point, not that the plugins are clever. A plugin that knows how to do one thing, with one set of options, gets composed with others by the processor in whatever order makes sense for the job. This is also why the project can support a wide range of standards without the tool becoming monolithic, since each standard's tables and descriptors are handled by a plugin that knows only its own area.

## The scope, and the hardware it talks to

The remaining capabilities show how wide the reach is. It can generate an Electronic Program Guide and inject EIT according to ETSI TS 101 211, and it can monitor and report conditions on the stream, including video and audio properties, bitrates, crypto-periods and signalization. It can send bitrate and ETSI TR 101 290 metrics to InfluxDB and Grafana for system monitoring, and it monitors Inter-packet Arrival Time on datagram-based networks. It emulates a CAS head-end using DVB SimulCrypt interfaces to and from ECMG or EMMG, and it can extract specific encapsulated data such as Teletext and T2-MI. It works on live streams over DVB-S, DVB-C, DVB-T, ATSC, ISDB-S, ISDB-T, ASI, UDP for IP-TV, HTTP, HLS, SRT and RIST, or on offline transport stream files and pcap network capture files. It can receive from or send to specialised hardware, from cheap USB and PCI DVB, ATSC or ISDB tuners to professional Dektec devices and modulators, HiDes modulators and AstroMeta-based USB modulators formerly VATek.

## Installing it, and the prebuilt packages

TSDuck can be built on Windows, Linux, macOS and BSD systems, and the primary target architectures are Intel x86_64 and Arm64, but it is regularly built and tested on x86, Arm32, RISC-V, PowerPC and IBM s390x. The install routes are documented per platform. On macOS you use the Homebrew packager with `brew install tsduck`. On Windows you use winget with `winget install tsduck`. On FreeBSD you use FreeBSD Ports with `pkg install tsduck`. Pre-built binary packages are also available for Windows and the very latest versions of some Linux distributions, Fedora and RedHat and clones, Ubuntu and Debian, on Intel x64 and Arm64. The latest developments can be tested with the nightly builds, and there are two commands for keeping a local install current, `tsversion --check` to see whether a newer version exists online and `tsversion --upgrade` to download the latest binaries for the current operating system.

## The libraries, and the Python and Java bindings

For programmers, TSDuck provides a large collection of C++ classes in one single library, and these classes manipulate in a completely portable way MPEG transport streams, MPEG, DVB, ATSC and ISDB signalization and many other features. Python and Java bindings exist so that transport stream processing pipelines can be run from Python or Java applications. The sample directory in the repository shows the range, with `sample/sample-python/`, `sample/sample-java/`, `sample/sample-app/`, `sample/sample-app-custom/`, `sample/sample-plugin/` and `sample/sample-extension/` for the extension mechanism, plus `sample/sample-memory-plugins/`, `sample/sample-reactor-server/`, `sample/sample-sig-demux/`, `sample/monitor/` and `sample/grafana/`, `sample/mpe/`, `sample/lyngsat/`, `sample/packager/`, `sample/tls/`, `sample/install/`, `sample/misc/` and a `sample/segfault/` that is presumably there to prove the failure behaviour.

## Testing, and the one-maintainer constraint

The Makefile shows how the project is tested and it is a two-layer arrangement. The `test` target runs the unitary tests in `src/utest`, with separate static and shared variants, and there is a valgrind family of targets that rebuild with `DEBUG=true` before running the same tests under valgrind. The second layer is a separate test suite repository that is expected as a sibling directory, and the `test-suite` target checks for `../tsduck-test/.git`, pulls it and runs `run-all-tests.sh` against the built binaries, and prints a message that no test repository was found if the directory is absent. There is also an `si-test-suite` variant that runs just the PSI/SI tests, and a `cross` target for cross-compilation. The project resources section is where the constraint is stated plainly, that TSDuck is maintained by one single developer on spare time and on personal expenses, and you may consider contributing to the hardware and web hosting costs. The copyright line reads 2005 to 2026, Thierry Lelegard.

## Conclusion

Adopt TSDuck if you need to inspect or modify transport stream content, PSI/SI signalling or splice information, since the plugin pipeline covers acquisition, analysis and injection without a GUI. Skip it if you only need to play a stream, since this is a processing toolkit rather than a player. Before you start, note the platform breadth, which covers Windows, Linux, macOS and the BSDs with x86, Arm32, Arm64, RISC-V, PowerPC and s390x tested, and that the project is maintained by one developer in spare time, so the release cadence is that of a single maintainer rather than a team.

## FAQ

### What is TSDuck used for?

It is the free and open-source reference framework for MPEG transport streams, used in digital television systems for test, monitoring, integration, debug, lab or demo work: acquiring and transmodulating streams, analysing PSI/SI signalization, transforming and injecting tables and descriptors, handling SCTE 35 splice information, and generating EPG data.

### How do I install TSDuck?

On macOS use Homebrew with `brew install tsduck`, on Windows use winget with `winget install tsduck`, and on FreeBSD use Ports with `pkg install tsduck`. Pre-built binary packages are also available for Windows and recent Fedora, RedHat, Ubuntu and Debian builds on Intel x64 and Arm64.

### What is the tsp utility in TSDuck?

It is the Transport Stream Processor, through which many types of analysis and transformation can be applied on live or recorded transport streams. It can be extended through plugins, and new plugins can be developed using the library of C++ classes.

### Can TSDuck be used from Python or Java?

Yes. Python and Java bindings exist to allow running transport stream processing pipelines from Python or Java applications, on top of the large collection of C++ classes provided in one single library.

## Sources

- [License: BSD-2-Clause](https://github.com/tsduck/tsduck/blob/master/LICENSE)
- [Project website](https://tsduck.io)
- [README](https://github.com/tsduck/tsduck/blob/master/README.md)
- [Releases](https://github.com/tsduck/tsduck/releases)
- [tsduck/tsduck on GitHub](https://github.com/tsduck/tsduck)

---

Hysen Labs editorial analysis, written from the project's own repository and release notes. Cite the canonical page: https://hysenlabs.com/projects/tsduck-tsduck
