Closed sandreas closed 2 years ago
I agree that that the generated chapters.txt should include the total duration. I like the special comment form:
## total-duration=00:00:01.500
There should also be some general title information included in chapters.txt. Things like album artist and title. Probably in the same special comment form.
Feel free to open a pull-request for this. Otherwise I will probably add this myself in a few days.
I have committed a change in the new mp4chaps
branch to include metadata at the top of chapter.txt files. Here's an example output:
## artist: Cœur de pirate
## album: Blonde
##
## total-duration: 00:38:37.034
##
00:00:00.000 Lève les voiles
00:01:12.709 Adieu
00:03:40.346 Danse et danse
00:06:50.775 Golden Baby
00:09:57.772 Ava
00:13:14.657 Loin d'ici
00:15:58.494 Les amours dévouées
00:18:26.443 Place de la république
00:22:37.664 Cap diamant
00:25:20.925 Verseau
00:29:14.722 Saint-Laurent
00:32:29.519 La petite mort
00:36:19.140 Hôtel amour
Please take a look. If you agree with the change, I will merge it to the main branch before the 2.1.0 release.
Please take a look. If you agree with the change, I will merge it to the main branch before the 2.1.0 release.
Cool. Looks good to me, some questions I came up with:
CHPT_FMT_NATIVE
in the README.md
to avoid wild growth in other projects?
albumArtist
and artist
really go to the same field name? (## artist:
)
## albumArtist:
Here is a fast and small draft of a spec like chapter for the README.md
:
# CHPT_FMT_NATIVE specification
A file in the `CHPT_FMT_NATIVE` format contains chapter information and
- SHOULD be stored in the form of `<audio-filename>.chapters.txt`, e.g. `an-example.chapters.txt` for `an-example.m4a`
- MUST use the *default time format* `HH:MM:SS.fff` for time declarations (e.g. `00:13:14.657`)
- MUST contain at least one *chapter item* (see below)
Items in `CHPT_FMT_NATIVE` can have three different purposes:
1. chapter items (with start time and title)
2. metadata items (starting with `##` - a special form of comments containing metadata)
3. comments (starting with `#`)
## Chapter items
Chapter items are MANDATORY defined in the following format:
Good idea to add a format specification! But Readme.md is not the right place for it. I've made a few minor changes to the specification, converted it to .texi format and included it in the tool guide (doc/ToolGuide.txt ist generated by make dist
; here is what is currently generated from the mp4chaps branch: ToolGuide.txt).
I've also separated artist
and album-artist
in the latest update. Thanks for that hint as well!
I think the artist and album/title information is important for humans rather than from a technical point of view. I'd like to see at a glance which album/work the chapters apply to when I look at the chapters.txt file. That's why included those fields.
Regarding possible 99 hour limitation, the tools already support more than 2 digits for the hours field. I've added a note to the format description to indicate that more than 2 digits are alright if necessary.
Awesome, thank you for your work. Nothing to add here.
A little typo in A.1.3 Comments
: additional texutal information
=> additional textual information
Is there anything left? Otherwise this ticket can be closed
Great! Thanks for taking a look so quickly!
Fixed the typo, merged the mp4chaps branch and closing this ticket.
I did not find a specification for the
chapters.txt
format,mp4v2
generates and makes use of.One problem with the
chapters.txt
format is, that there is no hint for the total duration of a file, because it contains only the start of a chapter, not the duration or ending. Example:The file could have a total duration 1.5 seconds but also 3.5 seconds or even 1 hour. While comments in the file are already ignored, I tried to use these to support this feature.
It would be also possible, to mark these special comments with an extra
#
and a key-value-pair separated by=
Maybe a more specified approach would be better, what do you think?