mirror of
https://github.com/CCExtractor/ccextractor.git
synced 2026-07-08 18:06:30 +00:00
[PR #1916] feat(scc): Add configurable frame rate and styled PAC codes for SCC output #2713
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?
Original Pull Request: https://github.com/CCExtractor/ccextractor/pull/1916
State: closed
Merged: Yes
Summary
This PR addresses the remaining items from issue #1191 (SCC/CCD format improvements):
--scc-framerateoption now affects both input parsing AND output encoding (was hardcoded to 29.97fps)Changes
1. SCC Output Frame Rate
scc_frameratetoencoder_cfgandencoder_ctxstructsget_scc_fps()helper function in SCC encoderadd_timestamp()to use configurable frame rate2. Styled PAC (Preamble Address Code) Optimization
get_styled_pac_byte2()- computes byte2 for styled PACs (0x40-0x4F range)row_uses_high_range()- determines which PAC byte range to usewrite_styled_preamble()- writes styled PAC directlycan_use_styled_pac()- checks if optimization applieswrite_cc_buffer_as_scenarist()to use styled PAC when appropriateThis resolves the TODO comment at line 487: "Preamble code need to take into account font as well"
Test plan
Issue Reference
Fixes #1191
🤖 Generated with Claude Code