I can create an mp3 of a YouTube video with the following command:
youtube-dl --extract-audio --audio-format mp3 It creates an mp3 with the following filename:
Christina Perri - A Thousand Years [Official Music Video]-rtOvBOTyX00.mp3I don't need the video ID part (rtOvBOTyX00) at the end and would like to have just the following:
Christina Perri - A Thousand Years [Official Music Video].mp3Is this achievable with youtube-dl's options? If not, what's the next best solution?
4 Answers
Try the command
youtube-dl --extract-audio --audio-format mp3 --output "%(uploader)s%(title)s.%(ext)s" 10 As you could reed in the youtube-dl manpage the corresponding option would be -o :
youtube-dl --extract-audio --audio-format mp3 -o "%(title)s.%(ext)s" 10 You can specify name by using argument --output and then specifying the name in the following syntax in place of specific_name
youtube-dl -x --audio-format mp3 --output "specific_name.%(ext)s" Escape your percent signs, so %(title)s becomes %%(title)s. I had this issue myself.