mirror of
https://github.com/CCExtractor/ccextractor.git
synced 2026-07-08 18:06:30 +00:00
[PR #1859] [MERGED] fix(mcc): Add MCC output support for raw caption files #2628
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/1859
Author: @cfsmp3
Created: 12/20/2025
Status: ✅ Merged
Merged: 12/20/2025
Merged by: @cfsmp3
Base:
master← Head:fix/issue-1542-mcc-output-from-raw📝 Commits (1)
d0d46fcfix(mcc): Add MCC output support for raw caption files📊 Changes
1 file changed (+65 additions, -3 deletions)
View changed files
📝
src/lib_ccx/general_loop.c(+65 -3)📄 Description
Summary
Fixes #1542 - MCC output now works with raw caption input files.
Previously, when using
-out=mccwith raw input files (-in=raw), CCExtractor would print "Output format not supported" repeatedly and produce no output. This was because the raw file processing path decoded CEA-608 data to text, but MCC format requires raw cc_data bytes wrapped in CDP (Caption Distribution Packet) format.Changes
Added
process_raw_for_mcc()helper function ingeneral_loop.cthat:mcc_encode_cc_data()Modified
raw_loop()to detect MCC output format and use the new code path instead of the normal decoder pathTest plan
Test 1: Basic raw file to MCC conversion
Test 2: MCC file content verification
Test 3: Timing progression validation
✅ Timing correctly progresses from 00:00:00:00 to 00:02:55:19 (matching Max PTS)
Test 4: Caption data verification
The MCC output contains actual CEA-608 control codes and text:
✅ Matches raw file hex dump:
9426 94ad 9470 9470 5bc1 4c4c→ "[ALL..."Test 5: Large file (18 hours of content)
✅ Processes 18 hours of raw caption data correctly
Test 6: Regression test - SRT output still works
✅ SRT output still works correctly
Test 7: All Rust tests pass
Test 8: Code quality checks
🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.