Skip to content

Instantly share code, notes, and snippets.

@valesi
Last active February 21, 2023 17:28
Show Gist options
  • Save valesi/b6988f2e693143cee9e90079a14d47d4 to your computer and use it in GitHub Desktop.
Save valesi/b6988f2e693143cee9e90079a14d47d4 to your computer and use it in GitHub Desktop.
Plex Web Client FLAC Direct Play Support

Add FLAC support for Plex web client

Chrome 56+ / Firefox 52+
Might not work on all OSes

Add the following to /usr/lib/plexmediaserver/Resources/Profiles/Web.xml within the <Client> section:

  <DirectPlayProfiles>
    <MusicProfile container="flac" codec="flac" />
  </DirectPlayProfiles>

Included my Web.xml as an example. I just added <DirectPlayProfiles> to Plex Media Server 1.5.5.3634 stock Web.xml.

<?xml version="1.0" encoding="utf-8"?>
<Client name="Web">
<!-- Author: Plex Inc. -->
<TranscodeTargets>
<VideoProfile protocol="hls" container="mpegts" codec="h264" audioCodec="aac,mp3" context="streaming" />
<VideoProfile protocol="dash" container="mp4" codec="h264" audioCodec="aac" context="streaming" />
<VideoProfile protocol="http" container="mkv" codec="h264" audioCodec="aac,mp3" context="streaming" />
<MusicProfile container="mp3" codec="mp3" />
<PhotoProfile container="jpeg" />
<SubtitleProfile container="ass" codec="ass" context="all" />
</TranscodeTargets>
<DirectPlayProfiles>
<MusicProfile container="flac" codec="flac" />
</DirectPlayProfiles>
<CodecProfiles>
<VideoCodec name="*">
<Limitations>
<UpperBound name="video.bitDepth" value="8" />
</Limitations>
</VideoCodec>
<VideoAudioCodec name="*">
<Limitations>
<UpperBound name="audio.channels" value="6" />
</Limitations>
</VideoAudioCodec>
</CodecProfiles>
<!-- When transcoding a multi-channel audio stream inside a video transcode, downmix the audio stream to stereo. -->
<TranscodeTargetProfiles>
<VideoTranscodeTarget protocol="*" context="streaming">
<VideoAudioCodec name="*">
<Limitations>
<UpperBound name="audio.channels" value="2" onlyTranscodes="true" />
</Limitations>
</VideoAudioCodec>
</VideoTranscodeTarget>
</TranscodeTargetProfiles>
</Client>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment