Skip to content

Commit 0664f24

Browse files
authored
Merge pull request #14 from Mtillmann/ext-chapters
Added external chapters dep
2 parents 7c11278 + b0846b3 commit 0664f24

30 files changed

+26963
-1472
lines changed

.github/readme.md

+18-17
Original file line numberDiff line numberDiff line change
@@ -10,24 +10,25 @@ Create and _convert_ chapters for podcasts, youtube, matroska, mkvmerge/nero/vor
1010

1111
## Supported Formats
1212

13-
| name | key | ext | info |
14-
|-------|------|----------|------|
15-
| Podcasting 2.0 Chapters | chaptersjson | `json` | [spec](https://github.com/Podcastindex-org/podcast-namespace/blob/main/chapters/jsonChapters.md) |
16-
| FFMetadata | ffmpegdata | `txt` | [spec](https://ffmpeg.org/ffmpeg-formats.html#Metadata-1) |
17-
| Matroska XML chapters | matroskaxml | `xml` | [spec](https://www.matroska.org/technical/chapters.html) |
18-
| MKVToolNix mkvmerge XML | mkvmergexml | `xml` | [spec](https://mkvtoolnix.download/doc/mkvmerge.html#mkvmerge.chapters) |
19-
| MKVToolNix mkvmerge _simple_ | mkvmergesimple | `txt` | [spec](https://mkvtoolnix.download/doc/mkvmerge.html#mkvmerge.chapters) |
20-
| WebVTT Chapters | webvtt | `vtt` | [spec](https://developer.mozilla.org/en-US/docs/Web/API/WebVTT_API) |
21-
| Youtube Chapter Syntax | youtube | `txt` | |
22-
| FFMpegInfo | ffmpeginfo | `txt` | read only, used internally |
23-
| PySceneDetect | pyscenedetect | `csv` | [project home](https://github.com/Breakthrough/PySceneDetect) |
24-
| Vorbis Comment Format | vorbiscomment | `txt` | [spec](https://wiki.xiph.org/Chapter_Extension) |
25-
| "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-
| Shutter EDL | edl | `edl` | [source](https://github.com/paulpacifico/shutter-encoder/blob/f3d6bb6dfcd629861a0b0a50113bf4b062e1ba17/src/application/SceneDetection.java) |
27-
| Podlove Simple Chapters | psc | `xml` | [spec](https://podlove.org/simple-chapters/) |
13+
| name | key | ext | info |
14+
|-------|------|--------|------|
15+
| Podcasting 2.0 Chapters | chaptersjson | `json` | [spec](https://github.com/Podcastindex-org/podcast-namespace/blob/main/chapters/jsonChapters.md) |
16+
| FFMetadata | ffmpegdata | `txt` | [spec](https://ffmpeg.org/ffmpeg-formats.html#Metadata-1) |
17+
| Matroska XML chapters | matroskaxml | `xml` | [spec](https://www.matroska.org/technical/chapters.html) |
18+
| MKVToolNix mkvmerge XML | mkvmergexml | `xml` | [spec](https://mkvtoolnix.download/doc/mkvmerge.html#mkvmerge.chapters) |
19+
| MKVToolNix mkvmerge _simple_ | mkvmergesimple | `txt` | [spec](https://mkvtoolnix.download/doc/mkvmerge.html#mkvmerge.chapters) |
20+
| WebVTT Chapters | webvtt | `vtt` | [spec](https://developer.mozilla.org/en-US/docs/Web/API/WebVTT_API) |
21+
| Youtube Chapter Syntax | youtube | `txt` | |
22+
| FFMpegInfo | ffmpeginfo | `txt` | read only, used internally |
23+
| PySceneDetect | pyscenedetect | `csv` | [project home](https://github.com/Breakthrough/PySceneDetect) |
24+
| Vorbis Comment Format | vorbiscomment | `txt` | [spec](https://wiki.xiph.org/Chapter_Extension) |
25+
| "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+
| Shutter EDL | edl | `edl` | [source](https://github.com/paulpacifico/shutter-encoder/blob/f3d6bb6dfcd629861a0b0a50113bf4b062e1ba17/src/application/SceneDetection.java) |
27+
| Podlove Simple Chapters | psc | `xml` | [spec](https://podlove.org/simple-chapters/) |
2828
| Podlove Simple Chapters JSON | podlovejson | `json` | [source](https://github.com/podlove/chapters#:~:text=org/%3E-,Encode%20to%20JSON,-iex%3E%20Chapters) |
29-
| MP4Chaps | mp4chaps | `txt` | [source](https://github.com/podlove/chapters#:~:text=%3Achapters%3E-,Encode%20to%20mp4chaps,-iex%3E%20Chapters) |
29+
| MP4Chaps | mp4chaps | `txt` | [source](https://github.com/podlove/chapters#:~:text=%3Achapters%3E-,Encode%20to%20mp4chaps,-iex%3E%20Chapters) |
3030
| 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 | `json` | [spec](https://github.com/slhck/scenecut-extractor#:~:text=cuts%20in%20JSON-,format,-%3A) |
3132

3233
## CLI
3334

@@ -138,4 +139,4 @@ You can combine config with regular cli options. Evaluation occurs in this order
138139

139140
## Examples & FAQ
140141

141-
[examples.md](/examples.md), [FAQ](/faq.md)
142+
[examples.md](/examples.md), [FAQ](/faq.md)

package-lock.json

+21-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "chaptertool",
3-
"version": "0.4.5",
3+
"version": "0.5.0",
44
"description": "Manage and generate chapters for podcasts and other media via cli or web",
55
"keywords": [
66
"podcast",
@@ -16,7 +16,8 @@
1616
"podlove",
1717
"podcast-chapters",
1818
"edl",
19-
"hls"
19+
"hls",
20+
"scenecut"
2021
],
2122
"type": "module",
2223
"main": "chaptertool.js",
@@ -41,6 +42,7 @@
4142
],
4243
"license": "MIT",
4344
"dependencies": {
45+
"@mtillmann/chapters": "^0.1.0",
4446
"@zip.js/zip.js": "^2.7.32",
4547
"bootstrap": "^5.3.2",
4648
"bootstrap-icons": "^1.11.3",

readme.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# chaptertool
22

3-
Create and _convert_ chapters for podcasts, youtube, matroska, mkvmerge/nero/vorbis, webvtt, ffmpeginfo, ffmetadata, pyscenedetect, apple chapters, edl, podlove simple chapters (xml, json), apple hls chapters and mp4chaps.
3+
Create and _convert_ chapters for podcasts, youtube, matroska, mkvmerge/nero/vorbis, webvtt, ffmpeginfo, ffmetadata, pyscenedetect, apple chapters, edl, podlove simple chapters (xml, json), apple hls chapters, mp4chaps and scenecut.
44

55
The cli tools can automatically create chapters with images from videos using ffmpeg's scene detection.
66

src/CLI/ChapterConverter.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { lstatSync, readFileSync, writeFileSync } from "fs";
2-
import { AutoFormat } from "../Formats/AutoFormat.js";
2+
import { AutoFormat } from "@mtillmann/chapters";
33

44
export class ChapterConverter {
55

@@ -31,4 +31,4 @@ export class ChapterConverter {
3131
psdOmitTimecodes : options.psdOmitTimecodes
3232
}));
3333
}
34-
}
34+
}

src/CLI/ChapterGenerator.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ import {lstatSync, mkdirSync, readFileSync, renameSync, unlinkSync, writeFileSyn
33
import {execSync, spawn} from "child_process";
44
import {secondsToTimestamp, zeroPad} from "../util.js";
55
import {addSuffixToPath} from "../cli_util.js";
6-
import {FFMpegInfo} from "../Formats/FFMpegInfo.js";
7-
import {ChaptersJson} from "../Formats/ChaptersJson.js";
8-
import {AutoFormat} from "../Formats/AutoFormat.js";
6+
import {FFMpegInfo} from "@mtillmann/chapters";
7+
import {ChaptersJson} from "@mtillmann/chapters";
8+
import {AutoFormat} from "@mtillmann/chapters";
99

1010
export class ChapterGenerator {
1111

@@ -195,4 +195,4 @@ export class ChapterGenerator {
195195
return parseFloat(ffProbeOutput.toString());
196196
}
197197

198-
}
198+
}

src/Formats/AppleChapters.js

-66
This file was deleted.

src/Formats/AppleHLS.js

-97
This file was deleted.

0 commit comments

Comments
 (0)