Remote Users and Plex "Optimization" Feature

Hey All,

I’m hoping someone can tell me what I’m doing wrong … I have a friend that I share my library with and to avoid the massive CPU hit, I want to use the “optimization” feature to pre-transcode the file so it can just stream smoothly … In Settings > Remote Access, I have set the “Limit Remote Bitstream Rate” to 720p 3Mbps … as I understand it, if my friend has his settings set higher (at 1080p Original) then this setting on my server will “cap” the remote bitstream to the setting of my choice…

So I did a test and ran the “optimization” feature on one of my movies … selected “Universal TV” and then 720p 3Mbps … but when my friend plays the movie, it still transcodes? So, I thought maybe I have to select “Universal Mobile” at 720p 3Mbps … but that didn’t work either … it still transcodes.

Can someone let me know what I am doing wrong?

Also, is there a way to have Plex “ignore” the duplicates that are created from the Optimization feature?

Thanks in advance!

I think what you might have going on is a difference in the optimized 3Mbps and the limits you have set. The optimized might be for just the video component of the stream. The limits are video and audio totaled together.

One way to do this would be to make a new folder and put your optimized files into it. Then make a new library and share only that library to your friend. Then all he sees is the optimized versions and can’t see the main files. Then set the limits to 4Mbps instead of 3 and see how that works. You shouldn’t have any transcoding then…

It’s a work around, true… but it does work…

Thanks @MikeG6.5, I will give that a shot - the added bonus to your workaround is that I won’t see the duplicate “tag” in my main library either!

Cheers!

Hey @MikeG6.5 I did a test … I created an “optimized” version of 720p 3Mbps and created a new library titled “Movies (720p)” and copied the optimized version into that … My friend wasn’t available for a test so I had my wife load it up on her iPad (locally) and it still transcodes? When I click the info button (on the thumbnail under Now Playing) it says it’s transcoding both video and audio? The optimized version was “Custom > Universal Mobile > 720p 3Mbps” … and when I look at the file it’s h.264 and aac audio …

This doesn’t really make sense to me - bcs locally there aren’t any restrictions on bandwidth … so my guess is, that if it’s not working locally w/o transcoding then it won’t work remotely …

Any other thoughts?

I have been testing with the optimized versions for a while and decided it just wasn’t functional.
I had the same issues; Optimized version has a higher bitrate than the remote streaming bandwidth allowed. But even optimizing for 720p 3Mbit and limiting remote bandwidth to 4Mbit, it will still transcode.

It would only work, if the client was forced to direct play and you either created a separate library with just the optimized versions, or utilized the ‘play version’ option and selecting it.

A shame really, if it would work as expected it could be a nice feature. Manually pre-transcoding and creating separate libraries is a no go if your main library totals over 20TB.

Ideally, we should get an option to force the use of an optimized version if it’s available. When my family starts watching the latest movies, Plex just happily transcodes it down to the max bandwidth allowed by the streaming brain. It does this for everyone watching, even if they’re watching the same movie. And usually, the latest movies get watched within the first few days. Would have been nice to have a working pre-transcoded version available which would actually be utilized…

Furthermore, if you ask me, we need a feature that allows the server admin to enable the storing of transcodes (like a cache). So that when a transcode is running for a particulair movie and somebody else starts watching it, it can just reference the HLS files already stored instead of starting another transcode session…

Thanks @Intellium! I’ve been wracking my brain over this for the past week and you’ve confirmed my suspicion. I think I will concede that my server will have to transcode - so wondering what kind of setup you have as it seems like you might have a similar requirement. I have my wife/kids streaming from the Plex as well as one remote friend … what kind of CPU do you use to keep up with the demand? I’m still somewhat new to Plex, so when I built my server, I selected components based on what I read and how to scale the CPU … but I’ve since learned that that was all based on x264 encoding and for my library, I convert everything to x265 (mainly for storage, but our main TV is connected via the nVidia SHIELD TV so it accepts x.265 natively).

The processor I have now is an AMD A10-7860K which is rated at ~5000 passmarks so I should be able to transcode 3 x264 streams no problem - but with x265 I find that it’s maxing out the CPU … Ideally, I would like the Plex Server to be able to handle 3 simultaneous x265 on-the-fly transcodes … I figure that’d probably be the max if my wife, kids and friend are all hitting the server at the same time … not sure if Intel processors can keep up with that processing demand or not - potentially the newer ones with hardware x.265 decoding?

Thanks for your help in advance!

@mpappert

Wanted to chime in,
Why not use Handbrake or FFmpeg to optimize your media? I have done it to all my media. Heck I even did a a max bitrate of upto 4Mbps for 1080p, and a max bitrate of upto 3Mbps for 720p and it still shows great. I can always re-encode my originals if i’m not happy. But so far its wonderful for remote streaming when i’m out.

Back on topic. I actually tried optimizing some of my tv shows when I knew I was going to be away for couple of hours the next day. What I did was I encoded some tv shows thats already on Plex (not from original copy, but the encoded ones if that makes any difference) to a lower resolution/bitrate.

I had my already encoded episodes at 720p of 2-3Mbps optimized it down to 480p 1Mbps and named it Name_S01E01 - 480p.mp4 and put it in same folder with that TV Show.
For example, actual episode called Dexter S01E01.mp4 in one folder, now added another called Dexter S01E01 - 480p.mp4. Now the folder contains 2 types of same episode.

