Announcement

Collapse
No announcement yet.

ANNOUNCE: Squeezelite-ESP32 (dedicated thread)

Collapse
X
 
  • Time
  • Show
Clear All
new posts

  • sle118 or @philippe_44​ I saw a sneak preview of an Ethernet board with Squeezeamp a while back , and was wondering how things are coming along with the board, but also on the software side. This would be a general info question , and not in any way meant as a nudge.

    Comment


    • Is there a way to change the amp switching GPIO to active low instead of active high, please?

      Comment


      • Originally posted by knorst
        Do you guys have a cheap esp32 development-board from AliExpress in mind?
        It seems, that those cheap wrover cam-boards are causing a lot of problems.
        Not directly responsive to your request from a source on AliExpress, but Mouser have the Espressif DevkitC board available for $11. I have bought a few of these and they work without any problem.

        Comment


        • Originally posted by justjason
          sle118 or @philippe_44​ I saw a sneak preview of an Ethernet board with Squeezeamp a while back , and was wondering how things are coming along with the board, but also on the software side. This would be a general info question , and not in any way meant as a nudge.
          I have not seen the sneak preview that you refer to in your post, but the README of the squeezelite-esp32 software provides information about the Ethernet chips / boards that are supported by the WROVER ESP32 module in combination with the squeezelite-esp32 software. Search for the word "ethernet" on this README page.

          Although it is mentioned that Ethernet support requires the "unpublished" v4.3 version of squeezelite-esp32, this v4.3 software is actually available for download . As far as I know a Squeezeamp board with ethernet connector does not exist (yet). So you would need to connect/solder the mentioned ethernet boards to mentioned GPIO pins of the WROVER module (when using an ethernet board with RMII interface), or to the SPI interface of the WROVER module (when using an ethernet board with SPI interface).
          Last edited by CJS; 2023-03-08, 10:10.
          | LMS 8.3.2 on Linux Mint 21.2 | Squeezebox Boom | RPi0W + pCP 8.2.0 + HiFiBerry DAC Zero | ESP Muse Luxe |

          Comment


          • Originally posted by CJS
            I have not seen the sneak preview that you refer to in your post,
            If you search through the channel photos you will find it.

            Comment


            • Originally posted by justjason
              If you search through the channel photos you will find it.
              I suppose you mean the picture of the board that sle118 refers to as SqueezeIO design in post number 1791? That board looks for sure interesting. But I don't think that it is a "Squeezeamp" board, in the sense that it does not have an audio power amplifier.

              According to the description that sle118 gives in post 1780, the SqueezeIO design "is a board that has Ethernet and simultaneous optical and RCA digital out as well as analog out... In addition to analog in".
              Last edited by CJS; 2023-03-08, 16:06.
              | LMS 8.3.2 on Linux Mint 21.2 | Squeezebox Boom | RPi0W + pCP 8.2.0 + HiFiBerry DAC Zero | ESP Muse Luxe |

              Comment


              • Originally posted by CJS
                I suppose you mean the picture of the board that sle118 refers to as SqueezeIO design in post number 1791? That board looks for sure interesting. But I don't think that it is a "Squeezeamp" board, in the sense that it does not have an audio power amplifier.

                According to the description that sle118 gives in post 1780, the SqueezeIO design "is a board that has Ethernet and simultaneous optical and RCA digital out as well as analog out... In addition to analog in".
                This is exact. It is meant to be plugged into an external amplifier and it might (with a big emphasis on *might*) allow some day to also inject an analog source back into LMS to distribute and synchronize across all zones. Of course latency would be challenging here at the source, given that it would be directly looped back locally, but hey that's why I emphasize on *might*.

                LMS 7.9 - 1xRadio, 1xBoom, 5xDuet,3xTouch, 1 SB2. Sony PlayStation, Emby, Chromecast v1 and v2 and...
                6xSqueezeAmp, several other ESP32-Wrover boards with jumper wires flying around, some with ethernet!

                Comment


                • Hi Folks,

                  I've noticed that some of my flac files won't play on my PV DAC32. I've posted on the DAC32 thread, but it was suggested I post it here. Some analysis of the issue was done on the other thread (following my post there), for reference.

                  Hoping someone here will be able to help me understand why some of my flac files won't play on the DAC32, but do play everywhere else.

                  Thanks for your help!
                  Brawny

                  Comment


                  • Originally posted by brawny
                    I've noticed that some of my flac files won't play on my PV DAC32. I've posted on the DAC32 thread, but it was suggested I post it here. Some analysis of the issue was done on the other thread (following my post there), for reference.

                    Hoping someone here will be able to help me understand why some of my flac files won't play on the DAC32, but do play everywhere else.
                    The key question is why the FLAC file that is made available for download by brawny does play on piCorePlayer with squeezelite v1.9.9-1419-pCP, but not on ESP32 players with squeezelite-ESP32. This specific FLAC file does not play on the DAC32 with 32-bit squeezelite-ESP32 (Polyvection firmware v1.2.6), and also not on my ESP Muse Luxe with 16-bit squeezelite-ESP32 v2.1254. Maybe philippe_44 has an idea why?
                    Last edited by CJS; 2023-03-10, 19:24.
                    | LMS 8.3.2 on Linux Mint 21.2 | Squeezebox Boom | RPi0W + pCP 8.2.0 + HiFiBerry DAC Zero | ESP Muse Luxe |

                    Comment


                    • Originally posted by CJS
                      The key question is why the FLAC file that is made available for download by brawny does play on piCorePlayer with squeezelite v1.9.9-1419-pCP, but not on ESP32 players with squeezelite-ESP32. This specific FLAC file does not play on the DAC32 with 32-bit squeezelite-ESP32 (Polyvection firmware v1.2.6), and also not on my ESP Muse Luxe with 16-bit squeezelite-ESP32 v2.1254. Maybe philippe_44 has an idea why?
                      Do you have esp32 logs?
                      LMS 8.2 on Odroid-C4 - SqueezeAMP!, 5xRadio, 5xBoom, 2xDuet, 1xTouch, 1xSB3. Sonos PLAY:3, PLAY:5, Marantz NR1603, Foobar2000, ShairPortW, 2xChromecast Audio, Chromecast v1 and v2, Squeezelite on Pi, Yamaha WX-010, AppleTV 4, Airport Express, GGMM E5, RivaArena 1 & 3

                      Comment


                      • Originally posted by philippe_44
                        Do you have esp32 logs?
                        At this moment I can only tell that when I try to play mentioned FLAC file on my ESP Muse Luxe player, LMS gives the following error message (mac address of player obscured):
                        Code:
                        [23-03-10 22:09:02.5942] Slim::Player::Squeezebox2::statHandler (156) Error: xx:xx:xx:xx:xx:xx: Decoder does not support file format, code 0
                        Where can I find the esp32 logs that you mention? I am not familiar with telnet commands, but I can learn.
                        FYI, the FLAC example file that does not play on squeezelite-ESP32 can be downloaded from this post posted by brawny .

                        EDIT: I opened a telnet session on my ESP Muse Luxe. When I start playing mentioned FLAC I get following messages in the telnet terminal:

                        Code:
                        [08:39:50.329369] flac_decode:267 flac error: FLAC__STREAM_DECODER_MEMORY_ALLOCATION_ERROR
                        [08:39:50.333891] decode_thread:100 decode error
                        [08:39:50.418306] output_thread_i2s:463 Output state is 1
                        [08:39:50.560737] decode_flush:251 decode flush
                        [08:39:50.561365] output_flush:446 flush output buffer
                        [08:39:50.581360] output_thread_i2s:463 Output state is 0
                        I (2402957) muse: Called for battery service with 4.110769
                        I (2402957) battery: Voltage 4.11V
                        [08:40:20.860157] output_thread_i2s:463 Output state is -1
                        [08:40:20.860713] output_thread_i2s:467 switching off amp GPIO 21
                        [08:39:50.162816] stream_thread:264 headers: len: 493
                        HTTP/1.1 200 OK
                        Server: Logitech Media Server (8.3.2 - 1677516824)
                        Connection: close
                        Content-Type: audio/x-flac
                        Set-Cookie: Squeezebox-albumView=; path=/
                        Set-Cookie: Squeezebox-expandPlayerControl=true; path=/
                        Set-Cookie: Squeezebox-expanded-MY_MUSIC=0; path=/
                        Set-Cookie: Squeezebox-expanded-FAVORITES=0; path=/
                        Set-Cookie: Squeezebox-expanded-PLUGINS=0; path=/
                        Set-Cookie: Squeezebox-expanded-PLUGIN_MY_APPS_MODULE_NAME=0; path=/
                        Set-Cookie: Squeezebox-expanded-RADIO=0; path=/
                        Last edited by CJS; 2023-03-10, 21:50.
                        | LMS 8.3.2 on Linux Mint 21.2 | Squeezebox Boom | RPi0W + pCP 8.2.0 + HiFiBerry DAC Zero | ESP Muse Luxe |

                        Comment


                        • Hi,

                          is there any way to auto start a favorite like there is in piCorePlayer? I installed Craig's AutoPlay plugin, but I can't find a way to define which player should auto-start which favorite.

                          Comment


                          • Originally posted by CJS
                            At this moment I can only tell that when I try to play mentioned FLAC file on my ESP Muse Luxe player, LMS gives the following error message (mac address of player obscured):
                            Code:
                            [23-03-10 22:09:02.5942] Slim::Player::Squeezebox2::statHandler (156) Error: xx:xx:xx:xx:xx:xx: Decoder does not support file format, code 0
                            Where can I find the esp32 logs that you mention? I am not familiar with telnet commands, but I can learn.
                            FYI, the FLAC example file that does not play on squeezelite-ESP32 can be downloaded from this post posted by brawny .

                            EDIT: I opened a telnet session on my ESP Muse Luxe. When I start playing mentioned FLAC I get following messages in the telnet terminal:

                            Code:
                            [08:39:50.329369] flac_decode:267 flac error: FLAC__STREAM_DECODER_MEMORY_ALLOCATION_ERROR
                            [08:39:50.333891] decode_thread:100 decode error
                            [08:39:50.418306] output_thread_i2s:463 Output state is 1
                            [08:39:50.560737] decode_flush:251 decode flush
                            [08:39:50.561365] output_flush:446 flush output buffer
                            [08:39:50.581360] output_thread_i2s:463 Output state is 0
                            I (2402957) muse: Called for battery service with 4.110769
                            I (2402957) battery: Voltage 4.11V
                            [08:40:20.860157] output_thread_i2s:463 Output state is -1
                            [08:40:20.860713] output_thread_i2s:467 switching off amp GPIO 21
                            [08:39:50.162816] stream_thread:264 headers: len: 493
                            HTTP/1.1 200 OK
                            Server: Logitech Media Server (8.3.2 - 1677516824)
                            Connection: close
                            Content-Type: audio/x-flac
                            Set-Cookie: Squeezebox-albumView=; path=/
                            Set-Cookie: Squeezebox-expandPlayerControl=true; path=/
                            Set-Cookie: Squeezebox-expanded-MY_MUSIC=0; path=/
                            Set-Cookie: Squeezebox-expanded-FAVORITES=0; path=/
                            Set-Cookie: Squeezebox-expanded-PLUGINS=0; path=/
                            Set-Cookie: Squeezebox-expanded-PLUGIN_MY_APPS_MODULE_NAME=0; path=/
                            Set-Cookie: Squeezebox-expanded-RADIO=0; path=/
                            Interesting .. the flac decoder fails due to a memory limitation. Have you posted it ? (I think you did) to know what are the parameters used that claim such amount of memory.
                            LMS 8.2 on Odroid-C4 - SqueezeAMP!, 5xRadio, 5xBoom, 2xDuet, 1xTouch, 1xSB3. Sonos PLAY:3, PLAY:5, Marantz NR1603, Foobar2000, ShairPortW, 2xChromecast Audio, Chromecast v1 and v2, Squeezelite on Pi, Yamaha WX-010, AppleTV 4, Airport Express, GGMM E5, RivaArena 1 & 3

                            Comment


                            • Originally posted by philippe_44
                              Interesting .. the flac decoder fails due to a memory limitation. Have you posted it ? (I think you did) to know what are the parameters used that claim such amount of memory.
                              Is your question with which parameter settings this particular FLAC file (that does not play on Squeezelite-ESP32 players) is encoded? Unfortunately I don't know. The flac file was uploaded by forum member brawny in this post in the DAC32 thread. If you want you can download the flac file and investigate. I can only say that program mp3tag reports that the FLAC is encoded with libFLAC 1.3.0 (20130526), and that FLAC.exe v1.4.2 (using flac.exe -t filename.flac) does not report any error on this flac.

                              Let me try to give a summary / history of the issue:
                              • Member brawny posted in this post in the DAC32 thread that certain flac files in his large collection of flac files do NOT play on his DAC32 player, but DO play on all other squeezebox players (including pCP) as well as on other software players.
                              • On request he uploaded an example flac file that does not play on his DAC32 player
                              • Member kidstypike confirmed that the example FLAC also does not play on his DAC32 player (but that it did play after re-encoding to FLAC using "EZ CD Audio Converter").
                              • I (CJS) can confirm that the example FLAC ​also does not play on my ESP Muse Luxe (tested with firmware v1.0-1254-16)

                              Further testing that I did:
                              The example FLAC plays fine on:
                              • Squeezebox Boom
                              • piCorePlayer with squeezelite v1.9.9-1419-pCP on RPi Zero
                              • Squeezebox Controller player with firmware 8.0.1-r16907
                              • SqueezePlay v8.0.1r1420 on Windows.
                              The example FLAC does NOT play on:
                              • DAC32 player with latest PolyVection firmware v1.2.6 (tested by others)
                              • ESP Muse Luxe with firmware v1.0-1254-16 (tested by me)
                              So it seems that for some reason the example FLAC only does not play on players with squeezelite-ESP32 firmware.
                              I have re-encoded the FLAC to FLAC using ffmpeg.exe v5.1.2, and the re-encoded FLAC plays fine on my ESP Muse Luxe player.

                              FYI, I used following command for re-encoding:
                              Code:
                              ffmpeg -i input.flac -c:v copy -acodec flac -compression_level 5 output.flac
                              Option "-c:v copy" is used to avoid re-encoding of the embedded cover art by ffmpeg. So only the audio is re-encoded to FLAC, and meta data remains unchanged (except FLAC version is now reported as Lavf58.76.100). Compression_level 5 is the default ffmpeg compression level for flac. The resulting re-encoded FLAC file that does play on my ESP Muse Luxe is marginally smaller than the original FLAC. This indicates that the original FLAC was encoded with average compression level.

                              Re-encoding FLAC files would be a workaround, but it would be better if squeezelite-ESP32 can play these FLAC files that can be played on other players without problem. The ESP32 log suggests a memory limitation (flac_decode:267 flac error: FLAC__STREAM_DECODER_MEMORY_ALLOCATION_ERROR), but then I wonder why other players including squeezelite do not report a similar problem.

                              philippe_44 , let me know if you want me to open an issue on squeezelite-esp32 github.

                              ======================

                              EDIT 2023-03-14: Today I discovered that I can make the example FLAC file playable on ESP32 by using ffmpeg to only update the metadata in the FLAC file, so WITHOUT re-encoding the audio! Following command was used to update the metadata:

                              Code:
                              ffmpeg -i input.flac -c:v copy -c:a copy output.flac
                              By using options "-c:v copy" and "-c:a copy" both the artwork and the audio stream stay the same. The resulting output FLAC appears to be playable on my ESP Muse Luxe player. This seems to indicate that some metadata in the original flac file causes a flac decode error with squeezelite-ESP32.

                              I don't much about the FLAC format, but will try to find out which are the differences in meta data between the original FLAC (that does not play on ESP32) and the updated FLAC (that does play on ESP32). I will post my findings in a follow-up post.
                              Last edited by CJS; 2023-03-14, 18:40.
                              | LMS 8.3.2 on Linux Mint 21.2 | Squeezebox Boom | RPi0W + pCP 8.2.0 + HiFiBerry DAC Zero | ESP Muse Luxe |

                              Comment


                              • Originally posted by CJS
                                EDIT 2023-03-14: Today I discovered that I can make the example FLAC file playable on ESP32 by using ffmpeg to only update the metadata in the FLAC file, so WITHOUT re-encoding the audio!
                                Following command was used to update the metadata:

                                Code:
                                ffmpeg -i input.flac -c:v copy -c:a copy output.flac
                                ​ ....
                                I will try to find out which are the differences in meta data between the original FLAC (that does not play on ESP32) and the updated FLAC (that does play on ESP32). I will post my findings in a follow-up post.
                                OK, this is my follow-up. I have compared the metadata of the example FLAC that does not play on ESP32 players, and the FLAC with updated metadata that does play on my ESP32 player. For examining the metadata I used the "metaflac.exe" tool that comes with FLAC for Windows.

                                It appears that the posted example file has an empty METADATA_BLOCK_SEEKTABLE with the following content:
                                Code:
                                METADATA block #2
                                  type: 3 (SEEKTABLE)
                                  is last: false
                                  length: 0
                                  seek points: 0
                                It appears that ffmpeg removes this empty seektable metadata when re-encoding the FLAC, and also when updating the metadata without re-encoding by using the ffmpeg command​ quoted above. And then the FLAC becomes playable on my ESP32 player. I got the same result by removing the empty SEEKTABLE metablock by using the metaflac tool as follows:
                                Code:
                                metaflac.exe --remove --block-type=SEEKTABLE original.flac
                                => Apparently Squeezelite-ESP32 does not play FLAC files that have an empty SEEKTABLE metadata block, while other players tolerate an empty seektable metadata block.

                                ===========================

                                EDIT: For who is interested, further technical details are provided below.
                                The table below shows a comparison of the METADATA blocks of the original FLAC (ESP32_NOPLAY.flac) and the updated FLAC (ESP32_PLAY.flac):
                                Code:
                                ​+-----------+---------------------------+--------------------------+
                                | Flacfile  |  ESP32_NOPLAY.flac        |    ESP32_PLAY.flac       |
                                +-----------+---------------------------+--------------------------+
                                | block #0  |     type: 0 (STREAMINFO)                             |
                                |           |     total samples: 7592844                           |
                                |           |     MD5 signature: dc12a8a89fd9f0f25a0f0d38d875d8fc  |
                                +-----------+---------------------------+--------------------------+
                                | block #1  |     type: 4 (VORBIS_COMMENT)                         |
                                |           |     vendor string: reference libFLAC 1.3.0 20130526  |
                                |           |     comments: 14                                     |
                                +-----------+---------------------------+--------------------------+
                                | block #2  |  type: 3 (SEEKTABLE)      |    type: 6 (PICTURE)     |
                                |           |  length: 0                |    length: 121085        |
                                |           |  seek points: 0           |    data length: 121043   |
                                +-----------+---------------------------+--------------------------+
                                | block #3  |  type: 6 (PICTURE)        |    type: 1 (PADDING)     |
                                |           |  length: 121085           |    is last: true         |
                                |           |  data length: 121043      |    length: 3082          |
                                +-----------+---------------------------+--------------------------+
                                | block #4  |  type: 1 (PADDING)        |                          |
                                |           |  is last: true            |                          |
                                |           |  length: 3078             |                          |
                                +-----------+---------------------------+--------------------------+
                                COMPARISON OF METADATA:
                                1) STREAMINFO, VORBIS_COMMENT and PICTURE blocks in both files are identical.
                                2) File that does not play on ESP32 has an "empty" SEEKTABLE block with length: 0 and seek points: 0.
                                3) After removing the empty SEEKTABLE metadata block with ffmpeg (automatically) or metaflac (explicitly) the FLAC file becomes playable on ESP32 players.

                                I will create an Issue (problem report) on the squeezelite-esp32 github, and refer to this forum post.​
                                EDIT: Issue 231 has been created on squeezelite-esp32 gitbub.
                                Last edited by CJS; 2023-03-15, 08:16.
                                | LMS 8.3.2 on Linux Mint 21.2 | Squeezebox Boom | RPi0W + pCP 8.2.0 + HiFiBerry DAC Zero | ESP Muse Luxe |

                                Comment

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