Skip to content
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

caption_frame_decode: rework API #60

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

MathieuDuponchelle
Copy link

Fixes #59

  • pop_on mode requires incrementing the frame timestamp until
    end_of_caption is encountered.

  • caption_frame_decode now always updates the timestamp of the
    frame when the timestamp parameter != -1. This requires that callers
    only pass a valid timestamp when a new one is encountered, for
    example with SCC the timestamp at the start of the cue, then -1
    until the next new timestamp.

  • A new enum member is added for the return value, LIBCAPTION_CLEAR.
    It allows the caller to determine that closed captions should not
    be displayed anymore, in order to finish the previous cue earlier
    than the start of the next cue.

Fixes szatmary#59

* pop_on mode requires incrementing the frame timestamp until
  end_of_caption is encountered.

* caption_frame_decode now always updates the timestamp of the
  frame when the timestamp parameter != -1. This requires that callers
  only pass a valid timestamp when a new one is encountered, for
  example with SCC the timestamp at the start of the cue, then -1
  until the next new timestamp.

* A new enum member is added for the return value, LIBCAPTION_CLEAR.
  It allows the caller to determine that closed captions should not
  be displayed anymore, in order to finish the previous cue earlier
  than the start of the next cue.
@MathieuDuponchelle
Copy link
Author

wget https://publish.dvlabs.com/democracynow/360/dn2018-1217.mp4

Before:

orig.txt

After:

new.txt

Rename to .srt if needed, github was refusing that extension

@MathieuDuponchelle
Copy link
Author

ping @szatmary :)

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.

scc2srt: surprising timestamps
1 participant