Auto Quality for Remote Viewing (ABR)

Just like netflix, I want remote viewing (Streaming over the web from my PMS) to automatically adjust the trans-code quality based on my bandwidth. This way my stream shouldn't lag just pause when It switches to a lower bitrate / Resolution.

This is commonly called adaptive bitrate streaming and I wonder if Plex could pull this off in some hacked method.

Not easily. HLS does adaptive bitrate streaming, but the method is to actually transcode several different bitrate qualities and make them available in parallel with each other. Actually that is how netflix and amazon and youtube work. They have several versions of the same video at different major bitrates all stacked next to each other. 

Not Simple to do at Plex's Level.

I believe that adaptive streaming is a very important feature that will be a requirement for remote streaming. I started another thread (before I purchased my plex plass: and could see this thread) on this subject at the link below. I explain in detail why I think this feature is key:

https://forums.plex.tv/topic/92336-adaptive-streaming-for-plex-in-the-roadmap/?hl=%2Badaptive+%2Bstreaming

Yes and our Plex Developer and Employee answered your question :
 

HLS supports this, but it's non trivial for us. Because most solutions can pre-transcode all material to the different qualities they want to offer, we do it on the fly and that means that we need to restart the transcoder with a new quality every time it switches. Which is why we axed that feature that we had in iOS before. That said, it's something that we think is interesting.


However this does raise the interesting question that if you do have your video transcoded into 4 or 5 versions and prepared for HLS/DASH streaming at different bitrates could plex offer it as a VBR Stream? This i would think is more viable to ask for than trying to do VBR on the fly.

Yes and our Plex Developer and Employee answered your question :
 


However this does raise the interesting question that if you do have your video transcoded into 4 or 5 versions and prepared for HLS/DASH streaming at different bitrates could plex offer it as a VBR Stream? This i would think is more viable to ask for than trying to do VBR on the fly.

If you read all of the thread, you will see that I am attempting to explore the solution space for the problem. If Plex is going to support the remote streaming space, then it is going to have to address the fact that adaptive streaming is required, as evidenced by the fact that all the major streaming providers are doing it. Stating that the problem is complex, or the solution is difficult, or users aren't willing to bring the needed resources to bear on the problem, does not change the reality that this feature is required to sucessfully support remote streaming in the general case. If you want to argue whether Plex should have remote streaming in its feature set, than that is a separate argument.

I do want remote streaming capability in Plex, and I am wanting to have a dialog about what is requried to make it happen. I regularly use remote streaming of many different kinds, and over the holidays I had serious problems trying to use Plex to stream video because it does not have adaptive streaming. A lot of the people who are willing to make the effort to set up PMS are the kind of people who are willing to upgrade hardware and/or invest in other ways in order to obtain a valuable feature, and I am one of them. 

It is very possible that three or four streaming rates would be sufficient. It is my opinion that many people would prefer adding compute capacity, rather than having to generate a new unique source file for every streaming rate. Adding a new source file for each rate dramatically increases  the storage space needed, and also adds a big workload to generate all the files.

I agree that this is an important feature.

On the server side, restarting the transcoder would be a must (unless there are significant changes made to ffmpeg*). But this could be very difficult to implement for streaming sources, like those from channels rather than local media, since some of those channels don't support seeking in the stream, or need a new key to start the stream again.

All this talk on the other thread about the need to have multiple transcodes running simultaneously is a red herring.  Yes, you could do that, but it creates more problems than it solves.   In any case, you would need to present the HLS client with different quality stream URLs, but they don't need to all be transcoding. When an HLS requests a different quality stream, you can then start a transcode for that stream, and abandon the previous.  But this is not as simple as it sounds.

* It's probably not too difficult to modify ffmpeg to periodically poll a settings files that's created/modified for a specific transcode, and then call  x264_encoder_reconfig to change VBV settings (CRF, max-rate, etc.) mid transcode, but this would not allow resolution change.  Resolution change would require restarting the x264 session, complicating things greatly.  Neither of these address audio transcode quality. I'm not sure what mid-stream quality config options the various audio encoder libraries that ffmpeg uses support.  Also, the transcoder has probably gotten far ahead of real time by this point, so mid stream quality changes may not help for some time down the stream, and by that time bandwidth congestion may have already been sorted.   Probably better off just restarting ffmpeg for the different quality stream -- though then you have source stream seek issues.

In short, it gets complicated quickly.  I can see why the Plex team is currently keeping this at arms length, but I also understand the need for it.

With the introduction of Plex Cloud, why can’t Plex “pre-scan” the files instead of transcoding on the fly? You could even run a converter from Plex itself. Just click to convert the film to a transcoded format so that it’s ready to go without the transcoding delay.

Adaptive streaming is quite an important feature.

At the moment, when I play via Plex, I have to set it playing, then wait for it to actually respond and start playing (usually a minute or so) then change the quality to original and wait again (usually another couple of minutes).

If I pause it at any time during playback and there’s a delay before pressing play again, it essentially starts over, with another two minute delay before playback actually resumes (if it resumes at all and doesn’t fall on its bum, require the app to be restarted, or start at the beginning requiring you to find your place manually and wait AGAIN while it buffers/transcodes and resumes).

With Netflix there is no delay. It plays instantly, even if it’s at relatively low quality, and adjusts itself to peak performance automatically, which is definitely preferable to me.

Check out: https://forums.plex.tv/discussion/272941/plex-pass-preview-try-the-new-auto-quality-feature-now-on-android

Early 2021 clean-up: implemented (auto-quality)