Repository navigation
Chapter/timestamp support #271
Description
Activity
This is a new thing on YouTube and would be cool to see on Peertube for any video or audio. If Peertube could also get the chapters from the file when uploaded and allow the uploader to create and delete chapters would be cool.
I've created a plugin to do this https://www.npmjs.com/package/peertube-plugin-chapters (although you'll have to wait for v0.1.4 to be indexed by PeerTube as v0.1.3 doesn't have the
distfolder). Chapters are entered in the plugins settings tab when editing a video. It uses video.js's chapter support which has a menu in the video menu bar.It has SponsorBlock-like tags, in that they are flagged for other plugins. It does not show them in different colors on the timeline. I think it would make more sense to add segmented timeline support to video.js. The coloring could maybe be part of video.js, or part of this plugin.
It doesn't support uploading a vtt at the moment, although support can easily be added as it creates a WebVTT from the input.
Edit: And the validation and preview does not currently work on the publish page, but does work on the update page. Not sure why yet.
Reacted by Davide Costa and bopolReacted by Beringer Zsolt and Davide CostaReacted by Beringer Zsolt, Davide Costa and Krusty27Hi @samlich! Is there any working example where to see your plugin in production? Does it work in embedded videos as well?
Edit
I found a working link in the issues on your GitHub. The plugin works in the embedded videos, too.Hi @samlich! Is there any working example where to see your plugin in production? Does it work in embedded videos as well?
I should probably put that somewhere, thanks for pointing that out. I'll embed a video in the readme in the next update, and on the webpage which I seem to have not linked anywhere in the repo.
I would like it a lot if PeerTube would support Chapters via ffmetadatafiles:
;FFMETADATA1 major_brand=isom minor_version=512 compatible_brands=isomiso2avc1mp41 encoder=Lavf58.29.100 [CHAPTER] TIMEBASE=1/1000 START=0 END=3036999 title=1st Stream [CHAPTER] TIMEBASE=1/1000 START=3037000 END=6963999 title=2nd Stream [CHAPTER] TIMEBASE=1/1000 START=6964000 END=8097999 title=3rd StreamThat has the advantage that it can be included into the .mp4 directly, so a User who downloads the Video will have the Chapters available in a local video player.
Here https://ikyle.me/blog/2020/add-mp4-chapters-ffmpeg it's described how to add it with ffmpeg easily:
ffmpeg -i INPUT.mp4 -i FFMETADATAFILE -map_metadata 1 -codec copy OUTPUT.mp4Reacted by bopolReacted by Beringer ZsoltThere is already complete #1312, which adds hyperlinks for timecodes in the description. It would be really cool to generate chapters from those timestamps and have visual marks on progress line with small tooltip/label about a chapter.
Hi,
This feature is planned in our 2023 roadmap: https://joinpeertube.org/news/roadmap-v6
If you want to help to fund this feature, you can make a donation on https://support.joinpeertube.orgReacted by Andrew Tropin and Roland- addedPriority: RoadmapFeature planned to be developed in the annual roadmapFeature planned to be developed in the annual roadmap
on Mar 2, 2023 This feature has been implemented in 77b7070 and will be available in PeerTube 6 planned at the end of the year 🎉
Chapters can be set using the web interface:

If not explicitly set by the user, PeerTube will try to import chapters from the video file (mkv for example) or from the remote website (using youtube-dl/yt-dlp).
Chapters are displayed in the player progress bar, on hover:
Reacted by Melissa Avery-Weir and WicklowReacted by Sanpi and Wicklow


nota: this issue is the result of preliminary discussion that happened on framacolibri [in french]. Thanks to HerrNaja, Pouhiou and Chenille33!
Hello all,
Adding chapters to a video could be of great use for authors that want to pinpoint specific parts of a video:
much like in YT's use use case, where chapters are non-existant but timestamps can be reached via a GET attribute (e.g.:
http://pouhioutube.com/masupervideo?t=6m22s). Authors typically add the url(s) of each "chapter" with the corresponding parameters in the description afterwards. This isn't ideal but should definitely be easy to implement and put us on par with YT featurewise.with a WebVTT file given alongside the upload, or when editing the video object after the upload. (standard way to do, but the
.vttfile has to be done beforehand in an editor…).with a simple timestamp given alongside the upload or when editing the video object after the upload. (simple to implement, as a third party plugin exists for video.js)
For either of the last two options, a visual way to make them stand out would be most welcome by authors. It would also put emphasis on structured videos:
I found this already implemented in chemoish/videojs-chapter-thumbnails's third party plugin for video.js.