Fix 40ms gap in rolling teletext subtitles#2292
Open
alaotach wants to merge 1 commit into
Open
Conversation
Collaborator
CCExtractor CI platform finished running the test files on linux. Below is a summary of the test results, when compared to test for commit 2feb09a...:
Your PR breaks these cases:
NOTE: The following tests have been failing on the master branch as well as the PR:
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. |
Author
|
the test failure is a CI infra 504 timeout, not related to the change so can any maintainer re-trigger the test |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
[FIX] Remove 40ms hide timestamp contraction in
telxcccausing rolling subtitle blinkIn raising this pull request, I confirm the following (please check boxes):
Reason for this PR:
Sanity check:
Fixes
Closes #2288
Problem
When converting DVB teletext subtitles to WebVTT, rolling/scrolling subtitles that update every ~40ms produce a visible blink or flash between cues in players such as Infuse.
The root cause is in
src/lib_ccx/telxcc.c. Thetelxcccomponent hardcodes a 40ms contraction on every subtitle hide timestamp:This was originally intended to hide a subtitle one video frame early on 25fps content. However, the WebVTT exporter independently subtracts 1ms from end timestamps to prevent adjacent cues from sharing the same boundary timestamp. The two reductions combine, producing a ~41ms gap between consecutive rolling teletext cues.
For rolling teletext that updates every ~40ms, this gap is effectively the same duration as a full cue, so compliant players interpret it as the subtitle completely disappearing before the next one appears causing the blink.
Two additional problems with the original approach:
Fix
Remove the 40ms contraction in
telxcc.cand let the WebVTT exporter's existing 1ms gap handle overlap prevention on its own. The 1ms gap is spec-compliant and imperceptible.Repro Instructions
The gap is also directly visible in the raw WebVTT output consecutive cues have a ~40ms hole between the end of one timestamp and the start of the next instead of being contiguous.