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

Alacritty doesnt show cover art #18

Closed
xeinye opened this issue Sep 12, 2021 · 14 comments
Closed

Alacritty doesnt show cover art #18

xeinye opened this issue Sep 12, 2021 · 14 comments
Assignees
Labels
invalid This doesn't seem right

Comments

@xeinye
Copy link

xeinye commented Sep 12, 2021

Alacritty with ueberzug doesn't showed the cover art and with pixcat crashed
I know that a song I'm listening to has an embedded art. The others functionality work fine, but I'm not seeing the album art

image_method    = ueberzug
music_directory = ~/mus

opt info:
alacritty 0.9.0 (fed349aa)
ueberzug 18.1.9
pixcat 0.1.4

@GuardKenzie
Copy link
Owner

I think this might be a config issue since I am not able to recreate this issue on my machine using alacritty and ueberzug. Could you please post your mpd.conf?

@GuardKenzie GuardKenzie added the bug Something isn't working label Sep 12, 2021
@xeinye
Copy link
Author

xeinye commented Sep 12, 2021

I think this might be a config issue since I am not able to recreate this issue on my machine using alacritty and ueberzug. Could you please post your mpd.conf?

Here, https://raw.githubusercontent.com/mayinz/dots/main/config/mpd/mpd.conf

@GuardKenzie
Copy link
Owner

GuardKenzie commented Sep 12, 2021

Can you please post your entire miniplayer config file?

Here are a few things you could try:

  • Is MPD running as the same user as you? Try using the absolute path to your music directory in the miniplayer config.
  • Make sure you have access to write to the /tmp directory.
  • Try extracting the album art yourself with ffmpeg -i "path/to/track.extension" "test.png" and see if that works without issues

@xeinye
Copy link
Author

xeinye commented Sep 12, 2021

Is MPD running as the same user as you? Try using the absolute path to your music directory in the miniplayer config.

Yes and i putted

Make sure you have access to write to the /tmp directory.

I have permission on /tmp
It extracts the cover to tmp, but its not displayed.
image

e.g ranger with ueberzug on alacritty works well

And once, the mini player gave this output

  File "/usr/bin/miniplayer", line 896, in loop
    self.draw()
  File "/usr/bin/miniplayer", line 864, in draw
    self.drawAlbumArt()
  File "/usr/bin/miniplayer", line 757, in drawAlbumArt
    self.art_placement.width = self.image_width
  File "/usr/lib/python3.9/site-packages/ueberzug/lib/v0/__init__.py", line 144, in __setattr__
    self.__update()
  File "/usr/lib/python3.9/site-packages/ueberzug/lib/v0/__init__.py", line 105, in __update
    self.__canvas.request_transmission()
  File "/usr/lib/python3.9/site-packages/ueberzug/lib/v0/__init__.py", line 411, in request_transmission
    self.__transmitter.transmit()
  File "/usr/lib/python3.9/site-packages/ueberzug/lib/v0/__init__.py", line 281, in transmit
    self._process.stdin.flush()
BrokenPipeError: [Errno 32] Broken pipe

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/bin/miniplayer", line 930, in <module>
    player.loop()
  File "/usr/lib/python3.9/site-packages/ueberzug/lib/v0/__init__.py", line 378, in decorator
    return function(*args, canvas=self, **kwargs)
  File "/usr/bin/miniplayer", line 924, in loop
    if error:
