Open ghost opened 3 years ago
Additional question, what does YoutubeDL do to get around the translated title?
I googled the artifact "cJjqth04G1Q" and the music you are trying to download was the first result. Doesn't appear on the page though with ctrl+f. You are not using an output template.
The default template is '%(title)s-%(id)s.%(ext)s
'. I used youtube-dl --extract-audio --audio-format mp3 -o "%(title)s.%(ext)s" https://www.youtube.com/playlist?list=PLcRmrvAR4VMKRJ8ZBPiS0jlp9fRKQPprS
and the artifact is gone. It must be related to the ID.
Translated too!
Additional question, what does YoutubeDL do to get around the translated title?
Excuse me, has this problem been solved? I also have this problem
@tujidelv
I'm not sure, but at least extracting title with direct URL did result in non-translated title.
My context about this issue is that I was trying to do some work with YoutubeDL's output including filename, but downloaded filenames were different if a playlist contains translated filename.
My workaround is to use --flat-playlist
option when requesting playlist information, build URL for every item from the result, re-request them as a direct URL rather than playlist URL.
For example, (youtube-dl
, jq
required)
#!/bin/bash
playlist="https://www.youtube.com/playlist?list=a-playlist-id"
ids=$(youtube-dl --dump-json --flat-playlist ${playlist} | jq -s -r 'map(.)[].url')
readarray -t <<< "${ids}"
for id in "${MAPFILE[@]}"
do
youtube-dl --get-title https://www.youtube.com/watch?v=${id}
done
replace playlist
variable and run it, you can get non-translated title. Tested with YoutubeDL 2021.01.16
Checklist
Verbose log
Downloading a playlist
Downloading a single video
Description
I know there's some issues citing auto translated video title, but this is a little bit different.
I tried to download this video: https://www.youtube.com/watch?v=cJjqth04G1Q
Downloading it by its URL is working well. Title is not translated and it's good. But downloading a playlist including that video results in translated title. This error makes some of YoutubeDL's feature inconsistent.
Different results on same resources