Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

metadataFromTitle not working? #252

Open
mostafa-norouzi opened this issue Nov 5, 2024 · 9 comments
Open

metadataFromTitle not working? #252

mostafa-norouzi opened this issue Nov 5, 2024 · 9 comments

Comments

@mostafa-norouzi
Copy link
Contributor

mostafa-norouzi commented Nov 5, 2024

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.

@norkunas
Copy link
Owner

norkunas commented Nov 5, 2024

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?

@mostafa-norouzi
Copy link
Contributor Author

mostafa-norouzi commented Nov 6, 2024

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.

@norkunas
Copy link
Owner

norkunas commented Nov 6, 2024

youtube-dl has no releases since 2021, so I'd suggest to switch to yt-dlp

@mostafa-norouzi
Copy link
Contributor Author

mostafa-norouzi commented Nov 6, 2024

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

@norkunas
Copy link
Owner

norkunas commented Nov 7, 2024

Where do you check if it's empty? I haven't used this option never

@mostafa-norouzi
Copy link
Contributor Author

mostafa-norouzi commented Nov 8, 2024

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/

@norkunas
Copy link
Owner

norkunas commented Nov 8, 2024

Maybe that option is not for the ID3v1/ID3v2 ? Will check this someday,but no promises

@mostafa-norouzi
Copy link
Contributor Author

Finally I found the reason! The right pattern has two % sign and should be like this :

->metadataFromTitle('%%(artist)s - %%(title)s')

@norkunas
Copy link
Owner

Cool! Maybe you could add a section in readme file about this for others :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants