Plex blog

Coming Attractions (part 5)

03.14.11 99 Comments

As most of you know, at the core of the Plex Media Server sits a powerful transcoding engine. Its raison d’être is to make your media available on the widest range of clients possible, over any connection. A 1080p MKV file, for example, is impossible to play on a tiny little Archos media player, because of hardware limitations. The Plex Media Server’s transcoder makes it possible to stream such a file to that device by performing a real-time conversion. On iOS devices, their limited support for alternative formats (such as MKV or AVI) also make conversion a must. Additionally, if you’re trying to play media over a low bandwidth link, such as a 3G network, even if you have a file with the right format and codecs, it would likely not stream correctly because of the limited bandwidth.

To summarize, the transcoder gets you your media, streamed in real time, regardless of what the player device is or what the speed of the connection is to the server.

There are two downsides to transcoding. First of all, it can take quite a bit of CPU on the server machine. Second of all, transcoding implies a decode and then a subsequent re-encode of the media, which is a lossy transformation, meaning the video quality will be degraded (although usually not perceptibly at higher qualities).

I’m quite pleased to say we’ve addressed both of these issues in this release.

First of all, we’ve introduced a feature we call DIrect Play, and here’s how it works: During the media analysis phase, the Plex Media Server looks at certain attributes of your media (resolution, bitrate, etc.). When a client requests a piece of media, the server looks at the client’s capabilities, compares them to the media parameters, and makes a determination as to whether or not the file can be directly played on the device. For example, if you have a properly prepared MP4 file, it’ll play without any transcoding on an iOS device. Tiny CPU usage, and no loss in quality. If you had a movie in MKV format and also encoded it for mobile devices (and both versions scanned into your library), the media server is smart enough to mark the specific version of the file as playable by the device.

This is all well and fine, but the media might not be in the right format in the first place, and encoding multiple versions of a file is a pain. For this reason, we’ve introduced a feature called Direct Streaming, As you might know, the current standard for web video is H.264 (regardless of how Google tries to undermine it); this codec happens to be the most common inside an MKV file, and also the most commonly supported on mobile devices. Android and iOS devices support decoding H.264 in hardware directly.

What you might not know is that the iOS devices (especially the latest generation, including the ATV2) have incredibly powerful little chips inside them for decoding video. Even though the specs say they are capable of 720p, it turns out that they do a good job with a lot of 1080p content as well. So when a client connects to the Plex Media Server, it describes its capabilities, and if the file falls within the acceptable range, the video is simply copied over to the new format (a process known as re-muxing). This again means that there is very little CPU used on the server side, and no loss in quality in the video. Streams start up nearly instantly, and seek quickly. All of this without the need to jailbreak, or use any private APIs.

Having the transcoder and these two new technologies, along with a set of heuristics built into the Plex Media Server, means that we are in a position to optimally deliver your media to all your devices: If you’re on a powerful enough client, with a high enough bandwidth connection, the media can be Direct Streamed over. On a lower bandwidth link, or on less powerful devices, full transcoding kicks in. (By the way, both of these features work with online media as well.)

I’ll leave you with this set of two screenshots, showing a 1080p movie, playing with Direct Streaming on an iPad. I can’t show you in a screenshot, but it started playing almost instantly. First one to name the movie in the comments gets a pet monkey.

Skitched 20110314 002316

IOS Simulator  iPad  iOS 4 3  8F190 11

Finally, we’ve added some additional quality settings, both for use in transcoding, and for help in determining whether or not Direct Streaming is applicable; for example, if you set the quality to 320kbps (a bad Wi-Fi link), it won’t try to Direct Stream a movie that’s 5Mbps.

Skitched 20110314 092350

To summarize these new features in a sentence: Your media is optimally and effortlessly available on a wide range of client devices, over any connection.


Coming Attractions (part 4)

03.13.11 65 Comments

Almost exactly half of the Plex users (a ridiculously good-looking bunch, might I add) are outside the United States. That means that rich subtitle support is extremely important. We realize that Plex/Nine has been lacking in that department, and we aim to fix that in this next release.

Without any further ado, let’s start from the beginning, as you’re setting up your media. You’ll notice a new preference area for language which looks like this:

Languages

This lets the media server know enough about you so that it can make intelligent decisions about which streams to pick when playing media. For example, it’s not going to show subtitles if the audio stream matches your preferred language. Of course, you can also set the stream selection manually in the clients, but with selection this smart, you might never need to!

We’ve also added rich support in the framework for metadata agents that can retrieve subtitles. Next, we enhanced the OpenSubtitles agent to add preferences for subtitle languages (up to two, for those bilingual couples) to retrieve for media. We expect that many such agents will crop up, as different regions in the world seem to have affinities for different subtitle sites.

Plex Media Server 2

The Local Media agent now detects and picks up and “sidecar” subtitles you might have sitting around with your media, during a refresh. Finally, the media analysis picks up any subtitle streams that are multiplexed into your media. This results in information about all subtitles (local files, online sourced ones, multiplexed subtitles) being unified and stored in a single place. Of course, the really cool thing is that the stream selections for your media are stored in your library on the server, so all clients (iOS, Plex for Mac) will have the same settings. I can change it here:

IOS Simulator  iPhone  iOS 4 3  8F190 10

And then it shows up here (the Mac client):

Plex 2

Alternatively, I can set it over here:

Plex 3

And then watch it over here:

IOS Simulator  iPhone  iOS 4 3  8F190 11

Pretty awesome, right?

Mobile devices (including third party ones, such as the ATV2 client) have support for subtitles in SSA, SRT, and SMI formats, and we’ll likely add support for others over time.

(Also, we fixed the issue browsing for subtitles on the Plex for Mac client, just in case any of you still want to do that.)

Of course, it also looks sexy on an iPad!

IOS Simulator  iPad  iOS 4 3  8F190 8