Skip to content

[FIX] Honor 23.976 fps when importing SCC - #2452

Open
harshalsp07 wants to merge 1 commit into
CCExtractor:masterfrom
harshalsp07:fix/scc-23-976-input
Open

harshalsp07 wants to merge 1 commit into
CCExtractor:masterfrom
harshalsp07:fix/scc-23-976-input

Conversation

@harshalsp07

@harshalsp07 harshalsp07 commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

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

Reason for this PR:

  • This PR adds new functionality.
  • This PR fixes a bug that I have personally experienced or that a real user has reported and for which a sample exists.
  • This PR is porting code from C to Rust.

Sanity check:

  • I have read and understood the contributors guide.
  • I have checked that another pull request for this purpose does not exist.
  • If the PR adds new functionality, I've added it to the changelog. If it's just a bug fix, I have NOT added it to the changelog.
  • I am NOT adding new C code unless it's to fix an existing, reproducible bug.

--scc-framerate 23.976 and its 23.98 alias are accepted by the CLI, but SCC import silently uses 29.97 fps. Both spellings become integer value 4; SccFrameRate::from_int() doesn't handle it and falls back to the default.

Add the missing decoder rate and use 1001 / 24 milliseconds per frame. The other rate mappings stay the same.

Reproduce from the repository root with the included 90-byte sample:

ccextractor tests/samples/scc_23_976.scc --scc-framerate 23.976 -o out.srt

The sample contains HI between 00:00:01:12 and 00:00:03:12. On master d7eb132e, the SRT timing is 00:00:01,401 --> 00:00:03,399. With this change it is 00:00:01,501 --> 00:00:03,499. Repeating with 23.98 gives the same corrected timing.

Tested on Linux:

  • cargo test --locked in src/rust: 427 passed. The new SCC parsing test fails without the fix.
  • cargo fmt --all -- --check and cargo clippy -- -D warnings pass.
  • Release CMake build and 172 CLI runs checking all accepted frame-rate spellings, four frame offsets, BOM/CRLF, explicit SCC input and five output formats. All 70 comparisons for previously supported input and rates are byte-identical to master.

This fixes SCC input parsing. #2145 and #2406 concern CEA-708 SCC output timing. Windows/macOS and the external sample platform haven't been tested.

CI note: The initial Linux build stops before compilation because libgpac-dev has no installation candidate on Ubuntu 26.04; #2428 addresses the runner change. The C format check also flags ccx_decoders_isdb.c and mp4.c, which are unchanged from master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant