Live HD Streams and content security

Hi, all:



We are in the process of creating a plugin for live, licensed rebroadcast (TV anywhere, 3 screens) of many of the popular terrestrial stations within the US. Resolutions for all of them range from 480x270 up to 1280x720 30fps. We’d like to be able to support the highest quality possible on as many of the popular platforms as possible, and Plex naturally figures into the equation if there’s a content security mechanism that can pass muster.



As someone just starting out on creating a plex plug-in, I’ve been cruising through the dev forums to attempt to glean an answer on which stream format would be well-supported and secure enough to pass muster with the content providers.



From what I’ve gathered thus far, it looks like RTMP/RTMPE are poorly supported until ffmpeg’s recent rtmpdump improvements come into play.



Silverlight may or may not have good support, I can’t tell directly from what I’ve read here and in the documentation. Is WindowsMediaVideoItem simply an embedded silverlight player of some variety?



In a perfect world, we’d like to have support for a player compatible with Roku and Apple’s implementation of HTTP Live Streaming + AES-128 - particularly if a method can be established where the clients can be authenticated via their own client certificate a la Roku.



Any guidance on the path I should start down here before I dig in?



Cheers,

-Tom

in order of most user friendly/easiest to implement to least, your options for getting video streams to plex are:


  1. direct video stream access (usually http, but not always). using a VideoItem in a plugin lets the video stream get played directly and nativly by plex’s video player, making it hassle-free and far far more resource efficient than the other options. And while the video stream itself may not be encrypted, you can implement any type of secure authentication scheme you want in the python code for requesting access to the videos, as well as for user authentication.


  2. flash video (served over rtmp or http) played by plex’s hosted flash player. you can use RTMPVideoItem (or build the urls yourself and use WebVideoItem). using our hosted flash player (it’s a licensed Flowplayer) has the advantage is that you dont have to worry about playback controls or cropping or anything, its all handled automatically. the downside is that it is a flash player running in a webkit window, so like any flash video, cpu performance is terrible for the user (and features of our native video player like GPU acceleration and audio passthrough are not available)



    -alternativly, a similar aproach can be used with our hosted silverlight player for silverlight/windows media streams, with similar pros and cons, see http://dev.plexapp.com/docs/Objects.html#WindowsMediaVideoItem. the silverlight player is just likely to be less well supported/stable/whatever than the flash one because it is used a lot less.


  1. Flash video (or silverlight) in the content provider’s (that’s you i’m assuming) own player, using a WebVideoItem. a lot of video plugins use this method simply because they cant get access to the video in any other way, basically it is just displaying the web site’s regular flash video player just as it would be in a web browser. basically you are just using the existing web based videos/flash player without necessarily needing any special accommodations made for plex on the server/content provider’s side. (actual streaming can be http, rtmp, rtmpe, rtmpe + swf verification, or even silverlight/mms). the advantage of this method is that its the last resort when any more direct access to the videos isn’t possible or in your case when your content providers are demanding content security without a real understanding of it (hint, RTMPE is not actually encrypted), the disadvantages are those of #2 above (flash video is very hard on users’ cpu) plus additionally you as a developer will have to create a siteconfig xml for the player to define cropping and playback controls for plex (pause/play buttons, seekbar, endpoint detection) which is often tricky and unreliable, see here for docs on creating a site config: http://dev.plexapp.com/docs/Configs.html





    from a user or developer point of view, option # 1, direct stream access (usually http) is usually the obvious preference when it is available, however it often isn’t, and the others do work quite well also.

I’d like to add a couple of points to Billy’s excellent summary, both in relation to solution 1 (direct streams).



First, the direct video streams will enable full iOS streaming support. Flash etc. plugins are not supported on iOS (yet?) and while they can be enabled they have issues (audio-video sync, non-availability of player controls, for example).



Second, the plugin framework has a helper concept in which you can call out to external compiled code. This can allow an sensitive or authentication based API access to be hidden from viewing as it would be in pure python.



Jonny

Thanks to you both - appreciate the direct and helpful answers.



Regarding:




If I understand you, this means that on iOS the native quicktime player is one of the (and perhaps the preferred) playback mechanisms. Is this also the case on desktop OS X? If not, is there a way to use the native QT X player w/ Apple's flavor of AES-128 http segmented streaming in one of the VideoItems short of the WebVideoItem option?

Basically, is there a list somewhere of what exactly the native plex player supports on each platform? If not, can I help compile one for the wiki?

Thanks!

we dont use quicktime, our player is based on ffmpeg, both the desktop client player and the transcoding server for streaming to ios (videos get transcoded on the fly to iphone compatible formats at a user specified bitrate/quality by plex media server to stream to the plex ios apps)



here’s a rough list of codecs/formats ffmpeg supports: http://ffmpeg.org/general.html#SEC3 (hint: it’ll play nearly anything drm-free, though if you have a choice just use h264), but as for network streaming protocols, i dont know if theres a list anywhere of what we support, the plex desktop client is just running legacy xbmc network code mostly, file and plain http are rock solid, i’ve seen rtmp (not e) and mms work sporadically, but i have no clue what else may or may not work. i’m pretty certain that apple’s segmented http live streaming is NOT supported though.

Just in case it wasn’t clear from the replies, you can play Flash (RTMP) video on the iOS app though you have to access the direct video stream (i.e. no WebVideoItem).



This relies on the PMS encoding the Flash video for iOS on the fly, so performance won’t be as good as direct video over HTTP, for example.

personally i’ve found direct playback of rtmp (not e, rtmpe wont work at all) in a plain VideoItem to be fairly hit or miss, it’ll work for some sites/streams, but not others, and it often has problems with seeking. this is a prime reason why many plugins use the hosted plexapp flash player (#2 above) when dealing with rtmp streams. (also it supports multiple clips/segments per video and the native player does not)



also, contrary to what the last poster implied, even HTTP direct streams in a VideoItem DO get transcoded by the media server to be sent to ios, even if it was already in a iphone capable format, this is done so that the user can set specific quality/bitrate settings for the streaming to accomodate their personal internet/wifi/3G bandwidth or data plan.

one other [maybe quite important] thing i forgot about is how are you going to handle ads? assuming the site/service you’re creating is (at least in part) ad supported. because you can only really use a direct stream if the commercials are statically encoded into the actual video content (or if it’s ad-free ofcourse). If you need/want dynamic ad injection/rotation and ad tracking, then you probably have no choice but to go with some sort of flash based solution.

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