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

Cover image in opus file is not shown in KDE media control in system tray #64

Open
shmerl opened this issue Feb 20, 2022 · 7 comments
Open

Comments

@shmerl
Copy link

shmerl commented Feb 20, 2022

When playing an opus file which contains a cover image with mpv, it's not propagating through mpris.

I think it's a problem with mpv-mpris, since mpv shows the image in the window itself and reports using a cover art when run from the terminal. And when playing it with vlc, it shows up there fine.

If you think it's an issue with mpv itself, I can open a bug there too.

@shmerl
Copy link
Author

shmerl commented Feb 20, 2022

Here is a file you can test it on (run it in a loop, it's pretty short):

test.zip

@hoyon
Copy link
Owner

hoyon commented Feb 20, 2022

Yes this is a known limitation of mpv-mpris. Only external album art is currently supported and the test file you provided uses an embedded image.

Although now that I think about it, it might be possible to use mpv's screenshot command to make this work. I'll have a play around with that when I have some time. PRs also welcome.

@shmerl
Copy link
Author

shmerl commented Feb 20, 2022

Is it a limitation of mpris protocol itself (i.e. it's impossible a normal way without such hacks like making a temporary external file), or mpv-mpris is just not implementing some features yet? How does it work for VLC for example?

I'd be interested in looking into it, if there is some correct solution.

@shmerl
Copy link
Author

shmerl commented Feb 20, 2022

mpv itself somehow recognizes that embedded image is a cover art and displays it. May be mpv-mpris can query that data from mpv itself? I'm looking through the code to try to understand what the plugin is doing now.

@shmerl
Copy link
Author

shmerl commented Feb 20, 2022

OK, I see it's doing try_put_local_art(mpv, dict, path); now. I'll look into mpv itself, may be its library has some kind of function for getting the cover art or if not, I can open a feature request there. There is no need to duplicate that code.

@shmerl
Copy link
Author

shmerl commented Feb 20, 2022

@shmerl
Copy link
Author

shmerl commented Feb 20, 2022

I'm not sure I understand it fully, but I think VLC reads base 64 encoded metadata, decodes into binary, and somehow handles that later. I.e. might be not even writing any file, just using the data from memory.

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