podsync icon indicating copy to clipboard operation
podsync copied to clipboard

Generate chapter marks from youtube description

Open clawoflight opened this issue 4 years ago • 3 comments

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

clawoflight avatar Apr 02 '21 15:04 clawoflight

can you describe how it will work? what should change in the result file?

Rpsl avatar May 13 '21 13:05 Rpsl

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

clawoflight avatar May 13 '21 14:05 clawoflight

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" }

Contextualist avatar Dec 20 '22 08:12 Contextualist