Does Plex Server provide transcoding capabilities to plugins?

I just started to develop a plug-in for plex server and the question may be a bit naive.



But anyway, I am developing a plugin that receives a link to a video stream from a 3rd party server. Then I generate a list of "VideoItem"s, something like this:



     <br />
    dir.Append (VideoItem (<br />
         url,<br />
         title = "Play program",<br />
         subtitle = description,<br />
         summary = name, thumb = R (ICON)))<br />




My understanding is that when I select this item on the client it receives this url and starts playing video.

My question is: is it possible to make Plex server to transcode the video stream in some way? In accordance with my settings of bitrate, format, etc.?
For example, if a third party server returns a link to a video stream with a bitrate of 1.5 mbit/s, but I want the client to receive a video stream of 500 kbit/s and in different format. Is it possible to do this transcoding on Plex server?

Link to the same post in russian forum - [http://forums.plexapp.com/index.php/topic/32225-%D0%BF%D0%BE%D0%B4%D0%B4%D0%B5%D1%80%D0%B6%D0%B8%D0%B2%D0%B0%D0%B5%D1%82-%D0%BB%D0%B8-plex-server-%D0%BF%D1%80%D0%B5%D0%BE%D0%B1%D1%80%D0%B0%D0%B7%D0%BE%D0%B2%D0%B0%D0%BD%D0%B8%D0%B5-%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE%D0%BF%D0%BE%D1%82%D0%BE%D0%BA%D0%B0/](http://forums.plexapp.com/index.php/topic/32225-%D0%BF%D0%BE%D0%B4%D0%B4%D0%B5%D1%80%D0%B6%D0%B8%D0%B2%D0%B0%D0%B5%D1%82-%D0%BB%D0%B8-plex-server-%D0%BF%D1%80%D0%B5%D0%BE%D0%B1%D1%80%D0%B0%D0%B7%D0%BE%D0%B2%D0%B0%D0%BD%D0%B8%D0%B5-%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE%D0%BF%D0%BE%D1%82%D0%BE%D0%BA%D0%B0/)

Thanks

Transcoding is handled transparently by the server and clients - plug-in developers don’t need to do any extra work. By default, the Mac/Windows clients will direct play everything, and the mobile clients will transcode everything. That said, if you use the new object types (detailed on http://dev.plexapp.com) you can add extra hints like the bitrate, codec, container, etc. which will allow the client to make a decision about whether to transcode or not, based on the device’s capabilities and the user’s settings.



Ok, I rewrote my plugin with new objects. But new code is not clear to me. My plugin, unfortunately, did not work and, for example in Android, now gives an error "Unexpexcted error while trying to play media item at: null" .
I've attached two samples: old version with VideoItem (it partially works - on LG TV client, but freezes on Android and errors on iOS) and new version with new object types as you advised me.
I didn't find a lot of documentation and examples and I apologize if new version will be not correct. What am I wrong? What kind of objects should I use? Where must I specify parameters for transcoding videostream?

TestVideoItem.bundle.zip (66.6 KB) - old version with VideoItem
TestMediaObjects.bundle.zip (66.9 KB) - version with Objects

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.