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

Create an SRT Generation appliance #58

Closed
slifty opened this issue Oct 9, 2020 · 3 comments · Fixed by #67
Closed

Create an SRT Generation appliance #58

slifty opened this issue Oct 9, 2020 · 3 comments · Fixed by #67

Comments

@slifty
Copy link
Member

slifty commented Oct 9, 2020

Task

Description

SRT files are a somewhat standard format for storing closed caption data associated with a video. We have an appliance to generate caption data. This would be an appliance to convert that data into SRT files.

The appliance would be configured to indicate:

  1. The frequency that files should be generated (e.g. one per hour, one per minute, etc).
  2. The file name format.

This would be an appliance that outputs files, which means we need to decide how to handle files. The scope of the appliance would be to write them locally.

@slifty
Copy link
Member Author

slifty commented Jan 29, 2021

Continuing on this line, since it's time to write it!

I would like to move away from the idea that appliances will actually generate files -- leave that to the implementation -- and instead this would generate the content that could be inserted into a file. This means configuration is JUST in terms of what that content would look like.

This appliance would generate SRT groups -- a group is a single set of lines, e.g.

1
00:02:17,440 --> 00:02:20,375
Senator, we're making
our final approach into Coruscant.

The configuration of the appliance would allow the developer to specify at configuration time:

  • Whether to include a counter in the output
  • How to determine the base of the timecode (e.g. what is considered 00:00:00). This will allow the following:
    • 'hourly': every start of an hour resets the counter / timecode.
    • 'daily': every start of a day resets the counter / timecode.
    • 'position': The counter never restarts and timecodes are based on the Payload position of the starting character.
    • ISO 8601 timestamp: The counter never restarts and timecodes are based on offset from the provided timestamp.

As always, it is the responsibility of the developer to decide if / how this data should be actually stored into srt files.

@slifty
Copy link
Member Author

slifty commented Jan 29, 2021

Appliance name proposal: caption-srt-generator which is based on the discussion in #65

We also may want this to be able to output groups individually OR as fully coherant files, depending on configuration (which is why caption-srt-group-generator would be too specific).

@slifty
Copy link
Member Author

slifty commented Feb 18, 2021

This is finished locally, going to push shortly for use in a few implementations.

One thing I'm grappling with is the timecode base. In particular I'm trying to decide if position manipulation should be handled earlier in the processing stream (e.g. at source).

For instance, one model would be for the SRT generation appliance to always use position to determine the correct timestamp, and putting the responsibility on the video source for ensuring the proper program-specific positions are reflected in the payloads.

From there, "clock type" would actually become a source appliance concept.

The alternative would be that the logic for creating rolling "hourly" or "daily" clocks would have to be replicated across multiple appliances that care about that sort of thing.

slifty added a commit that referenced this issue Feb 18, 2021
The SRT generator applicance will convert a TEXT.ATOM stream into
entries in an SRT file.

Issue #58
@slifty slifty mentioned this issue Feb 18, 2021
5 tasks
slifty added a commit that referenced this issue Feb 18, 2021
The SRT generator applicance will convert a TEXT.ATOM stream into
entries in an SRT file.

Issue #58
slifty added a commit that referenced this issue Feb 18, 2021
The SRT generator applicance will convert a TEXT.ATOM stream into
entries in an SRT file.

Issue #58
slifty added a commit that referenced this issue Feb 18, 2021
The SRT generator applicance will convert a TEXT.ATOM stream into
entries in an SRT file.

Issue #58
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 a pull request may close this issue.

1 participant