Open mostafa-norouzi opened 2 weeks ago
Hey. Which yt library you are using, yt-dl or yt-dlp?
Looking at the yt-dlp parse-metadata
should be used which is not implemented here, but PR's are welcome.
Could you check if that option works for you in terminal?
I mentioned the URL, It's youtube-dl. Also I checked the code and metadataFromTitle implemented in PHP. you are right, I should check it in terminal first.
youtube-dl has no releases since 2021, so I'd suggest to switch to yt-dlp
I used below command:
youtube-dl -x -R 3 -r 500K --audio-quality 128K --metadata-from-title "%(artist)s - %(title)s" --user-agent "Mozilla/5.0 (Android 14; Mobile; rv:128.0) Gecko/128.0 Firefox/128.0" --audio-format mp3 -o "%(id)s - %(title)s.%(ext)s" https://www.youtube.com/watch?v=b8I-7Wk_Vbc
And metadata is empty! So it's not related to the wrapper
Where do you check if it's empty? I haven't used this option never
Simply in Winamp (windows). It shows complete metadata (with hotkey alt+3) like title, artist, cover and .... This option of youtube-dl can save user time (no need adding data manually). These days most of software check and shows meta-info like Telegram, Media player, cars audio player and ...
Also there is a tiny app that shows and modifies it : https://www.malavida.com/en/soft/creevity-mp3-cover-downloader/
Maybe that option is not for the ID3v1/ID3v2 ? Will check this someday,but no promises
Finally I found the reason! The right pattern has two % sign and should be like this :
->metadataFromTitle('%%(artist)s - %%(title)s')
Cool! Maybe you could add a section in readme file about this for others :)
Hi,
Anyone tested metadataFromTitle switch? I'm using below pattern :
->metadataFromTitle('%(artist)s - %(title)s')
but output mp3 has no metadata! https://github.com/ytdl-org/youtube-dl/blob/master/README.md#post-processing-options
Also :
->postProcessorArgs("-metadata title={$title} ")
is working but I want to fill title automatically from video.