Announcement

Collapse
No announcement yet.

Subsonic Plugin - player hang when format changes mp3 -> flac or flac -> mp3

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

    Subsonic Plugin - player hang when format changes mp3 -> flac or flac -> mp3

    > repo can be found here :
    > http://www.foobarjo.org/LMS/foobarjo-stable.xml


    Ok, added it to the main repository file. Should show up in the next few
    hours.

    --

    Michael
    jo

    #2
    Subsonic Plugin - player hang when format changes mp3 -> flac or flac -> mp3

    Hi all,

    I'm coding a plugin to use a subsonic server as stream source.

    Looks good so far but i face two issues i didn't figure out yet.
    For bandwidth reasons music is trancoded on the subsonic side, based on the settings of the plugin pannel.

    Transcoding options are mp3 ’64k’, ‘128k’, ‘256k’, ‘320k’, and raw/disabled -> streams the file as is. flac in my case.

    When switching from mp3 to flac or from flac to mp3 (switching from 64k to 320k works flawlessly), the player hang and there is noway to replay a song that have been played in the previous format. Songs that have never been played can be played after some delay and after a player (squeezeplay) restart.

    [18-03-27 14:12:05.1456] Plugins::Subsonic::ProtocolHandler::__ANON__ (173) stream: https://private.org:4443/rest/stream?id=128641&format=raw&u=jo&t=5cb7a95347f96da f923094015ef941c1&s=eBBctvSio&v=1.16.0&f=json&c=sl im
    [18-03-27 14:12:05.3434] Plugins::Subsonic::ProtocolHandler:arseDirectHeaders (104) type: audio/flac
    [18-03-27 14:12:05.3436] Plugins::Subsonic::ProtocolHandler:arseDirectHeaders (105) length: 12861304

    [18-03-27 14:13:04.6153] Plugins::Subsonic::ProtocolHandler::__ANON__ (173) stream: https://private.org:4443/rest/stream?id=128641&format=mp3&estimateContentLength= true&maxBitRate=256&u=jo&t=27408e82dff8c7ffabd6365 960b03923&s=D5ImY8mfA&v=1.16.0&f=json&c=slim
    [18-03-27 14:13:06.4006] Plugins::Subsonic::ProtocolHandler:arseDirectHeaders (104) type: audio/mpeg
    [18-03-27 14:13:06.4009] Plugins::Subsonic::ProtocolHandler:arseDirectHeaders (105) length: 5632000

    Header is updated as well as metadatas.

    I don't know where to go from there.

    Thanks for reading, any help appreciated guys.

    Jo
    jo

    Comment


      #3
      I think we'd need much more information (or even the code...) to understand what really is going on there. Eg. are those URLs the URLs that you'd receive browsing the content? Or you use the protocol handler to convert something like myplugin://12345.mp3 into that URL?

      The latter actually is what I would recommend you to do. And make sure that URL already comes with the correct extension.
      Michael

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

      Comment


        #4
        Originally posted by mherger View Post
        I think we'd need much more information (or even the code...) to understand what really is going on there. Eg. are those URLs the URLs that you'd receive browsing the content? Or you use the protocol handler to convert something like myplugin://12345.mp3 into that URL?

        The latter actually is what I would recommend you to do. And make sure that URL already comes with the correct extension.
        It actually is a "subsonic://" url.

        Plugin can be downloaded there
        and here is repo xml

        I can provide an account to a subsonic server in pm if needed, as you probably don't have that under the hand.
        jo

        Comment


          #5
          Before I even look at the code: use the version number in the download file name. Otherwise you'll be facing all kinds of issues due to caching.
          Michael

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

          Comment


            #6
            Originally posted by mherger View Post
            Before I even look at the code: use the version number in the download file name. Otherwise you'll be facing all kinds of issues due to caching.
            Ok thanks.
            done.
            jo

            Comment


              #7
              Subsonic Plugin - player hang when format changesmp3 -> flac or flac -> mp3

              That's looking pretty promising! And quite snappy, too.

              As I mentioned in my first posting I would use a file extension defining
              the content type, plus even the bitrate as part of the "filename". I
              don't remember the details, but I remember that I failed to have generic
              URLs for TIDAL's FLAC/MP3 streams. Eventually went back to using the
              file extension, as somewhere deep in the code LMS makes assumptions
              about what the file might be based on this.

              I know that this means you define the sound quality when you browse the
              collection. But IMHO this shouldn't be a problem, as users hardly will
              change quality all the time.

              So... make it something like 123456-128.mp3 or abcdef.flac. Then use
              these chunks of information rather then the prefs to build the actual
              URL in the protocol handler.
              --

              Michael
              Michael

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

              Comment


                #8
                I'm glad you liked it.

                I'll try that suffix thing and see.
                But as you said in a normal operation users won't change those settings often, so we may just prevent them that have to wait a little bit or restart and clear everything when they modify the transcoding thing.

                Whatevver thanks again Michael.
                Last edited by foobarjo; 2018-03-27, 19:11.
                jo

                Comment


                  #9
                  Originally posted by mherger View Post
                  That's looking pretty promising! And quite snappy, too.

                  As I mentioned in my first posting I would use a file extension defining
                  the content type, plus even the bitrate as part of the "filename". I
                  don't remember the details, but I remember that I failed to have generic
                  URLs for TIDAL's FLAC/MP3 streams. Eventually went back to using the
                  file extension, as somewhere deep in the code LMS makes assumptions
                  about what the file might be based on this.

                  I know that this means you define the sound quality when you browse the
                  collection. But IMHO this shouldn't be a problem, as users hardly will
                  change quality all the time.

                  So... make it something like 123456-128.mp3 or abcdef.flac. Then use
                  these chunks of information rather then the prefs to build the actual
                  URL in the protocol handler.
                  --

                  Michael
                  Ola Michael,

                  I did just as you said, recode the thing to get the suffix and bitrate into the url, and you know what?
                  It did work i'd never figure that out by myself. thank you man, you really are the guy !

                  By the way i've also implemented one or two more things and i think i'm getting close to a release.
                  Have you got any idea of where to go next?
                  Last edited by foobarjo; 2018-04-04, 01:57.
                  jo

                  Comment


                    #10
                    Subsonic Plugin - player hang when format changesmp3 -> flac or flac -> mp3

                    > Have you got any idea of where to go next?

                    Where to go next in what regard?

                    --

                    Michael
                    Michael

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

                    Comment


                      #11
                      Originally posted by mherger View Post
                      > Have you got any idea of where to go next?

                      Where to go next in what regard?

                      --

                      Michael
                      I mean, is there a place where to refrence the pluggin or something like that?
                      jo

                      Comment


                        #12
                        Your repo.xml seems to be gone? But you have a web server. Upload the plugin (with a version number in the file name ;-)) and the repo.xml to some public space. Let me know about the repo's URL and I can include it in the main repository.
                        Michael

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

                        Comment


                          #13
                          All right, so i changed the name of the plugin to SqueezeSonic but everything else is in the place.

                          repo can be found here : http://www.foobarjo.org/LMS/foobarjo-stable.xml
                          Github (just in case): https://github.com/foobarjo/SqueezeSonic

                          thank you Michael
                          jo

                          Comment


                            #14
                            Hello there,

                            The repo went https so the new link is https://foobarjo.org/LMS/foobarjo-stable.xml
                            Hope your doing well

                            Thanks
                            jo

                            Comment


                              #15
                              ceet expired

                              Hi there,

                              The ssl cert expired but it's fixed now and the repo is back online



                              thanks

                              jo
                              jo

                              Comment

                              Working...
                              X