@mtillmann/chapters 0.1.3 → 0.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +5 -6
- package/readme.md +26 -25
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mtillmann/chapters",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.5",
|
|
4
4
|
"description": "library that manages and converts chapters of multiple formats",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -34,13 +34,13 @@
|
|
|
34
34
|
"podcast-chapters",
|
|
35
35
|
"edl",
|
|
36
36
|
"hls",
|
|
37
|
-
"scenecut"
|
|
37
|
+
"scenecut"
|
|
38
|
+
],
|
|
38
39
|
"license": "MIT",
|
|
39
40
|
"devDependencies": {
|
|
40
41
|
"@babel/core": "^7.24.0",
|
|
41
42
|
"@babel/preset-env": "^7.24.0",
|
|
42
43
|
"@types/jest": "^29.5.12",
|
|
43
|
-
"@types/jsdom": "^21.1.6",
|
|
44
44
|
"@typescript-eslint/eslint-plugin": "^6.21.0",
|
|
45
45
|
"babel-jest": "^29.7.0",
|
|
46
46
|
"eslint": "^8.57.0",
|
|
@@ -49,14 +49,13 @@
|
|
|
49
49
|
"eslint-plugin-n": "^16.6.2",
|
|
50
50
|
"eslint-plugin-promise": "^6.1.1",
|
|
51
51
|
"jest": "^29.7.0",
|
|
52
|
-
"jest-environment-jsdom": "^29.7.0",
|
|
53
52
|
"rimraf": "^5.0.5",
|
|
54
53
|
"ts-jest": "^29.1.2",
|
|
55
54
|
"tsup": "^8.0.2",
|
|
56
55
|
"typescript": "^5.3.3"
|
|
57
56
|
},
|
|
58
57
|
"dependencies": {
|
|
59
|
-
"
|
|
60
|
-
"
|
|
58
|
+
"fast-xml-parser": "^4.5.1",
|
|
59
|
+
"filenamify": "^6.0.0"
|
|
61
60
|
}
|
|
62
61
|
}
|
package/readme.md
CHANGED
|
@@ -10,25 +10,26 @@ This is the core library of the [chaptertool](https://github.com/Mtillmann/chapt
|
|
|
10
10
|
|
|
11
11
|
## Supported formats
|
|
12
12
|
|
|
13
|
-
| class
|
|
14
|
-
|
|
15
|
-
| ChaptersJson
|
|
16
|
-
| FFMetadata
|
|
17
|
-
| MatroskaXML
|
|
18
|
-
| MKVMergeXML
|
|
19
|
-
| MKVMergeSimple
|
|
20
|
-
| WebVTT
|
|
21
|
-
| Youtube
|
|
22
|
-
| FFMpegInfo
|
|
23
|
-
| PySceneDetect
|
|
24
|
-
| VorbisComment
|
|
25
|
-
| AppleChapters
|
|
26
|
-
| ShutterEDL
|
|
13
|
+
| class | description | key | ext | info |
|
|
14
|
+
| --------------------- | ---------------------------- | -------------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
15
|
+
| ChaptersJson | Podcasting 2.0 Chapters | chaptersjson | `json` | [spec](https://github.com/Podcastindex-org/podcast-namespace/blob/main/chapters/jsonChapters.md) |
|
|
16
|
+
| FFMetadata | FFMetadata | ffmpegdata | `txt` | [spec](https://ffmpeg.org/ffmpeg-formats.html#Metadata-1) |
|
|
17
|
+
| MatroskaXML | Matroska XML chapters | matroskaxml | `xml` | [spec](https://www.matroska.org/technical/chapters.html) |
|
|
18
|
+
| MKVMergeXML | MKVToolNix mkvmerge XML | mkvmergexml | `xml` | [spec](https://mkvtoolnix.download/doc/mkvmerge.html#mkvmerge.chapters) |
|
|
19
|
+
| MKVMergeSimple | MKVToolNix mkvmerge _simple_ | mkvmergesimple | `txt` | [spec](https://mkvtoolnix.download/doc/mkvmerge.html#mkvmerge.chapters) |
|
|
20
|
+
| WebVTT | WebVTT Chapters | webvtt | `vtt` | [spec](https://developer.mozilla.org/en-US/docs/Web/API/WebVTT_API) |
|
|
21
|
+
| Youtube | Youtube Chapter Syntax | youtube | `txt` | |
|
|
22
|
+
| FFMpegInfo | FFMpegInfo | ffmpeginfo | `txt` | read only, used internally |
|
|
23
|
+
| PySceneDetect | PySceneDetect | pyscenedetect | `csv` | [project home](https://github.com/Breakthrough/PySceneDetect) |
|
|
24
|
+
| VorbisComment | Vorbis Comment Format | vorbiscomment | `txt` | [spec](https://wiki.xiph.org/Chapter_Extension) |
|
|
25
|
+
| AppleChapters | "Apple Chapters" | applechapters | `xml` | [source](https://github.com/rigaya/NVEnc/blob/master/NVEncC_Options.en.md#--chapter-string:~:text=CHAPTER03NAME%3Dchapter%2D3-,apple%20format,-(should%20be%20in)) |
|
|
26
|
+
| ShutterEDL | Shutter EDL | edl | `edl` | [source](https://github.com/paulpacifico/shutter-encoder/blob/f3d6bb6dfcd629861a0b0a50113bf4b062e1ba17/src/application/SceneDetection.java) |
|
|
27
27
|
| PodloveSimpleChapters | Podlove Simple Chapters | psc | `xml` | [spec](https://podlove.org/simple-chapters/) |
|
|
28
|
-
| PodloveJson
|
|
29
|
-
| MP4Chaps
|
|
30
|
-
| AppleHLS
|
|
31
|
-
| Scenecut
|
|
28
|
+
| PodloveJson | Podlove Simple Chapters JSON | podlovejson | `json` | [source](https://github.com/podlove/chapters#:~:text=org/%3E-,Encode%20to%20JSON,-iex%3E%20Chapters) |
|
|
29
|
+
| MP4Chaps | MP4Chaps | mp4chaps | `txt` | [source](https://github.com/podlove/chapters#:~:text=%3Achapters%3E-,Encode%20to%20mp4chaps,-iex%3E%20Chapters) |
|
|
30
|
+
| AppleHLS | Apple HLS Chapters | applehls | `json` | [spec](https://developer.apple.com/documentation/http-live-streaming/providing-javascript-object-notation-json-chapters), partial support |
|
|
31
|
+
| Scenecut | Scenecut format | scenecut | `json` | [source](https://github.com/slhck/scenecut-extractor#:~:text=cuts%20in%20JSON-,format,-%3A) |
|
|
32
|
+
| Audible | Audible Chapter Format | audible | `json` | [source](./audible-chapter-spec.md) |
|
|
32
33
|
|
|
33
34
|
## Installation
|
|
34
35
|
|
|
@@ -163,28 +164,28 @@ Some formats support additional options:
|
|
|
163
164
|
#### ChapterJson toString() options
|
|
164
165
|
|
|
165
166
|
| option | type | default | description |
|
|
166
|
-
|
|
167
|
+
| ------------------- | --------- | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
167
168
|
| `imagePrefix` | `string` | `''` | Prefix for image URLs |
|
|
168
169
|
| `writeRedundantToc` | `boolean` | `false` | Write [redundant](https://github.com/Podcastindex-org/podcast-namespace/blob/main/chapters/jsonChapters.md#:~:text=or%20not%20present%20at%20all) TOC attributes |
|
|
169
170
|
| `writeEndTimes` | `boolean` | `false` | Write end times |
|
|
170
171
|
|
|
171
172
|
#### AppleChapters toString() options
|
|
172
173
|
|
|
173
|
-
| option | type | default | description
|
|
174
|
-
|
|
175
|
-
| `acUseTextAttr` | `boolean` | `false` | When set, the text-attribute will be used instead of node textContent
|
|
174
|
+
| option | type | default | description |
|
|
175
|
+
| --------------- | --------- | ------- | ---------------------------------------------------------------------- |
|
|
176
|
+
| `acUseTextAttr` | `boolean` | `false` | When set, the text-attribute will be used instead of node textContent |
|
|
176
177
|
|
|
177
178
|
#### PySceneDetect toString() options
|
|
178
179
|
|
|
179
180
|
| option | type | default | description |
|
|
180
|
-
|
|
181
|
+
| ------------------ | -------- | -------- | ---------------------------------------- |
|
|
181
182
|
| `psdFramerate` | `number` | `23.976` | Framerate of the video file |
|
|
182
183
|
| `psdOmitTimecodes` | `boolen` | `false` | When set, the first line will be omitted |
|
|
183
184
|
|
|
184
185
|
#### Scenecut toString() options
|
|
185
186
|
|
|
186
|
-
| option
|
|
187
|
-
|
|
187
|
+
| option | type | default | description |
|
|
188
|
+
| ----------- | -------- | ------- | --------------------------- |
|
|
188
189
|
| `frameRate` | `number` | `30` | Framerate of the video file |
|
|
189
190
|
| `ptsScale` | `number` | `1` | PTS scale (See below) |
|
|
190
191
|
| `score` | `number` | `0.5` | Score threshold |
|