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

Machine parsable duration #27

Closed
ghost opened this issue Oct 16, 2017 · 3 comments
Closed

Machine parsable duration #27

ghost opened this issue Oct 16, 2017 · 3 comments

Comments

@ghost
Copy link

ghost commented Oct 16, 2017

Using this file (regionsAllowed=DE,US):

youtube-dl --format 140 --output journey.m4a k5dX9sjXYVk

FFmpeg can get machine parsable duration:

$ ffprobe -v 0 -of csv=p=0 -show_entries stream=duration journey.m4a
610.800998

However TagEditor cannot:

$ tageditor -if journey.m4a
Technical information for "journey.m4a":
  Container format: MPEG-4 Part 14
    Document type                 isom
    Version                       512
    Duration                      10 min 10 s 801 ms
@Martchus
Copy link
Owner

It is printing the duration in the way I like it most. Of course alternative formats could be implemented (like total seconds).

BTW: Maybe using the tagparser library directly is a better approach for what you're trying to achieve. Its API is very simple to use.

@Martchus
Copy link
Owner

Implemented by introducing --time-span-format option:

--time-span-format [measures/colons/seconds]
  specifies the output format for time spans

eg.

  • measures: 3 min 26 s 17 ms 210 µs 800 ns
  • colons: 00:03:26.0172108
  • seconds: 206.0172108

@ghost
Copy link
Author

ghost commented Nov 30, 2017

Confirmed - thanks

$ tageditor -if journey.m4a --time-span-format seconds | grep Duration
    Duration                      610.801
    Duration                      610.800907

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

1 participant