podsync
podsync copied to clipboard
Generate chapter marks from youtube description
Youtube parses timestamps from the description to show "chapters", it would be great to generate chapter marks from that!
Example:
00:00 - Intro
12:00:00 - Outro
can you describe how it will work? what should change in the result file?
I have seen several extensions to rss/atom for chapters, such as `podcast:chapters, but I think the widest support is based on ID3 chapter metadata. That should work with both mp3 and mp4.
I guess you would prefer doing that in-process rather than calling another tool - the best go id3 library might get support for chapters soon: https://github.com/bogem/id3v2/pull/62
yt-dlp alone can embed the chapters, and here's what I found to be a working solution for audio and iOS Apple Podcast:
# ...
[feeds]
[feeds.feed1]
# ...
# Embed YouTube timestamps as ID3 chapter metadata
youtube_dl_args = ["--embed-chapters"]
# If you are using Apple Podcast, mp3 files' chapter metadata is not supported.
format = "custom"
custom_format = { youtube_dl_format = "bestaudio[ext=m4a]", extension = "m4a" }