Skip to main content YT-DLP Naming Help : r/youtubedl

YT-DLP Naming Help

Hey you all!

I'm new to using YT-DLP and I've been able to understand everything so far. The one thing I'm stuck at is when the download is complete; the name of the file always ends up as "Song Name [QWUT_6UE].mp3" I was wondering if there was a way to get rid of the thing in the brackets after the audio downloads. I use Mp3tag to manually edit the name file each time, but it was wondering if it can get rid of it from a get go? Like how you can set the audio quality to the highest setting. When you have to re-download your entire Playlist from the past like 6 years, it just takes up too much time to have to edit the file name on each and every one like 500+ times lol

Archived post. New comments cannot be posted and votes cannot be cast.
Professionals at top organizations love using Grammarly. Try it for free today.
  • Don’t take our word for it. Take theirs.
  • Trusted by tens of millions of professionals.
  • Used by 30M people.
  • Get more done with Grammarly.
  • Try it for free.
  • 賛成票率順
    コメントの並べ替えオプションを開く

    You're looking for this section of the github page.

    To have only the title as the filename: -o "%(title)s.%(ext)s"

    アチーブメント 上位 1% のコメント投稿者 のプロフィールバッジ 上位 1% のコメント投稿者
    -o "%(title)s.%(ext)s"

    Renaming is done with the Output Template, using the -o flag in either your command or your config file. The current default for -o, which you are getting now, is:

    %(title)s [%(id)s].%(ext)s

    "title" and "ext" are self-explanatory, and "id" is the seemingly random letters and numbers. The id number, in the case of a video from YouTube, is part of its url. For example, the id of the video at https://www.youtube.com/watch?v=dQw4w9WgXcQ is dQw4w9WgXcQ and this is really useful information because if you later decide you want to change the way you downloaded it, you can simply search the id on YouTube and it will come up with the link to that video. This is far better than searching by title because the titles often get edited but the url stays the same.

    The id is in the default so that users learning to use yt-dlp can go back and fix their mistakes once they figure out what they really want. I personally went through that cycle several times.

    To simply remove the id, you can add to your command:

    -o %(title)s.%(ext)s

    I notice you said "you can set the audio quality to the highest setting" and I hope you know the best audio quality is obtained by not converting or re-encoding, but instead by downloading either the best m4a version (more compatible) or the best Opus version (smaller filesize, maybe a little better quality, less compatible). Converting to mp3 reduces quality and shouldn't be necessary with an audio player from this century. I don't know the best command for Opus, but I use this for the best m4a:

    yt-dlp -f "ba[ext=m4a]" LINK

    To remove the id, this would be:

    `yt-dlp -o "%(title)s.%(ext)s" -f "ba[ext=m4a]" LINK