I like downloading YouTube videos and having mp3 versions in a subfolder to play on my phone during work.
Is it possible to call youtube-dl and download videos (from a playlist, with archive...) and save the MP3 extraction to a subfolder titled "MP3".
youtube-dl --download-archive "F:\Videos\Online Videos\Comics
Explained\Marvel Major Storylines (Constantly Updated)\Marvel Major
Storylines Archive.txt"
"https://www.youtube.com/playlist?list=PL9sO35KZL50yZh5dXW-7l93VZp7Ct4vYA"
-o "F:\Videos\Online Videos\Comics Explained\%(playlist_title)s\%(title)s.%(ext)s" -f
"bestvideo[ext=mp4]+bestaudio[ext=m4a]/best[ext=mp4]/best"
--ffmpeg-location "H:\Documents\FFMpeg\bin"
Then -x --audio-format mp3 --audio-quality 320k
But - I want the audio to output to:
"F:\Videos\Online Videos\Comics Explained\%(playlist_title)s\MP3\%(title)s.%(ext)s"
with youtube_dl.YoutubeDL(ydl_opts) as ydl: ''' Code here should list urls of each video as vLinks variable ''' for vLink in vLinks: info_dict = ydl.extract_info(link, download=False) video_title = info_dict.get('title', None) playlist_index = info_dict.get('playlist_index', None) playlist = info_dict.get('playlist', None) uploader = info_dict.get('uploader', None) print(video_title)
- Stack Johan