You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
first i would like to thank you for this useful mp4 toolset. Great work!
When exporting, modifying and re-importing chapters, i came across an issue that i would like to discuss before taking the time for a pull request. Since i did not find a specification of the chapters.txt format, let me point what i know
*.chapters.txt contains the following format:
format per line
start of the chapter, e.g. 00:00:00.000
whitespace
title of the chapter as string
Comment lines (lines starting with # or whitespace followed by # (e.g. #) are ignored
Problems:
Total duration of the file cannot be determined, because start of the last chapter does not include this information
Invalid lines starting with none of these, e.g. a 00:22:34.721 testing lead to crash / freeze of mp4chaps
Importing chapters.txt with chapters LATER than the total file duration (e.g. importing chapter that starts at 5 mins to a file that is only 2 mins lead to undefined behaviour)
This sample can be successfully imported to a file longer than 5:53.382:
# comment line 1 is ignored
00:00:00.000 Intro
# comment line 2 is ignored
00:02:34.711 Chapter 1
00:03:31.640 Chapter 2
00:04:22.724 Chapter 3
00:05:53.382 Chapter 4
Unfortunately the format does not allow to determine or calculate total length of the file only with the *.chapters.txt file without re-analysing the original mp4 file.
My use case:
Parsing a *.chapters.txt with a shell script
Adding an Intro and Outro chapter of a fixed length
Re-importing the *.chapters.txt
mp4info can get the total duration but since the output format is different AND the chapter files should be parsed on another system, than the original files are it would be great, if the *.chapters.txt format could be extended to contain the total length of the file. It would make things a lot easier for my use case.
I would suggest the following extension, where a comment starting with a specific keyword, e.g. total-length followed by whitespace and then the value of the keyword would contain the required information:
This extension would also allow to add other keywords, if required (e.g. codec, filesize or other meta tags of the file) but for now the missing information of total length would be great to have.
What do you think? If you are satisfied with the extended specification I could try to implement this feature and submit a pull request...
The text was updated successfully, but these errors were encountered:
Hello,
first i would like to thank you for this useful mp4 toolset. Great work!
When exporting, modifying and re-importing chapters, i came across an issue that i would like to discuss before taking the time for a pull request. Since i did not find a specification of the
chapters.txt
format, let me point what i know*.chapters.txt
contains the following format:00:00:00.000
#
or whitespace followed by#
(e.g.#
) are ignoredProblems:
a 00:22:34.721 testing
lead to crash / freeze ofmp4chaps
This sample can be successfully imported to a file longer than 5:53.382:
Unfortunately the format does not allow to determine or calculate total length of the file only with the
*.chapters.txt
file without re-analysing the originalmp4
file.My use case:
*.chapters.txt
with a shell script*.chapters.txt
mp4info
can get the total duration but since the output format is different AND the chapter files should be parsed on another system, than the original files are it would be great, if the*.chapters.txt
format could be extended to contain the total length of the file. It would make things a lot easier for my use case.I would suggest the following extension, where a comment starting with a specific keyword, e.g.
total-length
followed by whitespace and then the value of the keyword would contain the required information:This extension would also allow to add other keywords, if required (e.g. codec, filesize or other meta tags of the file) but for now the missing information of total length would be great to have.
What do you think? If you are satisfied with the extended specification I could try to implement this feature and submit a pull request...
The text was updated successfully, but these errors were encountered: