Home of the Squeezebox™ & Transporter® network music players.
Page 1 of 3 123 LastLast
Results 1 to 10 of 28
  1. #1
    Senior Member
    Join Date
    Aug 2006
    Location
    Cleveland, Ohio
    Posts
    130

    Understanding custom-convert.conf

    I'm trying to set up a custom-convert.conf rule to transcode all ALAC to FLAC for one specific player. This is related to my recent post in the DAC32 thread.

    I'm running the Dockerized official LMS, Logitech Media Server Version: 8.1.2 - 1619728303 @ Fri Apr 30 00:34:35 CEST 2021

    Here's my custom-convert.conf, which I pretty much lifted entirely from the alac->flac config in convert.conf:

    Code:
    alc flc * 7c:9e:bd:28:dd:c4
            # FT:{START=-j %s}U:{END=-e %u}D:{RESAMPLE=-r %d}
            [faad] -q -w -f 1 $START$ $END$ $FILE$ | [sox] -q -t wav - -t flac -C 0 $RESAMPLE$ -
    which is included in LMS via this docker argument:

    Code:
    -v config/custom-convert.conf:/lms/custom-convert.conf:rw
    convert.conf is factory stock.

    With the above custom-convert.conf in place, LMS doesn't seem to match on it and files don't seem to be transcoded. I can see in the File Types settings that an additional FLAC method is added to the Apple Lossless section, so I know that LMS is seeing the configuration.

    If I DISABLE the "native" method for Apple Lossless in File Types, files do get transcoded.

    I understand that more specific rules take precedence over less specific rules.

    Does custom-convert.conf take precedence over convert.conf?

    Attached are logs from player.source.
    Attached Files Attached Files

  2. #2
    Senior Member
    Join Date
    May 2008
    Location
    Canada
    Posts
    7,497
    LMS will apply the most convenient rule, in order. In your case, alac is a supported codec so it will look for an alc alc rule (as alc is the source). And because there is no need to resample, the identity rule (do-nothing) will be used
    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

  3. #3
    Senior Member
    Join Date
    Aug 2006
    Location
    Cleveland, Ohio
    Posts
    130
    Thanks, that confirmation is helpful. I had expected that a more-specific rule, such as in my custom-convert.conf would take precedence over the more general alc alc rule, but that seems not to be the case. I think it's a more specific rule because it specifies the MAC address of a specific player.

    So, is it true that as long as a player asserts support for a particular codec, such as ALAC, LMS will always default to the (in this case) alc alc rule and do nothing?

    And if I wanted to transcode ALAC to FLAC for only one specific player, I would have to disable the native ALAC support globally in File Types, write a rule to transcode ALAC to FLAC for that player, and then also write a fall through rule to pass ALAC through natively to all other players?

    Is there documentation somewhere of the order of operations for conversion rulesets?

  4. #4
    Senior Member
    Join Date
    Aug 2006
    Location
    Cleveland, Ohio
    Posts
    130
    And one more question: Is custom-convert.conf evaluated before or after convert.conf? Seems like it would need to be evaluated before for local rules to be applied.

  5. #5
    Senior Member
    Join Date
    May 2008
    Location
    Canada
    Posts
    7,497
    Quote Originally Posted by benh View Post
    And one more question: Is custom-convert.conf evaluated before or after convert.conf? Seems like it would need to be evaluated before for local rules to be applied.
    Yes, custom-convert rules are evaluated before
    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

  6. #6
    Senior Member
    Join Date
    Aug 2006
    Location
    Cleveland, Ohio
    Posts
    130
    Thanks. I still don't quite understand order of operations, then.

    Based on my (obviously) superficial understanding thus far, I would think that a transcoding rule like the one I specified above would be encountered first and be "more specific" than the alc-alc rule that appears in convert.conf. But maybe I'm incorrect in thinking that more specific wins over easiest, but I swear I read that more specific wins somewhere.

  7. #7
    Senior Member
    Join Date
    Jan 2010
    Location
    Hertfordshire
    Posts
    7,674
    Quote Originally Posted by benh View Post
    Thanks. I still don't quite understand order of operations, then.

    Based on my (obviously) superficial understanding thus far, I would think that a transcoding rule like the one I specified above would be encountered first and be "more specific" than the alc-alc rule that appears in convert.conf. But maybe I'm incorrect in thinking that more specific wins over easiest, but I swear I read that more specific wins somewhere.
    Why don't you just change the playable formats for the DAC32 as mentioned earlier?

    Sent from my Pixel 3a using Tapatalk

  8. #8
    Senior Member
    Join Date
    Aug 2006
    Location
    Cleveland, Ohio
    Posts
    130
    Quote Originally Posted by slartibartfast View Post
    Why don't you just change the playable formats for the DAC32 as mentioned earlier?

    Sent from my Pixel 3a using Tapatalk
    Fair question.

    My first answer would be that I didn't see any way to do that with the Polyvection firmware. Not clear that that option is exposed, or at least I haven't heard of how.

    My second answer would be that I kind of like the idea of addressing this issue centrally on the LMS rather than having to change playable format on what will likely be multiple esp32-based players.

    My third answer would be because I'm interested not only in a solution to my issue, but in understanding the system overall. So this is now ALSO about understanding how custom-convert.conf and convert.conf work.

  9. #9
    Senior Member
    Join Date
    May 2008
    Location
    Canada
    Posts
    7,497
    Quote Originally Posted by benh View Post
    Thanks. I still don't quite understand order of operations, then.

    Based on my (obviously) superficial understanding thus far, I would think that a transcoding rule like the one I specified above would be encountered first and be "more specific" than the alc-alc rule that appears in convert.conf. But maybe I'm incorrect in thinking that more specific wins over easiest, but I swear I read that more specific wins somewhere.
    But I'm confused - the rules above is "alc flc", not "alc alc", so if there is no reason that the alc flc rule would be used
    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

  10. #10
    Senior Member
    Join Date
    Aug 2006
    Location
    Cleveland, Ohio
    Posts
    130
    Quote Originally Posted by philippe_44 View Post
    But I'm confused - the rules above is "alc flc", not "alc alc", so if there is no reason that the alc flc rule would be used
    I think I'm confused.

    What I think I heard you say earlier is that if a player asserts that it supports, say, native ALAC decoding, LMS will find the alc alc convert.conf rule, stop there, do nothing since nothing is what is called for, and send ALAC straight to the player.

    I want to change the behavior for a specific esp32 player that asserts that it supports native ALAC decoding. Instead, I want to transcode ALAC to FLAC before sending it to that player, and that player only, no matter what the player says it can handle. I thought that I could create a custom-convert.conf rule for that player that tells it to transcode ALAC to FLAC, hence the rule I reference above.

Posting Permissions

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