yt-dlp is downloading videos from a playlist as .webm files instead of .mp3 files

1.8k views Asked by At

I'm running a .bat script on Windows 10 that uses yt-dlp.exe, to download files and put them into a created directory.

This is what the code currently looks like, with yt-dlp.exe, downloaded.txt, and ffmpeg.exe in the same directory:

F:
cd \Desktop\Youtube DLP
set /P id=Enter Playlist or Video URL: 
set /P output=Enter Name Your Output folder:
yt-dlp.exe --yes-playlist %id% --ignore-errors --download-archive 
downloaded.txt --no-post-overwrites -ciwx --audio-format mp3
md %output%
move *.mp3 %output%
echo files are done
pause

Even with what I believe to be the right settings for it to run properly, it isn't downloading .mp3, but .webm files instead. Could someone point me to what might be wrong?

1

There are 1 answers

0
Kreetchy On

A possible fix would be to update the output template to reflect what you want by outputting %output%\%%(title)s.%%(ext)s

It also might be the case that yt-dlp doesn't know it has to use ffmpeg for post-processing. Might as well add the extra command --extract-audio

Ensure both yt-dlp and ffmpeg are up to date.