# Music transcoding API

**URL:** <https://forums.plex.tv/t/music-transcoding-api/696895>\
**Category:** Dev/API Corner\
**Tags:** other-dev\
**Created:** [March 4, 2021, 2:21pm UTC](https://forums.plex.tv/t/music-transcoding-api/696895 "2021-03-04T14:21:45Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![timusus](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/timusus/32/230772_2.png) [@timusus](https://forums.plex.tv/u/timusus)\
**Post date:** [March 4, 2021, 2:21pm UTC](https://forums.plex.tv/t/music-transcoding-api/696895/1 "2021-03-04T14:21:45Z")

</div>

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:

```auto
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

---

<div class="post-metadata">

**Author:** ![Laseristhatyou](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/laseristhatyou/32/92776_2.png) [@Laseristhatyou](https://forums.plex.tv/u/Laseristhatyou)\
**Post date:** [July 2, 2021, 7:12pm UTC](https://forums.plex.tv/t/music-transcoding-api/696895/2 "2021-07-02T19:12:53Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![timusus](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/timusus/32/230772_2.png) [@timusus](https://forums.plex.tv/u/timusus)\
**Post date:** [August 10, 2021, 11:07pm UTC](https://forums.plex.tv/t/music-transcoding-api/696895/3 "2021-08-10T23:07:59Z")

</div>

Sort of… I looked at PlexKit ([GitHub - lcharlick/PlexKit: An async, type-safe Plex interface in Swift.](https://github.com/lcharlick/PlexKit)) 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)”
