Server Version#:1.43.1.10611
Player Version#:
Hi,
Is there a way to edit ffmpeg to limit the bitrate for transcodes?
for example, If I have remote set at 15Mbps and if someone plays a file that has a bitrate of 3Mbps but can’t play it, it transcodes to 15Mbps. now this puts a lot of strain on the system to do this as the direct play at 15Mbps is nothing.
I would have the direct play limit higher but my system has trouble with the high bitrate transcodes
what would be ideal, is in the transcoder tab, have a drop down box with a max transcode bitrate.
but I’ll settle for a way to modify the ffmpeg.
does plex have a built in limit? say you have a symmetrical 2gb internet, and a device needs to transcode and you have set plex max limit to 2gb upload, what will happen there?
if it has hard limit , then there is a point to modify
What are your actual settings for these two remote access settings?
Plex Documentation
→ Remote Streaming (Setting Up Remote Access)
→ Server Settings – Bandwidth and Transcoding Limits
Internet Upload Speed Limit = the max bitrate for all remote streams
Limit Remote Stream Bitrate = the max bitrate for an individual remote stream.
If the video is under the limit and can be direct played, then Plex will direct play it.
If Plex has to transcode the video for either compatibility or bitrate limit, then it will be under the rate you set.
If the remote client has configured a lower limit, then it will be used instead of the server limit.
yeah , I understand that. im not wanting to affect the upload bandwidth of direct played items.
the user hasn’t changed the quality, the device just cant direct play it
The upload limit is the upload limit. There is no way to have separate limits for direct played vs transcoded.
Then Plex will have to transcode the file.
The bitrate of the transcode will be below the “Limit Remote Stream Bitrate” setting.
“Limit Remote Stream Bitrate” is the max bitrate. It is not saying “transcode everything to this bitrate.”
Example: Limit Remote Stream Bitrate = 15 Mbps.
Media bitrate is 40 Mbps: Plex will transcode it to ~15 Mbps because it is over the limit.
Media is 3 Mbps: Plex will try to direct play the file. If it must transcode for compatibility, then it will do so. For a 3 Mbps file, the transcode rate will probably be 3 - 5 Mbps, depending on the media and the client.
no , its transcoding to the max limit, I know there isn’t an option in plex to set this, plex has hidden options, i was hoping someone had edited ffmpeg and could let me and others know how
It’s transcoding from an H.265 (HEVC) source to an H.264 target. This is likely inflating the output stream. If you’re using a compatible GPU, you should have the option to transcode to HEVC in your server’s transcoder settings:

You can set it to never transcode to HEVC, always transcode to HEVC, or only transcode to HEVC when the source is also HEVC. How is yours configured?
(Transcoding H.265 to H.264 is almost never what you want, at least not for anything other than compatibility.)
Also, it’s transcoding to TS container, which seems weird. What’s the client here?
Yes I know this, and its using the gpu, the problem is it filled my ram with a transcode and brought my system to halt on a larger file, now the device is a brand new tv with plex default settings, and plays most 265 file, just occasionally doesn’t play some,
now plex it self limits transcodes bitrate, so its possible to do, just need to work out how it sets that limit on the ffmpeg encoder, or a plex dev could just implement it
Don’t transcode to RAM. It’s almost never the best option.
Something is wonky. Transcoding HEVC to H.264 should not use that much bandwidth. Maybe 2x, but not 7x.
What is the client? Apple TV, Samsung app, Android phone, etc.?
Have you noticed if it happens with specific files or with all of them?
Agree with @pshanew re transcoding to RAM.
I’ve run into problems with doing so. It filled up RAM. It didn’t crash the PC, but all transcoding stopped. If someone is transcoding a download, then it exacerbates the problem, since Plex transcodes the entire file before downloading it to a client.
Yep. It’s because the transcoding temp directory generally requires the size of the file to be transcoded, plus a bit extra (~128 MB) be available for each transcode. PMS doesn’t trim the transcode buffer for items being transcoded.
This means that if you have 3 users each viewing items which need to be transcoded, you need to add the total size of those three items together (plus that little extra) to know what you need for the transcoder temp directory size.
Many folks expect that throwing an 8-16 GB RAM drive at this problem will be sufficient. It often isn’t.
Use fast HDD storage; or a disposable SSD. RAM should probably be the last option except for very specialized circumstances.
the tv is a hisense mini led tv, but have seen this on other devices as well. anytime it transcodes it has been at full bandwidth. when I had it at 8Mbps I had no issues with transcoding,
I didn’t want to use the SSD or spinny disk, have 32gb of ram but it was using 24gb the other night for the plex container. thing is the original file was only 6gb
I have 18tb and 10tb hdd in the array, and only a small cache drive.
If plex allowed a limit on max transcode then none of this would be an issue
I think you’re missing the point, but that’s ok.
There’s generally no point in transcoding to RAM, unless you operate a server with a lot of users. In which case you’d need a lot more RAM than you do.
If you’ve got an array which can provide hundreds of Mega Bytes per second that generally equals eight times that in mega bits per second.
Again, transcoding to RAM is almost never the right answer.
I’m only pursuing this line of discussion because of this comment.
Using Plex Web, please pull & post the XML Info for the movie (three dots → Get Info → View XML). It shows additional details about the media.
Only the top ~25 lines are needed, the part down to </Media>.
The forum does not allow .xml attachments, so save the info as a .txt or zip it.
This could be a bug. I’ll try to replicate with my server. If it can be replicated, then that makes finding the root cause easier.
Regarding the transcoder temp directory, suggest you use either the SSD or a hard drive, at least for now.
As @pshanew mentions, either is fast enough for a transcode directory.
My main server has a SATA SSD. I’ve never had a problem using it for the transcode temp directory.
I previously ran Plex on my NAS, with the transcode temp directory on the local hard drives (no SSD in the system). That was never a problem either, as the drives have read/write speeds of 200+ MBytes/sec.
Thanks fordguy61, but I’m not really to fussed that some file gets transcoded, I will move the transcode to the ssd for the moment. however I did notice that most of the hevc files are by iVy that get transcoded. I do remember there was a way to see the reason for transcode, but forgotten where to find that info.
I just want to limit the transcode, having a 3mb bitrate transcode to 15 is just ridiculous.
I have removed my limit as a curiosity as to what this tv tries to do with it amuses me, My tablet over mobile with its limit set to original only transcodes to 20mb, no idea where it gets that number then other 4k titles it only goes to 14mb. But anyway side tracked.
there has to be a somewhere where plex tells ffmpeg what bitrate to use, put a fixed value in there, make it read only