-
Notifications
You must be signed in to change notification settings - Fork 533
fix: Correct progress time display for multi-program TS files #2007
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Multi-program transport stream files can have different PCR (Program Clock Reference) bases for each program. For example, one program might have timestamps starting at 23 hours, another at 25 hours. This caused the progress time display to show wildly incorrect values like "265:45" for a 6-second file. The fix tracks the minimum timestamp offset seen across all programs and uses that as the baseline. When timestamps from programs with higher PCR bases are encountered (offset > 60 seconds from minimum), the display falls back to showing time relative to the minimum baseline. Changes: - Add min_global_timestamp_offset field to lib_ccx_ctx to track the minimum PCR-based offset seen - Update progress display logic in general_loop.c to normalize times relative to the minimum offset - Apply same fix to both live stream and file processing modes Test results with multi-program DVB teletext sample (dvbt.ts): - Before: 1% | 265:45, 2% | 00:00, 3% | 263:11, ... (jumping wildly) - After: 1% | 00:00, 2% | 00:00, ... 87% | 00:05, 100% | 00:00 (stable) Single-program files continue to work correctly. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
When a test times out due to exceeding the maximum runtime limit, the GitHub status was set to ERROR but without a target_url. This made it impossible for users to click through to see what happened - they would just see "ERROR" with no link. Root cause: In delete_expired_instances(), update_status_on_github() was called without the target_url parameter, which resulted in GitHub displaying a null/empty URL. Fix: Build the target_url (using url_for with fallback for non-request context) and pass it to update_status_on_github() so users can navigate to the test page to see results even when a test times out. Discovered while investigating why CCExtractor/ccextractor#2007 Linux test showed ERROR on GitHub with no clickable link. Test #7736 had run for ~4 hours, executed 116 regression tests (105 failed), but was canceled due to time limit. The test page existed and showed results, but GitHub had no link to it. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
When a test times out due to exceeding the maximum runtime limit, the GitHub status was set to ERROR but without a target_url. This made it impossible for users to click through to see what happened - they would just see "ERROR" with no link. Root cause: In delete_expired_instances(), update_status_on_github() was called without the target_url parameter, which resulted in GitHub displaying a null/empty URL. Fix: Build the target_url (using url_for with fallback for non-request context) and pass it to update_status_on_github() so users can navigate to the test page to see results even when a test times out. Discovered while investigating why CCExtractor/ccextractor#2007 Linux test showed ERROR on GitHub with no clickable link. Test #7736 had run for ~4 hours, executed 116 regression tests (105 failed), but was canceled due to time limit. The test page existed and showed results, but GitHub had no link to it. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
CCExtractor CI platform finished running the test files on linux. Below is a summary of the test results, when compared to test for commit 0228fbc...:
Your PR breaks these cases:
Congratulations: Merging this PR would fix the following tests:
It seems that not all tests were passed completely. This is an indication that the output of some files is not as expected (but might be according to you). Check the result page for more info. |
CCExtractor CI platform finished running the test files on windows. Below is a summary of the test results, when compared to test for commit 0228fbc...:
Your PR breaks these cases:
Congratulations: Merging this PR would fix the following tests:
It seems that not all tests were passed completely. This is an indication that the output of some files is not as expected (but might be according to you). Check the result page for more info. |
Summary
Problem
Multi-program TS files can have different PCR (Program Clock Reference) bases for each program. For example:
When processing such files, the progress time would jump between values based on which program's data was being processed:
This was confusing for a 6-second file!
Solution
Track the minimum timestamp offset seen across all programs and use that as the baseline:
min_global_timestamp_offsetfield to track minimum (global_timestamp - min_global_timestamp)current_offset - min_offsetas the timeTest Results
Multi-program DVB teletext sample (dvbt.ts, 6 seconds):
1% | 265:45,2% | 00:00,3% | 263:11... (jumping wildly)1% | 00:00,2% | 00:00...87% | 00:05,100% | 00:00(stable 0-5 second range)Single-program DVB subtitle sample:
0% | 00:00...100% | 00:34(no change, still works correctly)Test plan
🤖 Generated with Claude Code