Glam Prestige Journal

Bright entertainment trends with youth appeal.

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.mp3

I 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].mp3

Is 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.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy