Problems with extracted MP3 using Youtube-dl on Windows Problems with extracted MP3 using Youtube-dl on Windows windows windows

Problems with extracted MP3 using Youtube-dl on Windows


I figured out the issue and I'm posting it here in case someone else runs across the same issue. The issue was that I was specifying the whole path for the file in the -o template. The path looked like -o "c:\music\filename.mp3" changing the template to -o "c:\music\filename.%(ext)s" fixed the issue. %(ext)s is a special field that can be used in the output template to output the file extension.

The reason this caused an error is due to the order of operations for the conversion. First the file is downloaded in video format and saved to the hard drive. It is then converted into .mp3 and the source file is removed.

Due to my template the video file was being saved as video_name.mp3 regardless of actual video format and the converted file was overwriting this video "mp3". Hopefully this explanation saves someone else the same trouble I had in the future.