不要附加视频 ID youtube-dl

Do not append video id youtube-dl

有什么方法可以防止下载文件的名称中包含部分视频ID吗?我的意思的一个例子: 如果你 运行:

youtube-dl https://www.youtube.com/watch?v=dQw4w9WgXcQ

您将获得一个名为“Rick Astley - Never Gonna Give You Up(视频)-dQw4w9WgXcQ.mp4”的文件 我不想在我的视频末尾添加乱码。是否缺少禁用此功能的选项或标志?

来自man youtube-dl

-o, --output TEMPLATE

Output filename template, see the "OUTPUT TEMPLATE" for all the info

[...]

The current default template is %(title)s-%(id)s.%(ext)s.

只需放下 id

youtube-dl -o '%(title)s.%(ext)s' ...