Machine-Readable JSON Report for CCExtractor
# ccextractor#2020
ccextractor --report-format json -out=report sample.ts | jq .
# { "schema": { "version": "1.0" }, ... }
# PAT-based program enumeration — fixes 25-file count mismatch
# has_any_captions now includes DVB + Teletext
# 100% valid JSON across 166 media files / 172-file suiteBackground
CCExtractor's only output format for metadata was human-readable text. Downstream tools (CI pipelines, test harnesses) parsing text output is brittle. GSoC 2026 task: add --report-format json to the -out=report flag.
Root Cause
No structured output existed. Additionally, PAT (Program Association Table) enumeration had a multi-program mismatch bug causing wrong program IDs across 25 test files. has_any_captions only checked CEA-608/708, ignoring DVB and Teletext streams.
The Fix
Implemented a versioned JSON schema (v1.0) using cJSON. Fixed PAT-based program enumeration to correctly map PIDs. Corrected has_any_captions to OR across all four caption types (CEA-608, CEA-708, DVB, Teletext).
Evidence
Validated output against 172-file test suite. 100% valid JSON across all 166 media files that produced output. Schema version field ensures forward compatibility.
Result
PR ccextractor#2020 open. Enables automated CI analysis of CCExtractor output without text parsing.