(In Plex web App, it merges them together with a number “2” on top right of the episode poster)

The next day I got my mobile (was old Nexus 6 android phone) put on the show, then lowered quality to 1Mbps, and it actually automatically changed my 720p video to my 480p, and direct played it. I never experienced what you said though, but then again I never used the Plex Optimized feature but only for when I was syncing to my child’s iPad before flight.

Only problem I did face, was when i lowered quality to 480p, I couldn’t up the quality back to 720p as it did not show. I quickly learnt that Plex changed files and chose the 480p video, and since its max bitrate was already 1Mbps I can’t go more than that or change the file back to 720p (unless I close the show, raise the quality from settings and re-play the show).

I’ve just finished installing the preview version of Plex Server 1.4.0 on my Windows 10 box … it looks like it has hardware support for h.264/HEVC decoding and h.264 encoding (for me, via support GPUs). Right now, it’s just a Radeon R7 GPU which is too old … so looking at the nVidia GTX 1050 as a cheap test to see how the GPU encoding/decoding support works (on top of the CPU) … not sure how much of a performance boost this will be as it’s unclear if it will use BOTH GPU+CPU combined to transcode or just the GPU …

@mpappert

My Plex server is currently running in a docker container on a dual Xeon E5-2620 v3 system. This can easily handle all the transcoding needed for the entire family and friends watching remotely. This is all H264 ofcourse. I’ve investigated H265 in the past, but the CPU power needed is just to immense. Before I started using Plex, I created my own streaming system (in PHP) which utilized HW transcoding nodes. I’ve found that allthough this alleviates the CPU usage, the quality is just not the same. For H265 however, currently, I think HW encoding would be the way to go. But if given the choice, I’d stay with H264 for a while. Also, keep in mind that a consumer NVIDIA card will be limited to 2 hardware encoding sessions, so anything more will just fail. You could also opt for the professional GPU’s, which don’t have this limitation… but the price tag… ouch. So, if you really want to go the H265 route, get either a professional NVIDIA GPU, or invest in a beast of a machine CPU-wise :slight_smile:

Regarding your question about the CPU/GPU usage of such a setup. I’ve found that FFMPEG will do the decoding of the input in software and encoding in hardware when utilizing NVENC. There are some workarounds to have the decoding done in HW as well, but I doubt Plex has implemented this. I also doubt they have implemented a check for transcoding sessions to fallback to CPU when the limit of 2 sessions have been reached.

@Ashus
The implementation you mention will require a bunch of extra storage. Also, when not using the Plex Optimize Media feature, you’d have to script something to manage all of this, unless you really don’t care about storage (or have plenty of it). As far as I know, this solution also doesn’t limit the remote player, as the remote client can still request the original version. Plex will take the original and transcode it down to fall within the Streaming Brain bandwidth settings, unless you specifically ask the server for the optimized version using the ‘play version’ feature.

The direct play with transcoded versions used to work. I’m not sure what broke but now my family with both AppleTV and Roku players all end up requiring transcoding now with the 4Mbps 720p optimized versions.

@mpappert said:
I’ve just finished installing the preview version of Plex Server 1.4.0 on my Windows 10 box … it looks like it has hardware support for h.264/HEVC decoding and h.264 encoding (for me, via support GPUs). Right now, it’s just a Radeon R7 GPU which is too old … so looking at the nVidia GTX 1050 as a cheap test to see how the GPU encoding/decoding support works (on top of the CPU) … not sure how much of a performance boost this will be as it’s unclear if it will use BOTH GPU+CPU combined to transcode or just the GPU …

By the way, how did you get the preview version? I’d love to try out GPU encoding.

(nevermind, found the link in the forums)

@Moghra

Here is the link to the preview page for 1.4.0:

I still haven’t had a chance to test out the hardware decoding yet as I need to make the time to head out and pick up a GTX 1050 video card (I’m just using the on-die GPU which is a Radeon R7). Let me know how it works for you - and what your hardware setup is … I’m very curious as to how well it works - but do note that @Intellium pointed out it’s limited to two simultaneous decodes … so not sure what happens if you hit 3 … it would be great if it switched over to CPU at that point - but Intellium thinks that’s unlikely (may not have that logic built-in yet).

The other question I have is what if you linked two video cards together (like CrossFire or nVidia SLI) would that double your available transcodes to 4 or would it simply treat it as one (so the original limit of 2 stands firm)?

Cheers!

I tried it (i7-5930K and GTX970) and encountered issues when streaming from a Roku device (stuck at 33%). Somebody else on the 1.4.0 thread also reported the same issue. The problem occurred with and without hardware transcode enabled. In a perfect world, they would just fix this issue with clients still requiring transcoding even when selecting an optimized version – this used to work perfectly fine – I saw direct stream with the same Roku and AppleTV users.

@Moghra
I did read in the comments for the preview release that some users were experiencing issues due to memory leaks … so hopefully that will be fixed in either a future preview release or the final 1.4 release.

By the way, I appear to have fixed the lack of Direct Stream by increasing the “Limit remote stream bitrate” from 4Mbps to 8Mbps. My remote users on AppleTV and Roku are setting their remote quality to 4Mbps. If I set my “Limit remote stream bitrate” to 4Mbps, transcoding always occurs.