mirror of
https://github.com/CCExtractor/ccextractor.git
synced 2026-04-20 21:20:28 +00:00
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/CCExtractor/ccextractor/pull/1886
Author: @cfsmp3
Created: 12/23/2025
Status: ✅ Merged
Merged: 12/23/2025
Merged by: @cfsmp3
Base:
master← Head:feat/issue-665-teletext-multi-page📝 Commits (4)
fd06393feat(teletext): Add multi-page extraction with separate output files (#665)cbb5f0bfix(clippy): Use RangeInclusive::contains() instead of manual range check1d9f322docs: Add doxygen comments to should_accept_page functionbe239a5fix: Restore teletext auto-detect mode for single-page extraction📊 Changes
11 files changed (+402 additions, -25 deletions)
View changed files
📝
src/lib_ccx/ccx_common_structs.h(+3 -0)📝
src/lib_ccx/ccx_encoders_common.c(+177 -0)📝
src/lib_ccx/ccx_encoders_common.h(+16 -0)📝
src/lib_ccx/ccx_encoders_srt.c(+31 -11)📝
src/lib_ccx/lib_ccx.h(+8 -2)📝
src/lib_ccx/teletext.h(+31 -2)📝
src/lib_ccx/telxcc.c(+73 -3)📝
src/rust/lib_ccxr/src/teletext.rs(+11 -2)📝
src/rust/src/args.rs(+11 -2)📝
src/rust/src/common.rs(+9 -0)📝
src/rust/src/parser.rs(+32 -3)📄 Description
Summary
This PR implements multi-page teletext extraction as requested in issue #665. Users can now extract multiple teletext pages simultaneously, with each page output to a separate file.
New Features
--tpagearguments: Specify multiple teletext pages using repeated--tpageflags_pNNNsuffixoutput_p397.srt- Page 397 subtitlesoutput_p398.srt- Page 398 subtitles--tpageargument) works exactly as before, without any suffix--tpages-allsupport: Auto-detect and extract all available teletext pages (up to 8)Implementation Details
user_pagesvector to teletext config to store multiple requested pagesencoder_ctxwith on-demand file creationtelxcc.cfor correct file namingMAX_TLT_PAGES_EXTRACT)Files Changed
src/rust/src/args.rs--tpageto accept multiple values viaclap::ArgAction::Appendsrc/rust/src/parser.rsVec<u16>for multiple pages, populateuser_pagessrc/rust/lib_ccxr/src/teletext.rsuser_pagesfield toTeletextConfigsrc/rust/src/common.rsuser_pagesto FFI teletext config structsrc/lib_ccx/teletext.huser_pagesarray and count to C teletext configsrc/lib_ccx/ccx_encoders_common.hsrc/lib_ccx/ccx_encoders_common.cget_teletext_output(),get_teletext_srt_counter(),dinit_teletext_outputs()src/lib_ccx/ccx_encoders_srt.csrc/lib_ccx/telxcc.csrc/lib_ccx/ccx_common_structs.hteletext_pagefield tocc_subtitlestructsrc/lib_ccx/lib_ccx.hMAX_TLT_PAGES_EXTRACTconstantTesting
Test Samples Used
All samples are from the CCExtractor Sample Platform teletext section (view samples).
Multi-Page Samples (Danish TV - DR1)
5d5838bde97e2a8706890f19a1722fae97610c754518ac509acb7ff3776a29aa.mpg3b276ad8bf85741a65d8a36add8fbe990f8d11bfb2a908f2093174edced9baa0.mpgb236a0590b02f8acffa00f18f3e5d62e68e0f5f461dc5e5e428cca3ebc0be7c5.mpgSingle-Page Samples
44c45593fb32e475fe5295046d97796b32ac00289ec4369bb216d1c705804f1a.mpgb8c55aa2e9d6882b3d5f1fa57f3bb63fc8bf39a45bad42c0d5e5de1f2fbdf2e7.mpge639e5455049e9b94c89d7f2917d91c349b9eb8e4ced3ea5f0d5efa7fb56426e.ts--datapid 2310How to Test
Test 1: Single Page Extraction (Backward Compatibility)
Test 2: Multiple Explicit Pages
Test 3: Auto-Detect All Pages
Test 4: Specific Page with --tpage (regression test)
Test Results
All tests passed successfully:
_pNNNsuffixes, separate contentSample Output
Multiple pages extracted from
5d5838bde97e...mpg:Checklist
--tpageworks as before)dinit_teletext_outputs()Closes #665
🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.