[Question] Can yt-dlc parse and split by video chapters?
Checklist
- [X] I'm asking a question
- [X] I've looked through the README and FAQ for similar questions
- [X] I've searched the bugtracker for similar questions including closed ones
Question
I'm trying to download a video of an OST which is divided by chapters (instead of one video per song in a playlist). Reading the README file i saw three chapter-related output template tags, so i tried to adapt a command to download and split by playlist entry but it didn't work (only gives me a file named NA.mp3 - same result using youtube-dl).
Here is the command:
youtube-dlc --extract-audio --audio-format mp3 -o "%(chapter)s.%(ext)s" "https://www.youtube.com/watch?v=va57LS08oOw"
How i can make the download end up with multiple audio files, one per chapter (like Intro.mp3, Story.mp3 and such)?
There is no direct way to do this. The easiest way would be to use mkvmerge as a postprocessor.
youtube-dlc URL --exec "mkvmerge -o {} --split chapters:all {}"
Ref: https://stackoverflow.com/a/36708030
@pukkandan unfortunately i use Windows so i dont know if the second tool is available for it.
@viko93 yes, mkvmerge is available for windows
https://www.fosshub.com/MKVToolNix.html