Skip to content

Commit

Permalink
Merge pull request #14 from Mtillmann/ext-chapters
Browse files Browse the repository at this point in the history
Added external chapters dep
  • Loading branch information
Mtillmann committed Mar 9, 2024
2 parents 7c11278 + b0846b3 commit 0664f24
Show file tree
Hide file tree
Showing 30 changed files with 26,963 additions and 1,472 deletions.
35 changes: 18 additions & 17 deletions .github/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,24 +10,25 @@ Create and _convert_ chapters for podcasts, youtube, matroska, mkvmerge/nero/vor

## Supported Formats

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

## CLI

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

## Examples & FAQ

[examples.md](/examples.md), [FAQ](/faq.md)
[examples.md](/examples.md), [FAQ](/faq.md)
23 changes: 21 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "chaptertool",
"version": "0.4.5",
"version": "0.5.0",
"description": "Manage and generate chapters for podcasts and other media via cli or web",
"keywords": [
"podcast",
Expand All @@ -16,7 +16,8 @@
"podlove",
"podcast-chapters",
"edl",
"hls"
"hls",
"scenecut"
],
"type": "module",
"main": "chaptertool.js",
Expand All @@ -41,6 +42,7 @@
],
"license": "MIT",
"dependencies": {
"@mtillmann/chapters": "^0.1.0",
"@zip.js/zip.js": "^2.7.32",
"bootstrap": "^5.3.2",
"bootstrap-icons": "^1.11.3",
Expand Down
2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# chaptertool

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.
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.

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

Expand Down
4 changes: 2 additions & 2 deletions src/CLI/ChapterConverter.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { lstatSync, readFileSync, writeFileSync } from "fs";
import { AutoFormat } from "../Formats/AutoFormat.js";
import { AutoFormat } from "@mtillmann/chapters";

export class ChapterConverter {

Expand Down Expand Up @@ -31,4 +31,4 @@ export class ChapterConverter {
psdOmitTimecodes : options.psdOmitTimecodes
}));
}
}
}
8 changes: 4 additions & 4 deletions src/CLI/ChapterGenerator.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ import {lstatSync, mkdirSync, readFileSync, renameSync, unlinkSync, writeFileSyn
import {execSync, spawn} from "child_process";
import {secondsToTimestamp, zeroPad} from "../util.js";
import {addSuffixToPath} from "../cli_util.js";
import {FFMpegInfo} from "../Formats/FFMpegInfo.js";
import {ChaptersJson} from "../Formats/ChaptersJson.js";
import {AutoFormat} from "../Formats/AutoFormat.js";
import {FFMpegInfo} from "@mtillmann/chapters";
import {ChaptersJson} from "@mtillmann/chapters";
import {AutoFormat} from "@mtillmann/chapters";

export class ChapterGenerator {

Expand Down Expand Up @@ -195,4 +195,4 @@ export class ChapterGenerator {
return parseFloat(ffProbeOutput.toString());
}

}
}
66 changes: 0 additions & 66 deletions src/Formats/AppleChapters.js

This file was deleted.

97 changes: 0 additions & 97 deletions src/Formats/AppleHLS.js

This file was deleted.

0 comments on commit 0664f24

Please sign in to comment.