Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
[youtube] video not getting video "chapters" properly #24819
Comments
|
This seems to have broken again in 2020.06.16.1 . The JSON chapter tag is just null with both the mentioned https://www.youtube.com/watch?v=gBRKnvK1JUE and also https://www.youtube.com/watch?v=Vr93xAFmJag . They also have different formats in the description. I found this while investigating if youtube-dl writes these chapters to mkv files. This is not the case, even if this were working in the first place, right? |
|
Actually, I think this is all caused by #25937 . |
|
Chapters are still NULL in 2020.07.28 release |
|
Doesn't work on current master branch, #26297 fixes this. |
#26297 fixes this for https://youtu.be/7LFJ7zSFUa8 and https://youtu.be/fzK79PgKITI |
|
I think that request was already made a couple of times, don't remember what was said about it though. If something breaks, you can just copy the new part of the postprocessor, and put it into a new version of ytdl. |
|
Thank you very very much! --- a/youtube_dl/utils.py
+++ b/youtube_dl/utils.py
@@ -2091,6 +2091,12 @@ def sanitize_filename(s, restricted=False, is_id=False):
return '' if restricted else '\''
elif char == ':':
return '_-' if restricted else ' -'
+ elif char == '|':
+ return chr(65372)
+ elif char == '/':
+ return chr(10744)
+ elif char == '\\':
+ return chr(10745)
elif char in '\\/|*<>':
return '_'
if restricted and (char in '!&\'()[]{}$;`^,#' or char.isspace()): |
|
That's a way more elegant solution than mine, I just changed the def _build_track_name to replace characters with a space. But glad to have helped, still would be real nice to see this functionality implemented into YTDL one day :^) Only problem that I had so far is that it apparently creates a second track per file with length 0, and if you open a split file in f.e. F2K, it shows two tracks, but one is immediately skipped over, nothing unusable, just annoying. |
The 'chapters' value from the JSON (-J parameter), is usually present on some video. But since a few days, it is not available in ANY video. My guess is that's since the new chapter UI of youtube.
Here's a verbose excerpt from youtube version 23.04.2020, not that it looks very useful