Announcement

Collapse
No announcement yet.

ImageProxy Configuration Helper Plugin

Collapse
X
 
  • Time
  • Show
Clear All
new posts

  • ImageProxy Configuration Helper Plugin

    Here's something "new" to play with: the ImageProxy Configuration Helper Plugin. Not really new, as I've been using it myself for close to nine years! But it's time to make this available to a wider audience. Install it from LMS' plugin manager.

    As you might know LMS has an image resizing proxy built in. By default this would ask MySqueezebox.com to download online images and send a resized version back to LMS or a player etc. About 10 years ago I added a version of this mechanism to LMS itself, to prepare for the then imminent, unavoidable shut down of MySB . Luckily enough this still hasn't happen. But the mechanism is there so LMS could resize images to suitable formats for the players. You can switch between using the internal service or the one on MySB in Settings/Advanced/Performance.

    Now the ImageProxy plugin take the options to a whole new level. It offers two basic features to lower the load on your system caused by LMS:
    • Addition of other external services to be used to resize images in case MySB went down.
    • Support for a separate daemon to handle the resizing on the same system
    As some of you might know LMS is single threaded. This means that if it has to download and resize a huge image on a slow computer, it might starve the audio data streaming, causing interrupted playback. While even a Raspberry Pi 3 has four CPU cores, LMS would only use one of them. This plugin allows you to either leave the task to an external service, or use a separate process on your computer to handle the resizing.

    The resizing daemon will particularly improve the hardware usage on smaller computers with multiple cores like the aforementioned Pi. It should be available on most Linux/Unix based system, but not Windows. I've been using it with LMS running on pCP. In order to use it go to Settings/Advanced/Image Proxy to enable the daemon. Then go to Settings/Performance to make sure you're using the LMS internal resizing and none of the external choices.

    Click image for larger version  Name:	imageproxy.png Views:	0 Size:	53.3 KB ID:	1640297

    In the plugin's settings you can also define external system to which LMS would reach out to do the resizing. One such service (https://images.weserv.nl) is pre-configured. Please note that this one has a 2500 images per 10 minutes limit. You can then again select the service you want to use in Settings/Performance.

    Other services can be added. This allows you to run and use your own service. Eg. the above weserv service is open source and can be run in Docker (https://github.com/weserv/images/tree/5.x/docker). Another option I've been using successfully is Caravaggio (https://caravaggio.ramielcreations.com).

    Please give it a try! I'm very interested in your experience. What other resizing services would you know? What is working best for you?
    Michael

    "It doesn't work - what shall I do?" - "Please check your server.log and/or scanner.log file!"
    (LMS: Settings/Information)

  • #2
    Originally posted by mherger
    Here's something "new" to play with: the ImageProxy Configuration Helper Plugin. Not really new, as I've been using it myself for close to nine years! But it's time to make this available to a wider audience. Install it from LMS' plugin manager.

    As you might know LMS has an image resizing proxy built in. By default this would ask MySqueezebox.com to download online images and send a resized version back to LMS or a player etc. About 10 years ago I added a version of this mechanism to LMS itself, to prepare for the then imminent, unavoidable shut down of MySB . Luckily enough this still hasn't happen. But the mechanism is there so LMS could resize images to suitable formats for the players. You can switch between using the internal service or the one on MySB in Settings/Advanced/Performance.

    Now the ImageProxy plugin take the options to a whole new level. It offers two basic features to lower the load on your system caused by LMS:
    • Addition of other external services to be used to resize images in case MySB went down.
    • Support for a separate daemon to handle the resizing on the same system
    As some of you might know LMS is single threaded. This means that if it has to download and resize a huge image on a slow computer, it might starve the audio data streaming, causing interrupted playback. While even a Raspberry Pi 3 has four CPU cores, LMS would only use one of them. This plugin allows you to either leave the task to an external service, or use a separate process on your computer to handle the resizing.

    The resizing daemon will particularly improve the hardware usage on smaller computers with multiple cores like the aforementioned Pi. It should be available on most Linux/Unix based system, but not Windows. I've been using it with LMS running on pCP. In order to use it go to Settings/Advanced/Image Proxy to enable the daemon. Then go to Settings/Performance to make sure you're using the LMS internal resizing and none of the external choices.

    Click image for larger version Name:	imageproxy.png Views:	0 Size:	53.3 KB ID:	1640297

    In the plugin's settings you can also define external system to which LMS would reach out to do the resizing. One such service (https://images.weserv.nl) is pre-configured. Please note that this one has a 2500 images per 10 minutes limit. You can then again select the service you want to use in Settings/Performance.

    Other services can be added. This allows you to run and use your own service. Eg. the above weserv service is open source and can be run in Docker (https://github.com/weserv/images/tree/5.x/docker). Another option I've been using successfully is Caravaggio (https://caravaggio.ramielcreations.com).

    Please give it a try! I'm very interested in your experience. What other resizing services would you know? What is working best for you?
    How do you install this plugin?
    Living Room: Touch or Squeezelite (Pi3B) > Topping E30 > Audiolab 8000A > Monitor Audio S5 + BK200-XLS DF
    Bedroom: Radio
    Bathroom: Radio

    Comment


    • #3
      I have a recollection of someone else here making a resizer/enhancer.
      If someone can work out what it was ... perhaps it could be a provider to this instead - but perhaps irrelevant.
      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


      • #4
        Originally posted by slartibartfast

        How do you install this plugin?
        It is in the 3rd party plugins. Look for "External Image Proxy configuration helper".

        Once you have it installed it shows up as "Image Proxy".

        Comment


        • #5
          Originally posted by BoomX2

          It is in the 3rd party plugins. Look for "External Image Proxy configuration helper".

          Once you have it installed it shows up as "Image Proxy".
          OK I was expecting it to be listed as "Image Proxy" 🤣
          Living Room: Touch or Squeezelite (Pi3B) > Topping E30 > Audiolab 8000A > Monitor Audio S5 + BK200-XLS DF
          Bedroom: Radio
          Bathroom: Radio

          Comment


          • #6
            Hi Michael I'm getting the following in my server log after a rescan for new and changed:

            [23-06-03 10:47:45.9937] main::init (380) Starting Logitech Media Server (v8.4.0, 1685538966, Wed 31 May 2023 03:31:50 PM CEST) perl 5.032001 - aarch64-linux-thread-multi
            [23-06-03 11:02:34.6768] Slim::Utils::ImageResizer::__ANON__ (60) daemon failed to connect: No such file or directory
            [23-06-03 11:02:34.8883] Slim::Utils::ImageResizer::__ANON__ (60) daemon failed to connect: No such file or directory
            [23-06-03 11:02:34.9147] Slim::Utils::ImageResizer::__ANON__ (60) daemon failed to connect: No such file or directory
            [23-06-03 11:02:34.9156] Slim::Utils::ImageResizer::__ANON__ (60) daemon failed to connect: No such file or directory
            [23-06-03 11:02:35.0225] Slim::Utils::ImageResizer::__ANON__ (60) daemon failed to connect: No such file or directory
            [23-06-03 11:02:35.4590] Slim::Utils::ImageResizer::__ANON__ (60) daemon failed to connect: No such file or directory
            [23-06-03 11:02:35.5310] Slim::Utils::ImageResizer::__ANON__ (60) daemon failed to connect: No such file or directory
            [23-06-03 11:02:35.5831] Slim::Utils::ImageResizer::__ANON__ (60) daemon failed to connect: No such file or directory
            [23-06-03 11:02:35.6128] Slim::Utils::ImageResizer::__ANON__ (60) daemon failed to connect: No such file or directory
            [23-06-03 11:02:36.0363] Slim::Utils::ImageResizer::__ANON__ (60) daemon failed to connect: No such file or directory
            [23-06-03 11:02:36.7918] Slim::Utils::ImageResizer::__ANON__ (60) daemon failed to connect: No such file or directory
            [23-06-03 11:02:36.8733] Slim::Utils::ImageResizer::__ANON__ (60) daemon failed to connect: No such file or directory
            [23-06-03 11:02:38.5073] Slim::Utils::ImageResizer::__ANON__ (60) daemon failed to connect: No such file or directory
            [23-06-03 11:02:38.7878] Slim::Utils::ImageResizer::__ANON__ (60) daemon failed to connect: No such file or directory
            [23-06-03 11:02:39.0160] Slim::Utils::ImageResizer::__ANON__ (60) daemon failed to connect: No such file or directory
            [23-06-03 11:02:39.1184] Slim::Utils::ImageResizer::__ANON__ (60) daemon failed to connect: No such file or directory
            [23-06-03 11:02:39.6051] Slim::Utils::ImageResizer::__ANON__ (60) daemon failed to connect: No such file or directory
            [23-06-03 11:02:39.7836] Slim::Utils::ImageResizer::__ANON__ (60) daemon failed to connect: No such file or directory
            [23-06-03 11:02:39.7846] Slim::Utils::ImageResizer::__ANON__ (60) daemon failed to connect: No such file or directory
            [23-06-03 11:02:39.8328] Slim::Utils::ImageResizer::__ANON__ (60) daemon failed to connect: No such file or directory

            The plugin is set to run the daemon and in performance to use LMS to resize artwork.

            My setup is:

            Logitech Media Server Version: 8.4.0 - 1685538966 @ Wed 31 May 2023 03:31:50 PM CEST
            Hostname: MusicServer
            Server IP Address: 192.168.0.200
            Server HTTP Port Number: 9000
            Operating system: piCore - EN - utf8
            Platform Architecture: aarch64-linux
            Perl Version: 5.32.1 - aarch64-linux-thread-multi
            Audio::Scan: 1.06
            IO::Socket::SSL: 2.071
            Database Version: DBD::SQLite 1.58 (sqlite 3.22.0)
            Total Players Recognized: 8​

            This on ​piCorePlayer v8.2.0

            Is it an issue? Thanks

            Comment


            • #7
              Can you enable logging for plugin.imageproxy? That should give you some info about the resizing daemon. Can you check whether there's a /tmp/sbs_artwork folder on your system?
              Michael

              "It doesn't work - what shall I do?" - "Please check your server.log and/or scanner.log file!"
              (LMS: Settings/Information)

              Comment


              • #8
                There is '(artwork.imageproxy) - Artwork Resizing Proxy'​ on my system (set to error at the moment) in logging .......but not 'plugin.imageproxy'.
                And if I look at the rootfs on my system there is no '/tmp/sbs_artwork' folder.

                Comment


                • #9
                  Originally posted by gegen
                  There is '(artwork.imageproxy) - Artwork Resizing Proxy'​ on my system (set to error at the moment) in logging .......but not 'plugin.imageproxy'.
                  And if I look at the rootfs on my system there is no '/tmp/sbs_artwork' folder.
                  Oops... it's indeed artwork and artwork.imageproxy... INFO should be good enough, DEBUG can be very verbose.
                  Michael

                  "It doesn't work - what shall I do?" - "Please check your server.log and/or scanner.log file!"
                  (LMS: Settings/Information)

                  Comment


                  • #10
                    Sure will change it to info and do a rescan.

                    Comment


                    • #11
                      No scan required! This is not about local artwork, but images from online devices etc. which can’t be resized at scan time.
                      Michael

                      "It doesn't work - what shall I do?" - "Please check your server.log and/or scanner.log file!"
                      (LMS: Settings/Information)

                      Comment


                      • #12
                        Hi Michael,

                        after installing your plugin and checking the box use seperate scaler
                        Code:
                        service logitechmediaserver status
                        (RPIOS aarch64 on3B+) gives:

                        Code:
                        Can't open perl script "/usr/sbin/gdresized.pl": No such file or directory
                        Is there missing something?
                        Last edited by Rasputin_GY; 2023-06-03, 16:45. Reason: my english is not the yellow from the egg

                        Comment


                        • #13
                          Originally posted by mherger
                          No scan required! This is not about local artwork, but images from online devices etc. which can’t be resized at scan time.
                          OK, will play some internet radio stations for a while and see what comes up in the log.

                          Comment


                          • #14
                            Originally posted by Rasputin_GY
                            after installing your plugin and checking the box use seperate scaler
                            Code:
                            service logitechmediaserver status
                            (RPIOS aarch64 on3B+) gives:

                            Code:
                            Can't open perl script "/usr/sbin/gdresized.pl": No such file or directory
                            Is there missing something?
                            Yep, the Linux packages need some more tweaks. Please give the next nightly another try. Thanks for the heads up!
                            Michael

                            "It doesn't work - what shall I do?" - "Please check your server.log and/or scanner.log file!"
                            (LMS: Settings/Information)

                            Comment


                            • #15
                              Originally posted by gegen

                              OK, will play some internet radio stations for a while and see what comes up in the log.
                              I did a reboot of my piCorePlayer which has LMS installed on it. I do now have the /tmp/sbs_artwork file in tmp (sorry I did not check again to see if it was there before the reboot)
                              Have been playing internet radio on various SB Radios for a while and the log set to INFO looks like this now:

                              [23-06-03 20:24:41.0798] main::init (380) Starting Logitech Media Server (v8.4.0, 1685538966, Wed 31 May 2023 03:31:50 PM CEST) perl 5.032001 - aarch64-linux-thread-multi
                              [23-06-03 20:26:05.1003] Slim::Web::ImageProxy::Cache::cleanup (513) Skipping cache purge due to client activity: Jack's Radio
                              [23-06-03 20:34:31.0284] Slim::Web::ImageProxy::Cache::cleanup (513) Skipping cache purge due to client activity: Office
                              [23-06-03 20:40:33.7700] Slim::Web::ImageProxy::Cache::cleanup (524) ImageProxy cache purge: 0 records - 0.000896 sec
                              [23-06-04 04:40:33.7697] Slim::Web::ImageProxy::Cache::cleanup (513) Skipping cache purge due to client activity: Jack's Radio
                              [23-06-04 04:46:31.0483] Slim::Web::ImageProxy::Cache::cleanup (513) Skipping cache purge due to client activity: Jack's Radio
                              [23-06-04 04:54:28.9492] Slim::Web::ImageProxy::Cache::cleanup (513) Skipping cache purge due to client activity: Jack's Radio
                              [23-06-04 05:00:46.1836] Slim::Web::ImageProxy::Cache::cleanup (513) Skipping cache purge due to client activity: Jack's Radio
                              [23-06-04 05:06:53.9428] Slim::Web::ImageProxy::Cache::cleanup (513) Skipping cache purge due to client activity: Jack's Radio
                              [23-06-04 05:15:09.4916] Slim::Web::ImageProxy::Cache::cleanup (513) Skipping cache purge due to client activity: Jack's Radio
                              [23-06-04 05:20:49.5614] Slim::Web::ImageProxy::Cache::cleanup (513) Skipping cache purge due to client activity: Jack's Radio
                              [23-06-04 05:29:28.5666] Slim::Web::ImageProxy::Cache::cleanup (513) Skipping cache purge due to client activity: Jack's Radio
                              [23-06-04 05:38:27.8741] Slim::Web::ImageProxy::Cache::cleanup (513) Skipping cache purge due to client activity: Jack's Radio
                              [23-06-04 05:48:02.6849] Slim::Web::ImageProxy::Cache::cleanup (513) Skipping cache purge due to client activity: Jack's Radio
                              [23-06-04 05:56:15.6823] Slim::Web::ImageProxy::Cache::cleanup (513) Skipping cache purge due to client activity: Jack's Radio
                              [23-06-04 06:05:59.6830] Slim::Web::ImageProxy::Cache::cleanup (513) Skipping cache purge due to client activity: Jack's Radio
                              [23-06-04 06:11:02.1226] Slim::Web::ImageProxy::Cache::cleanup (513) Skipping cache purge due to client activity: Jack's Radio
                              [23-06-04 06:17:32.7389] Slim::Web::ImageProxy::Cache::cleanup (513) Skipping cache purge due to client activity: Jack's Radio
                              [23-06-04 06:26:22.0085] Slim::Web::ImageProxy::Cache::cleanup (513) Skipping cache purge due to client activity: Jack's Radio
                              [23-06-04 06:31:38.6798] Slim::Web::ImageProxy::Cache::cleanup (513) Skipping cache purge due to client activity: Jack's Radio
                              [23-06-04 06:40:51.4859] Slim::Web::ImageProxy::Cache::cleanup (513) Skipping cache purge due to client activity: Jack's Radio
                              [23-06-04 06:46:08.9553] Slim::Web::ImageProxy::Cache::cleanup (513) Skipping cache purge due to client activity: Jack's Radio
                              [23-06-04 06:53:43.6055] Slim::Web::ImageProxy::Cache::cleanup (513) Skipping cache purge due to client activity: Jack's Radio
                              [23-06-04 06:59:10.3600] Slim::Web::ImageProxy::Cache::cleanup (513) Skipping cache purge due to client activity: Jack's Radio
                              [23-06-04 07:05:09.6920] Slim::Web::ImageProxy::Cache::cleanup (513) Skipping cache purge due to client activity: Jack's Radio
                              [23-06-04 07:12:57.7940] Slim::Web::ImageProxy::Cache::cleanup (513) Skipping cache purge due to client activity: Jack's Radio
                              [23-06-04 07:19:53.5719] Slim::Web::ImageProxy::Cache::cleanup (513) Skipping cache purge due to client activity: Mike's Radio
                              [23-06-04 07:29:32.2009] Slim::Web::ImageProxy::Cache::cleanup (513) Skipping cache purge due to client activity: Mike's Radio
                              [23-06-04 07:35:00.3236] Slim::Web::ImageProxy::Cache::cleanup (513) Skipping cache purge due to client activity: Mike's Radio
                              [23-06-04 07:43:50.0687] Slim::Web::ImageProxy::Cache::cleanup (513) Skipping cache purge due to client activity: Mike's Radio
                              [23-06-04 07:50:00.2470] Slim::Web::ImageProxy::Cache::cleanup (513) Skipping cache purge due to client activity: Mike's Radio
                              [23-06-04 07:56:44.0848] Slim::Web::ImageProxy::Cache::cleanup (524) ImageProxy cache purge: 0 records - 0.000545 sec
                              [23-06-04 15:56:44.0844] Slim::Web::ImageProxy::Cache::cleanup (513) Skipping cache purge due to client activity: Office
                              [23-06-04 16:04:50.3807] Slim::Web::ImageProxy::Cache::cleanup (513) Skipping cache purge due to client activity: Office
                              [23-06-04 16:10:46.2342] Slim::Web::ImageProxy::Cache::cleanup (513) Skipping cache purge due to client activity: Office
                              [23-06-04 16:17:07.6015] Slim::Web::ImageProxy::Cache::cleanup (513) Skipping cache purge due to client activity: Office
                              [23-06-04 16:23:32.4496] Slim::Web::ImageProxy::Cache::cleanup (513) Skipping cache purge due to client activity: Office
                              [23-06-04 16:29:31.4599] Slim::Web::ImageProxy::Cache::cleanup (513) Skipping cache purge due to client activity: Office
                              [23-06-04 16:35:56.6109] Slim::Web::ImageProxy::Cache::cleanup (513) Skipping cache purge due to client activity: Office
                              [23-06-04 16:44:14.0208] Slim::Web::ImageProxy::Cache::cleanup (513) Skipping cache purge due to client activity: Office
                              [23-06-04 16:49:58.8393] Slim::Web::ImageProxy::Cache::cleanup (513) Skipping cache purge due to client activity: Office
                              [23-06-04 16:57:20.9694] Slim::Web::ImageProxy::Cache::cleanup (513) Skipping cache purge due to client activity: Office
                              [23-06-04 17:04:06.3581] Slim::Web::ImageProxy::Cache::cleanup (513) Skipping cache purge due to client activity: Office
                              [23-06-04 17:09:38.6760] Slim::Web::ImageProxy::Cache::cleanup (513) Skipping cache purge due to client activity: Office
                              [23-06-04 17:17:32.9892] Slim::Web::ImageProxy::Cache::cleanup (513) Skipping cache purge due to client activity: Office
                              [23-06-04 17:23:09.1445] Slim::Web::ImageProxy::Cache::cleanup (513) Skipping cache purge due to client activity: Office​

                              If that looks OK maybe I just needed to reboot piCorePlayer, all the radios seem fast at loading artwork so no probs there, thanks for looking.
                              Last edited by gegen; 2023-06-04, 17:32.

                              Comment

                              Working...
                              X
                              😀
                              🥰
                              🤢
                              😎
                              😡
                              👍
                              👎