[PR #1912] [MERGED] Automatic extraction of multiple DVB subtitle streams (--split-dvb-subs) fixes#447 #1864 #2703

Open
opened 2026-01-29 17:23:30 +00:00 by claunia · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/CCExtractor/ccextractor/pull/1912
Author: @Rahul-2k4
Created: 12/26/2025
Status: Merged
Merged: 1/18/2026
Merged by: @cfsmp3

Base: masterHead: final


📝 Commits (10+)

  • 6642973 CLI + option plumbing for --split-dvb-subs
  • 77f3fd3 Fix #447: Resolve DVB split mode crash and routing logic
  • 182b23a Merge branch 'CCExtractor:master' into final
  • 9a2fe62 Switch platform toolset from v145 to v143 for GitHub Actions compatibility
  • 4e0472b Fix DVB split critical bugs: per-pipeline state separation and timing sync
  • 557774b Apply code style fixes from clang-format
  • 43d5ba2 Improve error message for incompatible OutputFormat in Rust parser
  • bdc3eaa Fix: update Rust parser to allow text based formats for DVB split
  • f9b5e08 Remove duplicate comment in parser.rs
  • d3602ec Fix: Defensive handling of invalid caption_field in DVB subtitle timing (fixes #447)

📊 Changes

54 files changed (+2607 additions, -445 deletions)

View changed files

📝 .gitignore (+63 -0)
📝 docs/CHANGES.TXT (+8 -0)
docs/DVB_DEDUPLICATION_TECHNICAL_REPORT.md (+115 -0)
docs/DVB_SPLIT_FIX_TECHNICAL_REPORT.md (+88 -0)
📝 linux/Makefile.am (+4 -2)
📝 mac/Makefile.am (+4 -2)
📝 src/ccextractor.c (+2 -0)
📝 src/lib_ccx/CMakeLists.txt (+11 -4)
📝 src/lib_ccx/cc_bitstream.h (+16 -16)
📝 src/lib_ccx/ccx_common_option.c (+3 -0)
📝 src/lib_ccx/ccx_common_option.h (+3 -1)
📝 src/lib_ccx/ccx_common_platform.h (+122 -122)
📝 src/lib_ccx/ccx_decoders_common.c (+52 -6)
📝 src/lib_ccx/ccx_decoders_isdb.c (+64 -16)
📝 src/lib_ccx/ccx_demuxer.c (+8 -0)
📝 src/lib_ccx/ccx_demuxer.h (+28 -2)
📝 src/lib_ccx/ccx_encoders_common.c (+17 -4)
📝 src/lib_ccx/ccx_encoders_common.h (+7 -7)
📝 src/lib_ccx/ccx_encoders_sami.c (+4 -4)
📝 src/lib_ccx/ccx_encoders_smptett.c (+4 -4)

...and 34 more files

📄 Description

In raising this pull request, I confirm the following (please check boxes):

I have read and understood the contributors guide
.

  • I have checked that another pull request for this purpose does not exist.
  • I have considered, and confirmed that this submission will be valuable to others.
  • I accept that this submission may not be used, and the pull request closed at the will of the maintainer.
  • I give this submission freely, and claim no ownership to its content.
  • I have mentioned this change in the changelog

.

My familiarity with the project is as follows (check one):

  • I have never used CCExtractor.
  • I have used CCExtractor just a couple of times.
  • I absolutely love CCExtractor, but have not contributed previously.
  • I am an active contributor to CCExtractor.

Summary

This PR completes verification of Issue #447 and applies a few small but necessary fixes identified during review. The --split-dvb-subs feature is confirmed to work correctly with real DVB broadcast samples.

Key points

Verified multi-stream DVB subtitle extraction end-to-end using a real broadcast TS.

Applied 3 minor code-review fixes:

  • Fix escaped newline in DVB debug logging.
  • Remove hardcoded debug PID values.
  • Improve language-code validation to accept uppercase letters.
  • Confirmed legacy (non-split) behavior remains unaffected.

Test sample clarification

  • The originally referenced file (arte_multiaudio.ts) was not suitable for validation:
  • DVB subtitle streams were advertised in the PMT
  • No actual DVB subtitle bitmap packets were present
  • Testing was therefore redone using a proper broadcast capture containing real DVB subtitles:
    https://tsduck.io/streams/france-dttv/tnt-uhf30-546MHz-2019-01-22.ts

Expected / observed behavior:

  • Separate output files are created per DVB subtitle stream.
  • Only streams that actually broadcast subtitle packets produce non-empty output.
  • Streams advertised in PMT but carrying no subtitle data result in empty files.
  • This matches normal DVB broadcast behavior and is not a bug.

Results:

  • Valid SRT output extracted ✔
  • Empty streams handled safely ✔
  • Invalid flag combinations rejected ✔
  • No crashes or regressions ✔

Fixes and verification for Issue #447.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/CCExtractor/ccextractor/pull/1912 **Author:** [@Rahul-2k4](https://github.com/Rahul-2k4) **Created:** 12/26/2025 **Status:** ✅ Merged **Merged:** 1/18/2026 **Merged by:** [@cfsmp3](https://github.com/cfsmp3) **Base:** `master` ← **Head:** `final` --- ### 📝 Commits (10+) - [`6642973`](https://github.com/CCExtractor/ccextractor/commit/6642973c63355d1b9384166edd3531006cf44731) CLI + option plumbing for --split-dvb-subs - [`77f3fd3`](https://github.com/CCExtractor/ccextractor/commit/77f3fd35f4569442fcaa0efcaf453d7faf9932a6) Fix #447: Resolve DVB split mode crash and routing logic - [`182b23a`](https://github.com/CCExtractor/ccextractor/commit/182b23a283af338ddeeb25798266a41280399ef1) Merge branch 'CCExtractor:master' into final - [`9a2fe62`](https://github.com/CCExtractor/ccextractor/commit/9a2fe6221ee0e9a165a686b27778f305c5719c71) Switch platform toolset from v145 to v143 for GitHub Actions compatibility - [`4e0472b`](https://github.com/CCExtractor/ccextractor/commit/4e0472bddf0349f5eb1b7e6e82ba8ace4e664af3) Fix DVB split critical bugs: per-pipeline state separation and timing sync - [`557774b`](https://github.com/CCExtractor/ccextractor/commit/557774b2021869aff1cfe2b6fa1217ff07197270) Apply code style fixes from clang-format - [`43d5ba2`](https://github.com/CCExtractor/ccextractor/commit/43d5ba2f34a6aa2d9b11aa3f15d2e5d614949170) Improve error message for incompatible OutputFormat in Rust parser - [`bdc3eaa`](https://github.com/CCExtractor/ccextractor/commit/bdc3eaa81b6bddec584ff5a3b40b48831e974215) Fix: update Rust parser to allow text based formats for DVB split - [`f9b5e08`](https://github.com/CCExtractor/ccextractor/commit/f9b5e081a704393c222525fe9b7a7ae85fad3135) Remove duplicate comment in parser.rs - [`d3602ec`](https://github.com/CCExtractor/ccextractor/commit/d3602ec938570a58e4bffc6ae4df2eecd57db383) Fix: Defensive handling of invalid caption_field in DVB subtitle timing (fixes #447) ### 📊 Changes **54 files changed** (+2607 additions, -445 deletions) <details> <summary>View changed files</summary> 📝 `.gitignore` (+63 -0) 📝 `docs/CHANGES.TXT` (+8 -0) ➕ `docs/DVB_DEDUPLICATION_TECHNICAL_REPORT.md` (+115 -0) ➕ `docs/DVB_SPLIT_FIX_TECHNICAL_REPORT.md` (+88 -0) 📝 `linux/Makefile.am` (+4 -2) 📝 `mac/Makefile.am` (+4 -2) 📝 `src/ccextractor.c` (+2 -0) 📝 `src/lib_ccx/CMakeLists.txt` (+11 -4) 📝 `src/lib_ccx/cc_bitstream.h` (+16 -16) 📝 `src/lib_ccx/ccx_common_option.c` (+3 -0) 📝 `src/lib_ccx/ccx_common_option.h` (+3 -1) 📝 `src/lib_ccx/ccx_common_platform.h` (+122 -122) 📝 `src/lib_ccx/ccx_decoders_common.c` (+52 -6) 📝 `src/lib_ccx/ccx_decoders_isdb.c` (+64 -16) 📝 `src/lib_ccx/ccx_demuxer.c` (+8 -0) 📝 `src/lib_ccx/ccx_demuxer.h` (+28 -2) 📝 `src/lib_ccx/ccx_encoders_common.c` (+17 -4) 📝 `src/lib_ccx/ccx_encoders_common.h` (+7 -7) 📝 `src/lib_ccx/ccx_encoders_sami.c` (+4 -4) 📝 `src/lib_ccx/ccx_encoders_smptett.c` (+4 -4) _...and 34 more files_ </details> ### 📄 Description In raising this pull request, I confirm the following (please check boxes): I have read and understood the [contributors guide](https://github.com/CCExtractor/ccextractor/blob/master/.github/CONTRIBUTING.md) . - [x] I have checked that another pull request for this purpose does not exist. - [x] I have considered, and confirmed that this submission will be valuable to others. - [ ] I accept that this submission may not be used, and the pull request closed at the will of the maintainer. - [ ] I give this submission freely, and claim no ownership to its content. - [x] I have mentioned this change in the [changelog](https://github.com/CCExtractor/ccextractor/blob/master/docs/CHANGES.TXT) . My familiarity with the project is as follows (check one): - [ ] I have never used CCExtractor. - [x] I have used CCExtractor just a couple of times. - [ ] I absolutely love CCExtractor, but have not contributed previously. - [x] I am an active contributor to CCExtractor. ______________________________________________________________________________________________________________________________________ ### **Summary** This PR completes verification of Issue #447 and applies a few small but necessary fixes identified during review. The --split-dvb-subs feature is confirmed to work correctly with real DVB broadcast samples. ### **Key points** Verified multi-stream DVB subtitle extraction end-to-end using a real broadcast TS. ### **Applied 3 minor code-review fixes:** - Fix escaped newline in DVB debug logging. - Remove hardcoded debug PID values. - Improve language-code validation to accept uppercase letters. - Confirmed legacy (non-split) behavior remains unaffected. _______________________________________________________________________________________________________________________________________ ### **Test sample clarification** - The originally referenced file (arte_multiaudio.ts) was not suitable for validation: - DVB subtitle streams were advertised in the PMT - No actual DVB subtitle bitmap packets were present - Testing was therefore redone using a proper broadcast capture containing real DVB subtitles: https://tsduck.io/streams/france-dttv/tnt-uhf30-546MHz-2019-01-22.ts _______________________________________________________________________________________________________________________________________ ### **Expected / observed behavior:** - Separate output files are created per DVB subtitle stream. - Only streams that actually broadcast subtitle packets produce non-empty output. - Streams advertised in PMT but carrying no subtitle data result in empty files. - This matches normal DVB broadcast behavior and is not a bug. _______________________________________________________________________________________________________________________________________ ### **Results:** - Valid SRT output extracted ✔ - Empty streams handled safely ✔ - Invalid flag combinations rejected ✔ - No crashes or regressions ✔ _______________________________________________________________________________________________________________________________________ ### **Related issue** Fixes and verification for Issue #447. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
claunia added the pull-request label 2026-01-29 17:23:30 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/ccextractor#2703