Can I steam Apple Lossless from the Shield?

server-nvidia-shield

#1

I run my Plex Server on a Shield with media on a ReadyNAS. A lot of my music is saved as Apple Lossless, which I want to steam to a player over uPnP. The player supports Apple Lossless natively so I want to pass the data through. I can see from the logs that the server is falling back to the generic DLNA profile for pass through. So far so good. However it then complains that the bitrate is too high, and that's the end of that. I haven't been able to find a way to increase the allowed bitrate. I figured that maybe a custom DLNA profile might be needed, but I can't see how that would be put on the Shield without rooting it(?), something I don't want to do. Has anybody else hit this, and did you find a solution? I am having to fall back to Netgear's ReadyDLNA, which is OK, but isn't Plex. Happy to provide any additional information if that would be useful. Thanks for your time.


#2

I have loads of apple lossless and to my disappointment they always transcode to mp3 when streaming to my shield.

I would prefer to be able to direct stream them too. after all Apple made ALAC open source a long time ago.


#3

Thanks for the support!

Your comment and the lack of other replies confirms what I thought after spending several hours trying to figure out how I could make this work. Guess it’s not possible at the moment.

Plex Devs : Perhaps a requirement you could add to your enhancement list?

Rant : I was ‘forced’ to buy a Shield because my ReadyNAS could not run the latest the PMS. That fixed movie streaming for me. To find I cannot serve music because “audio.bitrate limitation applies: 1411 > 288” and there’s no apparent way to change this is a little frustrating. BTW I do acknowledge that it’s difficult to claim that high moral ground when the software’s free.


#4

Seems to work OK for me, ALAC is converted to FLAC.

Where are you seeing the bitrate limitation message?


#5

It’s in ‘Plex DLNA Server.log’. More specifically I see entries like the following:

Dec 31, 2017 14:22:33.748 [3920] DEBUG - MDE: received PLEX_PROTOCOL_ANY from client, but could not determine best protocol. Defaulting to HTTP
Dec 31, 2017 14:22:33.748 [3920] DEBUG - MDE: analyzing media item 3379
Dec 31, 2017 14:22:33.748 [3920] DEBUG - MDE: I Have A Dream: Direct Playing due to no transcode profile
Dec 31, 2017 14:22:33.748 [3920] DEBUG - MDE: I Have A Dream: no direct play music profile exists for http/mp4/alac
Dec 31, 2017 14:22:33.749 [3920] DEBUG - I Have A Dream - audio.bitrate limitation applies: 970 > 288
Dec 31, 2017 14:22:33.749 [3920] DEBUG - MDE: I Have A Dream: selected media 0 / 3379


#6

OK, you want to use DLNA. No idea then, it’s not something I’ve ever used. As you say you cant change profiles on the shield.


#7

@yesternow said:
Seems to work OK for me, ALAC is converted to FLAC.

ALAC transcodes to MP3 for me. FLAC direct plays. What is your setup?

My setup:
Shield TV -> Denon AVR-X4300H

Plex Client: 6.12.0.3136 on Shield TV Pro

Plex Server:
PMS 1.11.0.4666 on Shield TV Pro
PMS 1.11.0.4666 on Windows 10 Pro


#8

@savethewolf said:
I have loads of apple lossless and to my disappointment they always transcode to mp3 when streaming to my shield.

I would prefer to be able to direct stream them too. after all Apple made ALAC open source a long time ago.

Unfortunately, the Shield TV does not support ALAC. Hoping I can transcode to FLAC like @yesternow.


#9

@yesternow did you change something to make it stream to flac? Im using a PMS on a mac mini connected to my shields player via the ipad or browser app!


#10

@savethewolf

No don’t think so, here’s the PlexPy record (below). I don’t personally have any Apple Lossless files, i just converted one album with FFMPEG to test. Playback worked fine by starting from Chrome, an iPhone 6S and on the Shield itself.

Im running on Ubuntu 16.04 with V1.11.0.4666 of PMS.

and the web player screen

Mediainfo

General
Complete name : 01 - Memory Dome.flac.m4a
Format : MPEG-4
Format profile : Apple audio with iTunes info
Codec ID : M4A (isom/iso2)
File size : 148 MiB
Duration : 13 min 32 s
Overall bit rate mode : Variable
Overall bit rate : 1 524 kb/s
Album : Zimpel-Ziołek
Album/Performer : Zimpel-Ziołek
Part/Position : 1
Track name : Memory Dome
Track name/Position : 1
Track name/Total : 4
Performer : Zimpel-Ziołek
Genre : Post-Minimalism
Recorded date : 2017
Writing application : Lavf57.56.101

Audio
ID : 1
Format : ALAC
Codec ID : alac
Codec ID/Info : Apple Lossless Audio Codec
Duration : 13 min 32 s
Duration_LastFrame : -46 ms
Bit rate mode : Variable
Bit rate : 1 524 kb/s
Nominal bit rate : 2 117 kb/s
Channel(s) : 2 channels
Sampling rate : 44.1 kHz
Bit depth : 24 bits
Stream size : 148 MiB (100%)
Default : Yes
Alternate group : 1


#11

@savethewolf The Plex client on the Shield TV uses the Android.xml profile. You can modify the profile to force a transcode to FLAC instead of MP3.

Change the two instances of “mp3” to “flac” on the line with “StereoMusicTranscodeProfile.”

 <TranscodeTargets>
    <VideoProfile protocol="hls" container="mpegts" codec="h264" audioCodec="aac" context="streaming" />
    <VideoProfile container="mp4" codec="h264" audioCodec="aac" context="static" />
    <MusicProfile container="mp3" codec="mp3" id="StereoMusicTranscodeProfile" />
    <PhotoProfile container="jpeg" />
  </TranscodeTargets>
  • All music transcodes will now be to FLAC instead of MP3 for any device that uses the Android.xml profile (Amazon Fire TV devices, probably Android phones, etc).
  • This works for PMS 1.11.0.4666 on Windows 10 - at least for the 60 minutes I’ve experimented with the mod… No idea if it mucks up other Plex features.
  • I tested with ALAC at 44.1 kHz/16 bits. Not sure about other rates/depths.
  • The profile will be overwritten when you install/update PMS.
  • Not sure where the profiles are located on a Mac. On Windows 10 they’re in c:\Program Files (x86)\Plex\Plex Media Server\Resources\Profiles.