[PR #2070] Add JSON output format for file report (-out=report=json) #2881

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

📋 Pull Request Information

Original PR: https://github.com/CCExtractor/ccextractor/pull/2070
Author: @Apprentice2907
Created: 1/28/2026
Status: 🔄 Open

Base: masterHead: report-json-output


📝 Commits (2)

  • 94c9bd9 Document existing --timestamp-map option for WebVTT output
  • 911221e Add JSON output support for -out=report via report=json

📊 Changes

6 files changed (+538 additions, -1 deletions)

View changed files

📝 README.md (+16 -0)
📝 src/lib_ccx/ccx_common_option.c (+3 -0)
📝 src/lib_ccx/ccx_common_option.h (+10 -1)
📝 src/lib_ccx/lib_ccx.h (+1 -0)
📝 src/lib_ccx/params_dump.c (+497 -0)
📝 src/rust/src/parser.rs (+11 -0)

📄 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 pull request adds machine-readable JSON output for file reports using:
-out=report=json

Behavior

  • Existing -out=report text output remains unchanged.
  • JSON output is enabled only when explicitly requested.
  • No existing CLI flags or output formats are affected.

JSON Report Content

  • The JSON output mirrors the current text report and includes:
  • Input source and stream mode
  • Program count, program numbers, and PID details (TS)
  • DVB and Teletext subtitle information
  • EIA-608 and CEA-708 caption data
  • Video properties (resolution, aspect ratio, frame rate)
  • MPEG-4 timed text track presence and count

Implementation Notes

  • Introduced a report_format option (text / json).
  • Added print_file_report_json() alongside existing logic.
  • Early dispatch in print_file_report() based on selected format.
  • Rust CLI parser special-cases -out=report=json while preserving existing -out=report behavior.

🔄 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/2070 **Author:** [@Apprentice2907](https://github.com/Apprentice2907) **Created:** 1/28/2026 **Status:** 🔄 Open **Base:** `master` ← **Head:** `report-json-output` --- ### 📝 Commits (2) - [`94c9bd9`](https://github.com/CCExtractor/ccextractor/commit/94c9bd918a883172ce53663d37fc342a06ebfcd5) Document existing --timestamp-map option for WebVTT output - [`911221e`](https://github.com/CCExtractor/ccextractor/commit/911221e55d9db7f0b3b39ec5e2610976ab3e32ed) Add JSON output support for -out=report via report=json ### 📊 Changes **6 files changed** (+538 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `README.md` (+16 -0) 📝 `src/lib_ccx/ccx_common_option.c` (+3 -0) 📝 `src/lib_ccx/ccx_common_option.h` (+10 -1) 📝 `src/lib_ccx/lib_ccx.h` (+1 -0) 📝 `src/lib_ccx/params_dump.c` (+497 -0) 📝 `src/rust/src/parser.rs` (+11 -0) </details> ### 📄 Description <!-- Please prefix your pull request with one of the following: **[FEATURE]** **[FIX]** **[IMPROVEMENT]**. --> **In raising this pull request, I confirm the following (please check boxes):** - [x] 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. - [x] I accept that this submission may not be used, and the pull request closed at the will of the maintainer. - [x] 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. - [ ] I am an active contributor to CCExtractor. --- **Summary** This pull request adds machine-readable JSON output for file reports using: -out=report=json **Behavior** - Existing -out=report text output remains unchanged. - JSON output is enabled only when explicitly requested. - No existing CLI flags or output formats are affected. **JSON Report Content** - The JSON output mirrors the current text report and includes: - Input source and stream mode - Program count, program numbers, and PID details (TS) - DVB and Teletext subtitle information - EIA-608 and CEA-708 caption data - Video properties (resolution, aspect ratio, frame rate) - MPEG-4 timed text track presence and count **Implementation Notes** - Introduced a report_format option (text / json). - Added print_file_report_json() alongside existing logic. - Early dispatch in print_file_report() based on selected format. - Rust CLI parser special-cases -out=report=json while preserving existing -out=report behavior. --- <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:24:25 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/ccextractor#2881