isamert / empv.el

An Emacs media player, media library manager, radio player, YouTube frontend
GNU General Public License v3.0
103 stars 18 forks source link

Create: Chapter And Bookmark Metadata #79

Closed tvraman closed 2 months ago

tvraman commented 3 months ago
  1. After some research, turns out that ffmpeg can be used to add chapter and bookmarks to mp3 files. https://www.reddit.com/r/ffmpeg/comments/nyfx7a/is_there_a_correct_way_to_write_chapters_to_a_mp3/.rss
  2. Lots of content on Youtube have such bookmarks and chapter marks.
  3. Could we teach empv to:
    1. Add such bookmarks to local mp3 files?
    2. Update the downloader to preserve or recreate such marks if they were originally present?
isamert commented 2 months ago

Update the downloader to preserve or recreate such marks if they were originally present?

I believe this is a good addition and probably yt-dlp already supports this, a quick look revealed the --embed-metadata option, which should include the metadata to files. Adding a variable for yt-dlp options should do the trick (so that user can add --embed-metadata and all downloaded files will have their metadata. There seems to be other useful options for yt-dlp too, like: --embed-thumbnail --write-description etc.)

Add such bookmarks to local mp3 files?

I don't think this is in the scope of empv, at least I don't think it would worth. Because we can simply get away with using --embed-metadata for downloading files. If we had to somehow manually extract and add metadata using ffmpeg then we could simply expose the same function to work on local files but that will much more work for a small feature.

tvraman commented 2 months ago

agreed --- first pass: let's get the embedded metadata from YT when downloading