r/youtubedl•
ekclone

How can I get the Artist and Song title to the file-title from metadata?

I hope I'm clear enough. Currently downloading music playlists and I see that in the metadata the artist and title are being included fine but not in the file title, I still get "(Official Music Video), (Lyric Video), (4K)".

Command:

youtube-dl --extract-audio --audio-format mp3 -o "%(title)s.%(ext)s" --add-metadata youtube.com/watch?v=ENROfrmDtI8&list=PLlYKDqBVDxX2KziuzmDlNhLpJjgLktB53

Posted Mar 31, 2020, 8:48 AM UTC

73
ekcloneOP•

Figured it out! Title regex:

-o %(autonumber)2d - %(artist)s - %(track)s.%(ext)s

Docs: https://github.com/ytdl-org/youtube-dl/blob/master/README.md#output-template

  • track (string): Title of the track
3
Empyrealist•

Thank you for posting back your solution!

2
ekcloneOP•

No problem! I always get angry when people never reply to a question they asked, ^(looking at you denvercoder)

2