UnboundLocalError: local variable 'error' referenced before assignment```

@GuardKenzie
Copy link
Owner

GuardKenzie commented Sep 13, 2021

Do you see no album art at all, or do you see something that looks like placeholder art? If you see no art at all, try configuring font_height and font_width in the config if you have not done so already. (See here for details).

@xeinye
Copy link
Author

xeinye commented Sep 13, 2021

i see placeholder art and the player "section" is same that example config

@GuardKenzie GuardKenzie self-assigned this Sep 13, 2021
@GuardKenzie
Copy link
Owner

GuardKenzie commented Sep 13, 2021

I think you misunderstood my question based on the screenshot you sent me. The only way the player displays placeholder art is if ffmpeg fails to extract the album art from the file. Since you say /tmp/aartminip.png is the correct album art, that cannot be.

Again, based on the screenshot you sent, the values font_height and font_width in your config should be set to

font_width = 10
font_height = 23
  • Could you please post the entire contents of ~/.config/miniplayer/config?

  • To test if ueberzug is working as intended try running the following python script

    import ueberzug.lib.v0 as ueberzug
    import time
    
    if __name__ == '__main__':
        with ueberzug.Canvas() as c:
            demo = c.create_placement('demo', x=0, y=0, scaler=ueberzug.ScalerOption.COVER.value)
            demo.path = "/tmp/aartminip.png"
            demo.visibility = ueberzug.Visibility.VISIBLE
            time.sleep(2)

    You should see an image pop up in your terminal for 2 seconds. Make sure /tmp/aartminip.png is some image you know is good.

  • Here is a zip file that contains an mp3 with album art embedded which I know works as intended: test.zip. Check if it works on your system.

  • Are you using X11 or wayland?

  • You can also try reinstalling the entire package and all its dependencies with

    pip install --force-reinstall miniplayer
    

@xeinye
Copy link
Author

xeinye commented Sep 13, 2021

To test if ueberzug is working as intended try running the following python script

didn't show

Here is a zip file that contains an mp3 with album art embedded which I know works as intended: test.zip. Check if it works on your system.

image

Are you using X11 or wayland?

X11

You can also try reinstalling the entire package and all its dependencies with

Nothing has changed

Could you please post the entire contents of ~/.config/miniplayer/config?

font_width = 10
font_height = 23
volume_step     = 5
auto_close      = false
album_art_only  = false
show_playlist   = true

[art]
image_method    = ueberzug
music_directory = /home/nix/mus
# http_base_url = http://localhost:6667/cover-art
# http_cover_filenames = cover.jpg cover.png folder.jpg folder.png art.jpg art.png artwork.jpg artwork.png

[mpd]
host   = localhost
port   = 6600
# pass = example

# [keybindings]
# >     = next_track
# <     = last_track
# +     = volume_up
# -     = volume_down
# p     = play_pause
# q     = quit
# h     = help
# i     = toggle_info
# up    = select_up
# down  = select_down
# enter = select```

@xeinye
Copy link
Author

xeinye commented Sep 13, 2021

I already had the uerb installed via packages in arch, is there any problem? And miniplayer via aur,
but I removed and installed via pip

@GuardKenzie
Copy link
Owner

Ok, this does not seem to be an issue with miniplayer, but an issue with either ueberzug or alacrity. Try testing using another terminal emulator such as kitty and see if it works on there (also, on kitty you can try the pixcat image method since that is a kitty exclusive).

The only thing I see wrong with the config is that the [player] section is missing.

To be absolutely certain this isn't a file permission issue, try changing this line:

demo.path = "/tmp/aartminip.png"

to some other known good image in your home directory.

Which shell are you using? I just remembered that fish had some issues with ueberzug a while back.

Again, I have not been able to recreate this issue on my machine with the same versions of the packages and alacrity so I don't know what else to do, sorry.

@GuardKenzie
Copy link
Owner

I already had the uerb installed via packages in arch, is there any problem? And miniplayer via aur,
but I removed and installed via pip

That should not be a problem

@xeinye
Copy link
Author

xeinye commented Sep 13, 2021

zsh, I will try to redo my configuration

@xeinye
Copy link
Author

xeinye commented Sep 14, 2021

It didn't solve

@GuardKenzie
Copy link
Owner

This is clearly not an issue with miniplayer since you cannot even get an image to display with the minimal working example I provided. Try contacting the maintainers of alacritty or ueberzug.

@GuardKenzie GuardKenzie added invalid This doesn't seem right and removed bug Something isn't working labels Sep 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

2 participants