Announcement

Collapse
No announcement yet.

AVIF - image format unsupported

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    AVIF - image format unsupported

    > I came across an issue with some station logos not being displayed.
    >
    > The reason is that they were of type image/avif - which is not supported
    > by LMS.


    Now that's really odd... I tried your URL, and it would download an
    image. Not what you'd expect, but some people in a pool having a good
    time. No matter how I changed parameters for LMS' imageproxy or the
    original URL: LMS would always return that image.

    I then took that image and did a reverse image search - which indeed
    lead me to feierfreund.de! And there it is, hardly visible, behind a
    large pinkish rectangle almost at the top. People having a pool party.

    Which makes me wonder: the url you tried to load clearly is a station
    icon. I can download it - when addressing directly. But using LMS' image
    proxy I'd always get some other image. I have no clue what's going on
    there. I can't even test your problem.
    Paul Webster
    Author of "Now Playing" plugins covering Radio France (FIP etc), PlanetRadio (Bauer - Kiss, Absolute, Scala, JazzFM etc), KCRW, ABC Australia and CBC/Radio-Canada
    and, via the extra "Radio Now Playing" plugin lots more - see https://forums.slimdevices.com/showt...Playing-plugin

    #2
    AVIF - image format unsupported

    I came across an issue with some station logos not being displayed.

    The reason is that they were of type image/avif - which is not supported by LMS.

    An example
    Code:
    [22-05-24 13:43:37.4116] Slim::Web::Graphics::artworkRequest (83) Artwork request: imageproxy/https://images.feierfreund.de/files/streams/ff_stream-tile_karneval.png?auto=format&w=180&h=180&dpr=2/image_1024x1024_f.png
    [22-05-24 13:43:37.4124] Slim::Web::Graphics::artworkRequest (123)   Resize specification: 1024x1024_f.png
    [22-05-24 13:43:37.4129] Slim::Web::ImageProxy::getImage (110) Get artwork for URL: imageproxy/https://images.feierfreund.de/files/streams/ff_stream-tile_karneval.png?auto=format&w=180&h=180&dpr=2/image_1024x1024_f.png
    [22-05-24 13:43:37.4181] Slim::Web::ImageProxy::__ANON__ (151) Found URL to get artwork: https://images.feierfreund.de/files/streams/ff_stream-tile_karneval.png?auto=format&w=180&h=180&dpr=2
    [22-05-24 13:43:37.6300] Slim::Web::ImageProxy::_gotArtwork (217) Received artwork of type image/avif and 18196 bytes length
    [22-05-24 13:43:37.6314] Slim::Utils::ImageResizer::sync_resize (148) Error resizing : Can't resize unknown type, magic: "\0\0\0 ftyp"
    
    [22-05-24 13:43:37.6322] Slim::Web::ImageProxy::__ANON__ (318)   Resize failed, returning 500
    [22-05-24 13:43:37.6327] Slim::Web::ImageProxy::__ANON__ (319) Artwork resize for imageproxy/https://images.feierfreund.de/files/streams/ff_stream-tile_karneval.png?auto=format&w=180&h=180&dpr=2/image_1024x1024_f.png failed
    The parameters on the end of their URL were resulting in the remote site re-encoding the original file (similar to LMS imageresizer) and returning it as image/avif so I modified my plugin to strip them from the URL before using it ... and it worked. While this is OK for me for now, I can imagine that avif might appear from other sources in the future so might need handling in LMS and converting to a format handled by the players/controllers.

    Note - if it is supported then might need to check more magic bytes anyway - see
    Paul Webster
    Author of "Now Playing" plugins covering Radio France (FIP etc), PlanetRadio (Bauer - Kiss, Absolute, Scala, JazzFM etc), KCRW, ABC Australia and CBC/Radio-Canada
    and, via the extra "Radio Now Playing" plugin lots more - see https://forums.slimdevices.com/showt...Playing-plugin

    Comment


      #3
      Odd.

      Grabbing it with Curl shows they support http/2

      Code:
      < HTTP/2 200
      < date: Tue, 24 May 2022 18:10:31 GMT
      < content-type: image/avif
      < content-length: 18196
      < last-modified: Tue, 05 Apr 2022 20:04:30 GMT
      < cache-control: public, max-age=31536000
      < x-imgix-id: 8661d165bf29bf8b15e852aa5bd0595f9e006b2b
      < age: 1709928
      < access-control-allow-origin: *
      < cross-origin-resource-policy: cross-origin
      < x-content-type-options: nosniff
      < x-served-by: cache-sjc10063-SJC, cache-ams12779-AMS
      < vary: Accept, User-Agent
      < x-accel-expires: @1682434998
      < server: CDN77-Turbo
      < x-77-nzt: Abk73hHOOij/YWcmAA
      < x-77-nzt-ray: eG90Q8EDEO4
      < x-cache: HIT
      < x-age: 2516833
      < x-77-pop: amsterdamNL
      < x-77-cache: HIT
      < accept-ranges: bytes
      They appear to be using regional proxies - so that might account for differences in behaviour.

      Also - I am using LMS 8.2.1.

      Are you using gdresized or Roland's other image handler (I'm not).
      Paul Webster
      Author of "Now Playing" plugins covering Radio France (FIP etc), PlanetRadio (Bauer - Kiss, Absolute, Scala, JazzFM etc), KCRW, ABC Australia and CBC/Radio-Canada
      and, via the extra "Radio Now Playing" plugin lots more - see https://forums.slimdevices.com/showt...Playing-plugin

      Comment

      Working...
      X