Welcome to our forums! Please take a few moments to read through our Community Guidelines (also conveniently linked in the header at the top of each page). There, you'll find guidelines on conduct, tips on getting the help you may be searching for, and more!

ALAC DirectPlay

moody_bluemoody_blue Members, Plex Pass, Plex Ninja Posts: 2,417 Plex Ninja

After some years of "resistance" I'm trying to evaluate Plex for music, now that Plex has been enhanced and playlist support was made available) but I have a problem. Plex plays (DirectPlay) mp3's but tries to transcode alac's and my server cannot transcode. But alac's are supported natively by the ATV (I've been using Synology Audio Station without problem).

Probably this could be solved by changing the Plex profile (I don't know how, if someone could send me a working profile it would be superb), but I'm wondering why I can state in PlexConnect to force DirectPlay and this only applies to videos, and not to music files. Can this be changed ?

Best Answer

Answers

  • baabaa Members, Plex Pass, Forum Moderator Posts: 3,954 Forum Mod

    PlexConnect should handle it directly - see PlexAPI.py, line 1069:

                audioATVNative = \
                    Media.get('audioCodec','-') in ("mp3", "aac", "ac3", "drms", "alac", "aiff", "wav")
    

    Could you please verify, what codec is shown in the relevant PMS-XML?

  • moody_bluemoody_blue Members, Plex Pass, Plex Ninja Posts: 2,417 Plex Ninja
    edited November 2015

    Hi baa, here is the xml for one of the "problematic" files

  • moody_bluemoody_blue Members, Plex Pass, Plex Ninja Posts: 2,417 Plex Ninja

    It works with 1000, thanks. Will you change git or should I keep this as local modif ?

  • baabaa Members, Plex Pass, Forum Moderator Posts: 3,954 Forum Mod

    Hm, if done right, we have to add a couple of settings - like an AudioBitrate option. Let me think about it. :-D

  • moody_bluemoody_blue Members, Plex Pass, Plex Ninja Posts: 2,417 Plex Ninja
    edited November 2015

    According to the ATV specs (HE-AAC (V1), AAC (16 to 320 Kbps), protected AAC (from iTunes Store), MP3 (16 to 320 Kbps), MP3 VBR, Audible (formats 2, 3, and 4), Apple Lossless, AIFF, and WAV; Dolby Digital 5.1 and Dolby Digital Plus 7.1), AAC and MP3 have a 320Kbps limit, but alac, aiff and wav have no bitrate limit at all, therefore I think that the existing limit in XMLConverter.py (384Kbps) seems to make no sense. I would go for a change in XMLConverter.py and not a new parameter in settings.

  • moody_bluemoody_blue Members, Plex Pass, Plex Ninja Posts: 2,417 Plex Ninja

    I would go for something like this

            # transcoder action setting?
            # transcoder bitrate setting [kbps] -  eg. 128, 256, 384, 512?
            maxAudioBitrate = '320'
    
            audioATVNative1 = \
                Media.get('audioCodec','-') in ("mp3", "aac", "ac3", "drms")
            # check Media.get('container') as well - mp3, m4a, ...?
    
            dprint(__name__, 2, "audio: ATVNative1 - {0}", audioATVNative1)
    
            audioATVNative2 = \
                Media.get('audioCodec','-') in ("alac", "aiff", "wav")
            # check Media.get('container') as well - mp3, m4a, ...?
    
            dprint(__name__, 2, "audio: ATVNative2 - {0}", audioATVNative2)
    
            if audioATVNative2 or audioATVNative1 and\
               int(Media.get('bitrate','0')) <= int(maxAudioBitrate):
                # direct play
                res, leftover, dfltd = self.getKey(Media, srcXML, 'Part/key')
                res = PlexAPI.getDirectAudioPath(res, AuthToken)
            else:
                # request transcoding
                res, leftover, dfltd = self.getKey(Track, srcXML, 'key')
                res = PlexAPI.getTranscodeAudioPath(res, AuthToken, self.options, maxAudioBitrate)
    
  • moody_bluemoody_blue Members, Plex Pass, Plex Ninja Posts: 2,417 Plex Ninja

    Hi Baa, now that you are modifying XMLConverter.py for other purposes, can you please increase maxAudioBitrateUncompressed to 1500 ?

  • baabaa Members, Plex Pass, Forum Moderator Posts: 3,954 Forum Mod
    edited February 2016

    1500? 2000?
    Every number seems somewhat "random", doesn't it?

  • moody_bluemoody_blue Members, Plex Pass, Plex Ninja Posts: 2,417 Plex Ninja

    :))

    You are right. But I don't know the implications to other users. 2000 would be perfect.

Sign In or Register to comment.