When mpv plays youtube video it doesn't show metadata like artist, title. Is it possible to show this information in CLI?
Can you link a Youtube video that has this special metadata?
I'm guessing he means the "Music" and "Artist" in bold in the description: https://www.youtube.com/watch?v=dQw4w9WgXcQ
The uploader has not made this video available in your country.
I also don't see anything bold in the description.
Here are a bunch of other ones, hoping at least one will work.
https://www.youtube.com/watch?v=Vj5dM3K_8dE has both "Music" and "Artist": http://i.imgur.com/l9Mn1gs.png
https://www.youtube.com/watch?v=ehqKpPmVcK4 this only has "Music" (but the artist is listed there): http://i.imgur.com/MvixzTz.png
https://www.youtube.com/watch?v=0Hxp-9Hh8o8 only "Music": http://i.imgur.com/GLSaFnw.png
youtube-dl --get-title "https://www.youtube.com/watch?v=zd3hNkpm8Hs" gives:
How to use MPV in windows
But when mpv plays this video it doesn't show any metadata in CLI at all.
youtube-dl currently doesn't give us the Music or Artist fields from the description, so we can't do anything about that. File an issue over there to include the info in the JSON data if you really need it. We do however get the title, so if you want mpv to print that, just add something like
term-playing-msg='Title: ${media-title}'
to your mpv.conf.
This issue can be labeled as not our bug in my opinion. Since this functionality is youtube-dl's responsibility.
OK - we could implement this once youtube-dl gives us the necessary information over its JSON API.
Does youtube-dl currently give this metadata two and a half years later?
support for youtube music metadata has been added since youtube-dl 2018.06.04 release.
We'd need metadata to be R/W to be able to display it to the CLI, same as a regular audio file, probably.
I'm guessing he means the "Music" and "Artist" in bold in the description: https://www.youtube.com/watch?v=dQw4w9WgXcQ
youtube-dl does not return any audio metadata for this video:
youtube-dl -J https://www.youtube.com/watch?v=dQw4w9WgXcQ | jq -C '{track, track_number, artist, genre, album, album_artist, disc_number, release_year, title}'
{
"track": null,
"track_number": null,
"artist": null,
"genre": null,
"album": null,
"album_artist": null,
"disc_number": null,
"release_year": null,
"title": "Rick Astley - Never Gonna Give You Up (Video)"
}
Here are a bunch of other ones, hoping at least one will work.
https://www.youtube.com/watch?v=Vj5dM3K_8dE has both "Music" and "Artist": http://i.imgur.com/l9Mn1gs.png
{
"track": "Superbad",
"track_number": null,
"artist": "Flux Pavilion and Doctor P",
"genre": null,
"album": null,
"album_artist": null,
"disc_number": null,
"release_year": null,
"title": "Flux Pavilion & Doctor P - Superbad (Official Video)"
}
https://www.youtube.com/watch?v=ehqKpPmVcK4 this only has "Music" (but the artist is listed there): http://i.imgur.com/MvixzTz.png
{
"track": "Temporary Secretary (Remastered)",
"track_number": null,
"artist": "Paul McCartney",
"genre": null,
"album": null,
"album_artist": null,
"disc_number": null,
"release_year": null,
"title": "Paul McCartney - Temporary Secretary"
}
https://www.youtube.com/watch?v=0Hxp-9Hh8o8 only "Music": http://i.imgur.com/GLSaFnw.png
{
"track": "Consuelo's Love Theme",
"track_number": null,
"artist": "Chuck Mangione",
"genre": null,
"album": "Children Of Sanchez",
"album_artist": null,
"disc_number": null,
"release_year": 1978,
"title": "Consuelo's Love Theme"
}
Most helpful comment
youtube-dl currently doesn't give us the Music or Artist fields from the description, so we can't do anything about that. File an issue over there to include the info in the JSON data if you really need it. We do however get the title, so if you want mpv to print that, just add something like
to your mpv.conf.