Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

YouTube-dl - Give each download a custom album name

I'm wondering if theres a way to give a custom album name to every download i make on YouTube-dl. You see I download a lot of podcast videos from YouTube and extract the audio for offline use.

I've already managed to specify the download location and also alter the title format using the following command: youtube-dl -x -o /Downloaded/%%(title)s.%%(ext)s.%%(album)s %URL% by making use of the youtube-dl documentation page.

However I would also like to add to that, the ability to give each download an album name of 'Podcasts'. I've found an album tag in the youtube-dl documentation but that appears to take an exsisting album name from the orignal source. Instead i want to put my own album name instead.

Like this picture, where the Album field is labelled with 'Podcasts':

enter image description here

Is this possible with YouTube-dl?

Setup directory:

enter image description here

like image 437
SneakyShrike Avatar asked Jan 25 '18 14:01

SneakyShrike


1 Answers

you can specify tags using the postprocessor args option. From the help:

--postprocessor-args ARGS Give these arguments to the postprocessor

The postprocessor in this case is FFmpeg. So you can add an ffmpeg param to set the album tag like this:

--postprocessor-args "-metadata album=Podcasts"

So your full command line would then be:

youtube-dl -x --postprocessor-args "-metadata album=Podcasts" -o /Downloaded/%%(title)s.%%(ext)s.%%(album)s %URL%

More info about the MP3 metadata tags you can set this way can be found on the ffmpeg wiki. I have only tested this when transcoding to MP3 (--audio-format mp3).

like image 54
mx1up Avatar answered Nov 01 '22 04:11

mx1up