dtmb-sdr
A minimal, vendor-neutral DTMB receiver. It accepts interleaved signed 8-bit complex samples (CI8) from a file or standard input and emits MPEG transport stream packets to a file or standard output.
CI8 file/stdin
-> sample-rate conversion
-> PN945 synchronization and C=3780 equalization
-> QAM64 deinterleaving and soft demapping
-> LDPC, BCH, and descrambling
-> MPEG-TS file/stdout
Hardware acquisition is intentionally outside this repository. Any application that can produce CI8 bytes at a known sample rate can feed the receiver.
Build
Requirements are CMake 3.20+, a C++20 compiler, and Python 3.10+.
For a released platform wheel, installation is simply:
pip install dtmb-sdr
The wheel contains the native receiver executables and required LDPC data; no separate source checkout or CMake build is required.
To build from a source checkout:
python -m pip install -e ".[dev]"
cmake -S core/cpp -B build/core-cpp -DDTMB_CORE_BUILD_TESTS=ON
cmake --build build/core-cpp --config Release
ctest --test-dir build/core-cpp -C Release --output-on-failure
pytest
Build a distributable wheel with:
python -m build --wheel
Prebuilt wheels use the portable CPU decoder. CUDA requires a source build with a supported NVIDIA toolkit.
Decode a CI8 file
dtmb-decode \
--input capture.ci8 \
--input-rate 16000000 \
--output recovered.ts \
--acceleration cpu \
--error-policy continue
The default profile is QAM64, FEC rate 0.6, interleaver mode 2
(--system-info-index 22). Profiles 19 through 24 select the supported QAM64
FEC/interleaver combinations.
Strict mode is the default. --error-policy continue omits unclean frames and
adds MPEG-TS discontinuity indications before later clean output.
Optional CUDA LDPC acceleration
CPU decoding is the portable baseline. Build the optional CUDA LDPC backend when a supported NVIDIA toolchain is available:
cmake -S core/cpp -B build/core-cpp-cuda \
-DDTMB_CORE_ENABLE_CUDA_LDPC=ON \
-DDTMB_CORE_BUILD_TESTS=ON
cmake --build build/core-cpp-cuda --config Release
Then select it explicitly:
dtmb-decode \
--bin-dir build/core-cpp-cuda \
--input capture.ci8 \
--input-rate 16000000 \
--output recovered.ts \
--acceleration cuda
The CUDA backend batches LDPC codewords and reports host-to-device, kernel, device-to-host, and total timing metrics. CPU remains available as the correctness and portability reference.
Decode a pipe
Use - for stdin or stdout:
ci8-producing-command |
dtmb-decode --input - --input-rate 16000000 --output recovered.ts
The source command is deliberately unspecified: the receiver depends only on the byte-stream contract, not an SDR vendor or device API.
Play while decoding
With ffplay:
ci8-producing-command |
dtmb-decode --input - --input-rate 16000000 --output - --error-policy continue |
ffplay -fflags nobuffer -flags low_delay -f mpegts -
With VLC:
ci8-producing-command |
dtmb-decode --input - --input-rate 16000000 --output - \
--error-policy continue |
vlc - --demux=ts
The producer owns the SDR device, tuning and capture policy. dtmb-decode
only consumes CI8 bytes, so the same receiver command works with a
hardware adapter, a vendor utility or another SDR framework on any platform.
Keep diagnostics on stderr; stdout is binary MPEG-TS.
Long-running receiver controls are explicit and off by default. A deployment that has independently validated them for its RF environment can enable:
ci8-producing-command |
dtmb-decode --input - --input-rate 16000000 --output - \
--pn-schedule-tracking \
--source-frame-confidence inverse-mse \
--resample-headroom-db 6 \
--error-policy continue |
vlc - --demux=ts
The receiver inserts bounded 64 MiB queues after bulk stages by default so
capture, frontend, demapping and FEC can progress concurrently. Use
--pipeline-buffer-mib 0 only for controlled diagnostics. These options are
not universal RF defaults and do not replace transport or codec validation.
Playback quality depends on RF quality and FEC cleanliness. A player detecting a service is not evidence that the complete stream is error-free.
Inspect MPEG-TS output
dtmb-ts-analyze recovered.ts
ffprobe -v error -show_programs -show_streams recovered.ts
Scope
Included:
- portable C++20 receive stages;
- CI8 file and stdin integration;
- MPEG-TS file and stdout output;
- required LDPC matrices;
- core and pipeline-construction tests.
Not included:
- SDR drivers or hardware-control code;
- capture recipes, device identifiers, frequencies, gains, or locations;
- signal-generation, scanning, UI, visualization, sweep, or research tooling;
- real broadcast captures or derived analysis artifacts.
License
MIT. See LICENSE and THIRD_PARTY.md.
Metadata
Release files for dtmb-sdr 0.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| dtmb_sdr-0.3.0.tar.gz | 635.9 kB | Details |
Built distributions (wheels)
| File | Reset | |||
|---|---|---|---|---|
| dtmb_sdr-0.3.0-py3-none-win_amd64.whl | Python 3 | none | Windows x86-64 | Details |
| dtmb_sdr-0.3.0-py3-none-musllinux_1_2_x86_64.whl | Python 3 | none | Linux musl 1.2+ x86-64 | Details |
| dtmb_sdr-0.3.0-py3-none-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl | Python 3 | none | Linux glibc 2.24+ x86-64, Linux glibc 2.28+ x86-64 | Details |
| dtmb_sdr-0.3.0-py3-none-macosx_11_0_arm64.whl | Python 3 | none | macOS 11.0+ ARM64 | Details |
| dtmb_sdr-0.3.0-py3-none-macosx_10_9_x86_64.whl | Python 3 | none | macOS 10.9+ x86-64 | Details |
Total release size: 6.4 MB
Release files / dtmb_sdr-0.3.0.tar.gz
| Download URL | dtmb_sdr-0.3.0.tar.gz |
|---|---|
| Size | 635.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
38f96ceb1b6bdad0ab08ecd6eaafbf9e0b1408842f5908de62cc44f39306d8f4
|
|
BLAKE2b-256 checksum How to use checksums |
52f78f1652bad8feefdb34c3f2577981daa64dc6a9eefa44eeef644003e4e3d8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 13, 2026.
Transparency logRelease files / dtmb_sdr-0.3.0-py3-none-win_amd64.whl
| Download URL | dtmb_sdr-0.3.0-py3-none-win_amd64.whl |
|---|---|
| Size | 944.7 kB |
| Tags | Python 3 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
7c809f57b7c30d60f9efa067ff5da45abda3425bb0ae0cfdd171ba1510a40df9
|
|
BLAKE2b-256 checksum How to use checksums |
a6a0a111467b78418a4ed94fe4db93edaf4773452fbd50d7f43288a0f12d68cc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 13, 2026.
Transparency logRelease files / dtmb_sdr-0.3.0-py3-none-musllinux_1_2_x86_64.whl
| Download URL | dtmb_sdr-0.3.0-py3-none-musllinux_1_2_x86_64.whl |
|---|---|
| Size | 2.0 MB |
| Tags | Linux musl 1.2+ x86-64 Python 3 |
|
SHA-256 checksum How to use checksums |
99c08b696e754716925449501b1ee34d057d99e13575be52ec2dd5bd52132ff1
|
|
BLAKE2b-256 checksum How to use checksums |
8605f2da67d9a89f7b280f08988ebabb6cfd0a9da2f4336b26c1489d823f0817
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 13, 2026.
Transparency logRelease files / dtmb_sdr-0.3.0-py3-none-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
| Download URL | dtmb_sdr-0.3.0-py3-none-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 984.7 kB |
| Tags | Linux glibc 2.24+ x86-64 Linux glibc 2.28+ x86-64 Python 3 |
|
SHA-256 checksum How to use checksums |
e477d016421eba7843dce7c00b87deaac0aac79eb157c3946a791e8ec117b1b4
|
|
BLAKE2b-256 checksum How to use checksums |
1fbaf075638f5549f8d963f54f2a5f25659ec59c09741abbd6a2a42358133665
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 13, 2026.
Transparency logRelease files / dtmb_sdr-0.3.0-py3-none-macosx_11_0_arm64.whl
| Download URL | dtmb_sdr-0.3.0-py3-none-macosx_11_0_arm64.whl |
|---|---|
| Size | 900.4 kB |
| Tags | Python 3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
3be43bf187c29080664205801b593099b080805ca5425005f4c06d52919779d0
|
|
BLAKE2b-256 checksum How to use checksums |
8f7a321658bed5eda8c1b782caf0d2e1751821dd2f05a0d04f5ea31a08df9909
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 13, 2026.
Transparency logRelease files / dtmb_sdr-0.3.0-py3-none-macosx_10_9_x86_64.whl
| Download URL | dtmb_sdr-0.3.0-py3-none-macosx_10_9_x86_64.whl |
|---|---|
| Size | 931.7 kB |
| Tags | Python 3 macOS 10.9+ x86-64 |
|
SHA-256 checksum How to use checksums |
7bd288579b355a89c33159b77ffae15ad7bd49e7f6794f2d17ba3b035fd6a5fe
|
|
BLAKE2b-256 checksum How to use checksums |
7921e4da17ef2798aca201ce3236749897cfa6d7540fb63e32bae5a17927fdc0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 13, 2026.
Transparency log