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

Separators in 'Comma-separated timecode values' section #78

Open
ocram opened this issue Feb 10, 2022 · 4 comments
Open

Separators in 'Comma-separated timecode values' section #78

ocram opened this issue Feb 10, 2022 · 4 comments

Comments

@ocram
Copy link

ocram commented Feb 10, 2022

In the CLI text output, in the section named “Comma-separated timecode values”, is it actually intended behavior that the separators are all commas, both between start and end time of a single event as well as between separate events?

While the comma between start and end times is fine, I guess if the next comma (i.e. every other comma) between two events were replaced with either a semicolon (or a newline), that would simplify processing without any downsides or obvious reasons not to do it.

@Breakthrough
Copy link
Owner

Breakthrough commented Feb 10, 2022

The original intention for this was that you could feed the list of splits to mkvmerge and thus end up with some video clips representing the exact motion events. Since then though, mkvmerge takes a timecode range now, and this output format also isn't very useful for ffmpeg.

Could you share a bit more about your use case for this? I'm open to changing the format, or allowing a CLI option to change the timecode output (maybe as an option when -so is specified) between different formats. Happy to hear any suggestions you or others may have.

@ocram
Copy link
Author

ocram commented Feb 12, 2022

I don’t have any specific use case in mind, only something roughly like the obsolete mkvmerge use case. It’s just that the current output is not really useful for anything, while replacing every other comma with a semicolon (compact) or newline (less compact) would make this a generally useful, CSV-like output for various use cases and processing tasks.

@Breakthrough
Copy link
Owner

Breakthrough commented Feb 12, 2022

The mkvmerge docs use the following syntax:

start1-end1[,[+]start2-end2[,[+]start3-end3...]]

So I would propose using - as a separator, thus the output would be something like:

00:01:20.000-00:02:45.000,00:05:50.000-00:10:30.000

Thoughts? I'm okay making this a breaking change, since this should likely be the default behaviour, and it should be pretty easy to update any scripts relying on the old behaviour to use --split parts[...] with mkvmerge instead of --split timecodes:[...]

@Breakthrough Breakthrough added this to the v1.5 milestone Feb 12, 2022
@ocram
Copy link
Author

ocram commented Feb 12, 2022

So instead of turning (without the spaces)

a , b , c , d

into

a , b ; c , d

turn it into the following?

a - b , c - d

That’s perfect!

@Breakthrough Breakthrough modified the milestones: v1.5, v1.6 Jul 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants