# Transcode API

**URL:** <https://forums.plex.tv/t/transcode-api/102397>\
**Category:** Dev/API Corner\
**Tags:** other-dev\
**Created:** [May 7, 2015, 8:17pm UTC](https://forums.plex.tv/t/transcode-api/102397 "2015-05-07T20:17:06Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![brunobasto](https://avatars.discourse-cdn.com/v4/letter/b/74df32/32.png) [@brunobasto](https://forums.plex.tv/u/brunobasto)\
**Post date:** [May 7, 2015, 8:17pm UTC](https://forums.plex.tv/t/transcode-api/102397/1 "2015-05-07T20:17:06Z")

</div>

Hello,

&nbsp;

I'm trying to write a Client for my Plex Server and I'd like to know if it's possible to consume the transcoding API or are users tied to the client applications Plex provides (iOS, Android, Windows, etc)?

&nbsp;

I know that's this old thread:&nbsp;[https://forums.plex.tv/topic/22303-plex-transcode-api/](https://forums.plex.tv/topic/22303-plex-transcode-api/)

&nbsp;

But it mentions some private API Key which I have no idea where to find. Following the steps described in that thread using the Public Key as the Private Key gives me&nbsp;

```
401 Unauthorized

```

&nbsp;

Which I guess was to be expected.

&nbsp;

Any ideas?

&nbsp;

Thanks,

---

<div class="post-metadata">

**Author:** ![hippojay](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/hippojay/32/41_2.png) [@hippojay](https://forums.plex.tv/u/hippojay)\
**Post date:** [May 11, 2015, 2:21pm UTC](https://forums.plex.tv/t/transcode-api/102397/2 "2015-05-11T14:21:40Z")

</div>

Private keys are not needed for the new universal trancoder. Here is a link to my python code which I use to initiate transcoding:  
  
[https://github.com/hippojay/plugin.video.plexbmc/blob/helix/resources/lib/plexserver.py#L470](https://github.com/hippojay/plugin.video.plexbmc/blob/helix/resources/lib/plexserver.py#L470)  
  
Basically you construct a new URL of the following and complete with the transcoder settings are URL encoded arguments  
&nbsp;

```
http://:/video/:/transcode/universal/start.m3u8?path=http://127.0.0.1:32400/library/metadata/1234&fastseek=1&protocol=hls&....
```

This will give you the m3u8 playlist, which you feed into your player of choice.  
  
There are some configurable parameters for the settings, but there is no documentation that I know of. Hopefully my code is self expanitory, but if you feel free to drop me a line.

EDIT: Here is an actual request I've just used to start some transcoding:

```
http://192.168.1.200:32400/video/:/transcode/universal/start.m3u8?maxVideoBitrate=720&protocol=hls&session=59bacd74-a443-4340-905e-762e04821a0d&offset=0&videoQuality=100&videoResolution=576x320&directStream=1&directPlay=0&audioBoost=0&fastSeek=1&subtitleSize=100&path=http%3A%2F%2F127.0.0.1%3A32400%2Flibrary%2Fmetadata%2F37078
```

---

<div class="post-metadata">

**Author:** ![jmjordan](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/jmjordan/32/213241_2.png) [@jmjordan](https://forums.plex.tv/u/jmjordan)\
**Post date:** [September 25, 2015, 1:45am UTC](https://forums.plex.tv/t/transcode-api/102397/3 "2015-09-25T01:45:51Z")

</div>

Just a heads up for anyone trying this, the parameter protocol=hls is required for Quicktime. Does anyone know what all of the protocol options are?

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/plex/original/3X/2/a/2acb9765406f63293d357b4ec509ec39aa28f2ad.png) [@system](https://forums.plex.tv/u/system)\
**Post date:** [January 8, 2020, 7:48pm UTC](https://forums.plex.tv/t/transcode-api/102397/4 "2020-01-08T19:48:45Z")

</div>


