Skip to content

Conversation

@sirf
Copy link

@sirf sirf commented Feb 18, 2022

Many SCC files use CRLF line terminators.
Also, some SCC files have a tab between the SMPTE time code and the first hex pair. These changes take care of that.

Also fix incorrect parsing of timecodes and incorrect time handling in general:

  • SCC files should always use a time base of 1001 / 30000, but the old code assumed a time base of 1 / 30
  • The time code at the beginning of each line in an SCC file is not the time at which the caption should be displayed on screen, but rather the time code of the first hex pair, so the current time must be advanced by one frame per hex pair (0.5 frames per hex value) and the caption is displayed at the time when 942f is encountered and removed at 942c

Known issues not fixed in this PR:

  • Handle drop-frame time codes

@sirf sirf changed the title Handle CRLF and tabs in SCC files Handle CRLF and tabs in SCC files, and fix timecode parsing Aug 24, 2022
Copy link
Collaborator

@tobbee tobbee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the very slow response. I haven't checked this repo in a very long time.

Thanks for the PR. It looks good to me.

Since this is DASH-IF code, there is some rules about submissions. Do you work for a company that is a DASH-IF member? Otherwise I'll try to make a variant of the document used for contributions to dash.js.

@sirf
Copy link
Author

sirf commented Nov 17, 2022

Sorry for the very slow response. I haven't checked this repo in a very long time.

No rush. We're using our fork for now.

Since this is DASH-IF code, there is some rules about submissions. Do you work for a company that is a DASH-IF member?

We're not a member of Dash-IF as far as I know.

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.

2 participants