mikebrady / shairport-sync

AirPlay and AirPlay 2 audio player
Other
7.2k stars 571 forks source link

Trouble getting cover image #1051

Closed parautenbach closed 4 years ago

parautenbach commented 4 years ago

I'm following the instructions of this topic on the Home Assistant forums.

It mentions a setting named cover_art_cache_directory in the metadata section. I can't find any documentation on this here on the project and my question there hasn't been answered yet. I don't know if I'm missing some documentation, but taking a chance to set it doesn't seem to work.

This is what I have:

metadata =
{
        enabled = "yes"; // set this to yes to get Shairport Sync to solicit metadata from the source and to pass it on via a pipe
        include_cover_art = "yes"; // set to "yes" to get Shairport Sync to solicit cover art from the source and pass it via the pipe. You must also set "enabled" to "yes".
        pipe_name = "/tmp/shairport-sync-metadata";
        pipe_timeout = 5000; // wait for this number of milliseconds for a blocked pipe to unblock before giving up
        cover_art_cache_directory = "/tmp/shairport-sync/.cache/coverart"; // [par]
//      socket_address = "226.0.0.1"; // if set to a host name or IP address, UDP packets containing metadata will be sent to this address. May be a multicast address. "socket-port" must be non$
//      socket_port = 5555; // if socket_address is set, the port to send UDP packets to
//      socket_msglength = 65000; // the maximum packet size for any UDP metadata. This will be clipped to be between 500 or 65000. The default is 500.
};

The pipe exists and that I can read fine with the shairport-sync-metadata-reader.

Is this indeed an allowed setting?

What are my other options? Should I write my own script to read the pipe based on what's in shairport-sync-metadata-reader?

mikebrady commented 4 years ago

Thanks for the post. It's always interesting to see what people are doing with Shairport Sync!

The directory is used if you have enabled the MQTT, native D-Bus or MPRIS interfaces on the Shairport Sync build. It will be created automatically if it doesn't exist. You can check the build of Shairport Sync using:

$ shairport-sync -V

The resulting string will list MQTT, D-Bus and MPRIS if they have been included in the build.

Let me also suggest that you ensure you're using a recent version of Shairport Sync.

parautenbach commented 4 years ago

Thanks, Mike!

I woke up this morning thinking I should really check my version (bit of a n00b mistake by me). I'm indeed running a fairly old version: 3.2RC8-OpenSSL-Avahi-ALSA-metadata-sysconfdir:/usr/local/etc.

And apologies for not following the reporting issues readme.

I'll go do my homework now properly and give feedback here. I think I'll also enable the MQTT option.

:-)

parautenbach commented 4 years ago

This now works as expected: 3.3.7rc1-alac-OpenSSL-Avahi-ALSA-pipe-soxr-metadata-mqtt-sysconfdir:/etc.