-
-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feat: support video chapters #388
Feat: support video chapters #388
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #388 +/- ##
========================================
- Coverage 1.24% 1.19% -0.05%
========================================
Files 11 11
Lines 1124 1169 +45
Branches 164 172 +8
========================================
Hits 14 14
- Misses 1110 1155 +45 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
847e779
to
a2d330c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A first glance look very promising, see on minor comment.
Other than that, it looks like we do not have chapters in the timeline below the video like on https://www.nuevodevel.com/nuevo/showcase/chapters ; is it linked to any skin (or something like that) ? I find the chapter button particularly hard to find in general, I like the timeline modification to realize there are chapters.
Just a small ping to inform you that I did not forgot about this PR but the fact that CI is broken forces me to test this a bit on my own machine, and I would like to test it on a real channel with chapters on some videos, and it takes some time. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not working when the video is in S3 cache, because we do not call yt_dlp in scraper.download_video
in such a case.
I assume it would be wiser to add the download of "JSON metadata" in the call to yt_dlp of scraper.download_subtitles
; this call to yt_dlp is always done exactly for the purpose that we want to always do it even when video is in S3 cache.
WDYT?
Yes, that makes sense. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a bug when you move from a video with chapters (A) to a video without chapters (B) : on video B (and C without chapter, ...), we still have the chapters of video A.
I’ve fixed the issue! There were actually two different bugs—one related to timeline modification and another with the Video.js chapter button:
I first tried using Video.js’s built-in methods like I actually think reinitializing is a better approach because when we’re not in a playlist and move from one video to another, Video.js already reinitializes. That’s why this issue only occurred when playing videos in a playlist. Are there any drawbacks that we should consider? WDYT? |
Video.JS is indeed a purely JS library, and it is known that these libraries tend to have issues around attributes reloading. The cost of reloading it is moderate and it brings the good advantage that we are sure to free more underlying bugs / weird situations, so I'm fine with this approach. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM ; please squash your commits into one commit, we do not need implementation history (you can have two commits or more if it adds value to split this, but I feel like one is enough, might be wrong), and I will then merge
c30fbae
to
f79c75c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Fixes #170
Workflow
scrapper
yt-dlp
writes a metadata file calledvideo.info.json
when downloading a video (without an extra yt-dlp call).WEBVTT
file using the chapters.zimui
chaptersPath
invideo.json
.WEBVTT
file.Chapter in player