Music transcoding API

Hi all,

I’m developing an Android music player with a Plex integration.

I’m struggling to get audio transcoding working with the universal transcode API.

When I hit the following endpoint, I get a 400 Bad Request.

http://<host>:32400/music/:/transcode/universal/start.m3u8?protocol=hls&path=http%3A%2F%2F127.0.0.1%3A32400%2Flibrary%2Fmetadata%2F1965

I haven’t been able to get a handle on which params are required, and I’ve tried a bit of mixing and matching with no luck.

I’ve noticed in the server logs, after this request is handled each time:

ERROR - [Transcode] Unable to find client profile for device; platform=, platformVersion=, device=, model=
ERROR - [Transcode] TranscodeUniversalRequest: unable to find a matching profile

I’m sure the issue will be something on my end, but I’m just looking for someone to point me in the right direction.

Cheers

have you found an answer to your problem?
(PLEX forums seem to be really bad)

Sort of… I looked at PlexKit (GitHub - lcharlick/PlexKit: An async, type-safe Plex interface in Swift.) and managed to work out the required parameters.

Something like this:

{address}" +
“/music/:/transcode/universal/start.m3u8” +
“?path={path}” +
“&directStreamAudio=1” +
“&protocol=hls” +
“&directPlay=1” +
“&hasMDE=1” +
“&download=0” +
“&X-Plex-Token={accessToken}” +
“&X-Plex-Client-Identifier={clientIdentifier}” +
“&X-Plex-Device={deviceName}” +
“&X-Plex-Session-Identifier={UUID}” +
"&X-Plex-Client-Profile-Extra=“add-transcode-target(type=musicProfile&context=streaming&protocol=hls&container=mpegts&audioCodec=aac,mp3)”