Home of the Squeezebox™ & Transporter® network music players.
Page 1 of 2 12 LastLast
Results 1 to 10 of 11
  1. #1
    Senior Member
    Join Date
    May 2008
    Location
    Canada
    Posts
    3,305

    Force transcoding from plugin or have LMS accept raw ALAC

    Following the thread on bufferthreshold, I'm thinking of changing a bit the audio format used in ShairTunes2. Currently, ShairTunes2 helper receives ALAC from iXXXX devices, decodes it to plain 16/44.1 and then forward that to LMS. Although I've solved the buffering issue, this is a bit an onerous solution when streaming to synchronized players as all streams are 16/44.1 (for no real benefit compared to FLAC or ALAC). As discussed with bpa, there are 2 solutions to change that:

    1- not decoding ALAC and sending it to LMS (assuming it's really encoded audio and not only PCM wrapped into ALAC frames and sending that directly to LMS)
    2- decoding to PCM and then forcing LMS to re-encode to FLAC (I'm not willing to do the re-encoding in the helper as it will be again, a lot of complication with multi-platform options)

    I'm stuck in 1- as I don't know how to send raw ALAC to LMS. It seems that a m4a format wrapper is needed and that's format is a pain. Is this correct or is there a was to send ALAC frames directly to LMS?

    I'm stuck in 2- as I don't know how a plugin can force LMS to re-encode to a different format. I know users can play with custom-convert, but I don't want to force everybody to do that nor do I want to force a player to fully disable PCM (always sending FLAC) - I just want to do that when the PCM stream comes from my plugin (it contains a protocolhandler that is a very simple subclassing of HTTP)

    Any idea?

    Thanks
    LMS 7.7, 7.8 and 7.9 - 5xRadio, 3xBoom, 4xDuet, 1xTouch, 1 SB2. Sonos PLAY:3, PLAY:5, Marantz NR1603, JBL OnBeat, XBoxOne, XBMC, Foobar2000, ShairPortW, JRiver 21, 2xChromecast Audio, Chromecast v1 and v2, , Pi B3, B2, Pi B+, 2xPi A+, Odroid-C1, Odroid-C2, Cubie2, Yamaha WX-010, AppleTV 4, Airport Express, GGMM E5

  2. #2
    Babelfish's Best Boy mherger's Avatar
    Join Date
    Apr 2005
    Location
    Switzerland
    Posts
    19,782

    Force transcoding from plugin or have LMS acceptraw ALAC

    I haven't looked into this, and it's not my field of expertise. But
    could you define your own, custom content-type in the helper app (eg.
    audio/xxaac or the like) and provide a custom-convert.conf with your plugin?

    --

    Michael

  3. #3
    Senior Member
    Join Date
    Oct 2005
    Location
    Ireland
    Posts
    15,332
    You offer two option.

    For option 2 As per mherger I would define a custom type so use either plugin to ioverride or possible chaneg the URL to ensure your custom rule is executed.

    For option 1 - in the BBCiPlayer DASH format I convert AAC which is in a streaming mpeg2-ts format (m4a for streaming / ISO Base media file format ISO 14496) and re-wrap aac with the simple ADTS wrapping used with http/aac streams - which is understood by faad. I can't see why this approach won't work with ALAC as I assume airtune will be using a streamed mpeg2 transport and not the file version of mpeg4 file transport.

    edit:

    I tried to create an ALAC stream in an ADTS file but refuses ffmpeg/avconv as it says it's illegal - so option 1 would need a bit more work.
    Last edited by bpa; 2016-12-26 at 15:29.

  4. #4
    Babelfish's Best Boy mherger's Avatar
    Join Date
    Apr 2005
    Location
    Switzerland
    Posts
    19,782
    Philippe - not sure whether you're still working on this. But I just remembered a while back I merged a rather big change to allow for much more transcoding customization per player or even sync group. TBH quite honest: I remember it because I had a bad feeling about it... I'm even tempted to revert it, as from today's POV it seems to just cover a rather esoteric need of one single person, introducing a lot of complexity and potential problems to the code for all users. Now if you could make good use of it, that would be one reason not to revert it...

    Basically diff against revision f8794c5569f3aa0301b9440133a21e5f313c4459 to see the changes. I've asked the author to provide some documentation. Not sure we'll see any.
    Michael

    http://www.herger.net/slim-plugins - Spotty, MusicArtistInfo

  5. #5
    Senior Member
    Join Date
    May 2008
    Location
    Canada
    Posts
    3,305
    Quote Originally Posted by mherger View Post
    Philippe - not sure whether you're still working on this. But I just remembered a while back I merged a rather big change to allow for much more transcoding customization per player or even sync group. TBH quite honest: I remember it because I had a bad feeling about it... I'm even tempted to revert it, as from today's POV it seems to just cover a rather esoteric need of one single person, introducing a lot of complexity and potential problems to the code for all users. Now if you could make good use of it, that would be one reason not to revert it...

    Basically diff against revision f8794c5569f3aa0301b9440133a21e5f313c4459 to see the changes. I've asked the author to provide some documentation. Not sure we'll see any.
    Thanks Michael - I'm still working on this (although not very active right now as I'm on vacation). I'll continue to improve ShairTunes2W and I'd like to have a reasonable balance between local (LMS) CPU and network load, so I'll look into this
    LMS 7.7, 7.8 and 7.9 - 5xRadio, 3xBoom, 4xDuet, 1xTouch, 1 SB2. Sonos PLAY:3, PLAY:5, Marantz NR1603, JBL OnBeat, XBoxOne, XBMC, Foobar2000, ShairPortW, JRiver 21, 2xChromecast Audio, Chromecast v1 and v2, , Pi B3, B2, Pi B+, 2xPi A+, Odroid-C1, Odroid-C2, Cubie2, Yamaha WX-010, AppleTV 4, Airport Express, GGMM E5

  6. #6
    Senior Member
    Join Date
    May 2008
    Location
    Canada
    Posts
    3,305
    I'm still banging (a bit) my head against the wall with that as, at home, when I try to stream to too many sycnhronized players using my ShairTunes2 version, it's obviously heavy on my WiFi network (6 players * 1.411Mbps+overhead - seems to be a bit too much). I'd really like to re-transmit the ALAC I'm receiving to the players as most of them seem support it (although I'm not sure what version of SB players support ALAC - although ALAC is one of the format authorized in slimproto).

    Isn't there a simple way to tell LMS that the input it's receiving is raw ALAC rather than to have to re-encapsulate it in m4a files ?
    LMS 7.7, 7.8 and 7.9 - 5xRadio, 3xBoom, 4xDuet, 1xTouch, 1 SB2. Sonos PLAY:3, PLAY:5, Marantz NR1603, JBL OnBeat, XBoxOne, XBMC, Foobar2000, ShairPortW, JRiver 21, 2xChromecast Audio, Chromecast v1 and v2, , Pi B3, B2, Pi B+, 2xPi A+, Odroid-C1, Odroid-C2, Cubie2, Yamaha WX-010, AppleTV 4, Airport Express, GGMM E5

  7. #7
    Babelfish's Best Boy mherger's Avatar
    Join Date
    Apr 2005
    Location
    Switzerland
    Posts
    19,782

    Force transcoding from plugin or have LMS acceptraw ALAC

    > I'm still banging (a bit) my head against the wall with that

    Can you tell us what you tried, how it failed etc.?


    --

    Michael

  8. #8
    Senior Member
    Join Date
    May 2008
    Location
    Canada
    Posts
    3,305
    Quote Originally Posted by mherger View Post
    > I'm still banging (a bit) my head against the wall with that

    Can you tell us what you tried, how it failed etc.?


    --

    Michael
    I've tried a simple encapsulation of ALAC frames in ATDS as per bpa and that does not work. I've looked for other encapsulation options and did not find any. I've not explored the option of a custom-convert as I think a lot of users won't know how to edit it and I'd like this option to be user-transparent (or at least GUI-only). Now I'm looking at building a m4a and my head explodes when I read all the headers that needs to be added (ftyp, m4a, slts and all of these, not knowing which ones are optional vs mandatory ... crap) and it looks like a lot of overhead knowing that LMS will remove all that to simply extra the frames, exactly the ones that I'd have encapsulated
    LMS 7.7, 7.8 and 7.9 - 5xRadio, 3xBoom, 4xDuet, 1xTouch, 1 SB2. Sonos PLAY:3, PLAY:5, Marantz NR1603, JBL OnBeat, XBoxOne, XBMC, Foobar2000, ShairPortW, JRiver 21, 2xChromecast Audio, Chromecast v1 and v2, , Pi B3, B2, Pi B+, 2xPi A+, Odroid-C1, Odroid-C2, Cubie2, Yamaha WX-010, AppleTV 4, Airport Express, GGMM E5

  9. #9
    Senior Member
    Join Date
    Oct 2005
    Location
    Ireland
    Posts
    15,332
    Quote Originally Posted by philippe_44 View Post
    my head explodes when I read all the headers that needs to be added
    I know that feeling - I had a headache for weeks dealing with DASH when I had to convert chunked mp4 AAC into ADTS AAC stream.

  10. #10
    Senior Member
    Join Date
    May 2008
    Location
    Canada
    Posts
    3,305
    Quote Originally Posted by bpa View Post
    I know that feeling - I had a headache for weeks dealing with DASH when I had to convert chunked mp4 AAC into ADTS AAC stream.
    Glad you say that because sometimes I'm looking at these specs and I'm telling me that I'm a real idiot as everybody seems to deal with it and it's such a pain for me
    LMS 7.7, 7.8 and 7.9 - 5xRadio, 3xBoom, 4xDuet, 1xTouch, 1 SB2. Sonos PLAY:3, PLAY:5, Marantz NR1603, JBL OnBeat, XBoxOne, XBMC, Foobar2000, ShairPortW, JRiver 21, 2xChromecast Audio, Chromecast v1 and v2, , Pi B3, B2, Pi B+, 2xPi A+, Odroid-C1, Odroid-C2, Cubie2, Yamaha WX-010, AppleTV 4, Airport Express, GGMM E5

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •