for the record, plex devs; id have waited for said switch to be made and flipped, but after finding this thread and seeing your dev’s attitude on the matter; blatenly ignoring your customers and expressed intent to cater to a specific demographic of your customers, i wouldnt have left otherwise. dont fire him or anything, im a coder, customers suck. if anything give him a raise for defending the companies poor decisions regardless
Buuut… as you can see from my previous post, Emby had LITERAL SWITCHES (ok, checkboxes… but still) we could flip for this feature, and their documentation was WAY CLEARER about whats supported, whats not. if your support docs specifically stated the current linux limitation of no nvidia gpu decode, it also would have helped.
my point is, theres tons of little things, here and there, that may have avoided this thread, one of those tiny things includes doing your jobs.
Job well done mate. I was thinking of trying the same thing but didnt realize the ffmpeg of the current stable release wasnt up to date. Two questions I have now are if you noticed any difference in quality and second, if the alpha plex transcoder release may work with current stable server build.
My server was never able to transcode before without HW accellerated decoding so I can’t say I have much to compare to quality-wise. The Transcoder process would usually time out and be killed by Plex before the videos started playing and if it worked it would do more buffering than playing.
But everything I transcoded yesterday looked really good, the transcoder process never crashed and I’m finally able to play HEVC videos on Smart TVs that don’t support HEVC themselves!
I’m not sure why you would like to run the newest “Plex Transcoder” on an older release of Plex Media Server because the alpha released is not just the transcoder. I would just install the full alpha release of Plex Media Server. I see no reason to test if the newer Plex Transcoder works on an older Plex Media Server. I would guess that it would mostly work fine though.
Regardless all currently released versions of Plex currently needs my “patch” if you want to enable NVDEC.
Okay. Well you will have to wait for the developers to do an official release or do the testing yourself. My transcoding is not actually working perfect either I learned today. It seems like I cannot transcode any videos with AC3 audio streams. That seems to be a problem with the new alpha Plex Transcoder generally (in my environment at least), not the alpha “Plex Media Server”. . In fact I cannot get transcodes to run at all from the browser from Plex.tv. It only works using “Plex Media Player”. I think it’s because the player in the browser wants the audio to be AC3 while “Plex Media Player” supports more formats.
Removing my NVDEC hack doesn’t seem to change this fact.
I’m not going to be wasting much more time on this issue right now. I have fixed my own specific most wanted use-case for now. But if someone else wants to take it further, or if I get tired waiting for the Plex developers and decide to keep working on it myself later I will save some of the interesting information I’ve found here:
Since the Plex Transcoder is a fork of FFMpeg, which is licensed under the LGPL version 2.1, they are required to provide us with the source code for their fork if we ask for it. I’ve read that they include the link to the source code somewhere in Plex or in some included file but if the link is not updated we could just ask for them to update it.
This means that we can recompile the Plex Transcoder to add support for new things if we need to. Thankfully I’ve found that the latest binary included in Plex alpha version 1.15.0.573 does support NVDEC so there should be no need to recompile that binary for this use case.
My bash script is likely to break things in other setups than mine. It doesn’t honor the “Use HW acceleration when available” option in Plex. It doesn’t report back correctly to Plex Media Server about what it’s doing. It might be causing problems when/if Plex tries to do something unusal with ffmpeg. My script for example changes all commands so it changes the command “ffmpeg -decoders” to “ffmpeg -hwaccel nvdec -decoders” which prints a yellow error message but otherwise gives normal output. That might or might not cause problems for Plex Media Server.
Unfortunately only the Plex developers can fix the Plex Media Server integration with Plex Transcoder, but it’s absolutely possible to further develop a bash script or something else to be more advanced about how it modifies the arguments sent to the Transcoder.
One cool example of “something else” that could be further developed with this feature which I’ve found is the UnicornTranscoder Project · GitHub. It enables remote Transcoding from Plex with load balancing! I have not tried it out but whomever is developing that is doing really cool work!
You may be able to find the link to the ffmpeg source in /usr/lib/plexmediaserver/Resources/LICENSE. Not sure of it would be properly updated on the alpha release yet or not. If you search that file for ffmpeg-source you should be able to find a link. The current releases reference a version dated 2018-03-22.
The original Transcoder needs to be renamed to “Plex Transcoder2” and the script above should replace the original file. The /usr/lib/plexmediaserver path might not be the same in all systems so it needs to contain the correct path for your Plex install. Only the 1.15 alpha transcoder has support for NVDEC, the 1.14 seems to ignore the argument.
Ok thanks for confirming. I have double checked and have done everything you mentioned with 1.15 installed on Linux and it appears the same setup as you, but I just get transcoder errors when I try to transcode anything. It works without the batch change too.
Ive done that, and also tried other chmod options. They all return transcoder errors.
[FFMPEG] - libva: va_getDriverName() failed with unknown libva error,driver_name=(null)
[FFMPEG] - Failed to initialise VAAPI connection: -1 (unknown libva error).
That seems to be a normal error message if you don’t have a intel quicksync. It seems like Plex Media Server is just trying different options to FFMpeg to see what works. The Plex fork of FFMpeg only works with the intel driver for libva. Even though they are libva drivers for radeon, noveau and nvidia as well.
If you are managing to activate NVDEC/NVENC but it somehow fails you should see some error about CUDA or libcuvid or something…
Can you get Plex to hardware accelerate the encoding part without my patch? If not you will have to get that working first. My patch only forces it to also do hardware accellerated decoding with NVDEC provided that NVENC is already working.
I am able to fully utilize hardware without your patch. It works just as expected. And direct play works fine with your patch as well, its just trying to get it to transcode with your patch. When the patch is implemented, the job started with Plex Transcoder fails with exit code 13. This is all the information it gives me, and its not even an error in the logs, just a debug.
Also I have found that when I chmod 755 the new trancoder file, it starts the job, then fails due to the command cutting off the file location after the first word in the folder name. So I get
[Transcoder] /mnt/Storage/Movies/Gone: No such file or directory
when trying to transcode Gone Girl. It shows '…/Gamer: ’ when transcoding Gamer.
@LrrrAc When you see “No such file or directory” and it is ending after a space, it’s because you’re missing your escape of spaces in file path.
Linux file paths need escaped spaces or to be in quotes. Either will fix your problem. So for you the /mnt/Storage/Movies/“Gone Girl” OR /mnt/Storage/Movies/Gone\ Girl
Once you have that sorted, try again and see what happens.
The issue is its not me entering that information. It works fine without the patch AnonymousRetard made. When I use that, it creates the issue. Also it cuts it off after the folder name anyway such as with /mnt/Storage/Movies/Gamer/Gamer.mkv. No spaces, still cut off.
Ah I see, then I would suggest you next check the permissions of your Storage folder. Maybe the transcoder is attempting to look in a folder like /mnt/Storage/Movies/Gamer and it does not have permission to.
That would explain why it’s cutting off the file name from the path and just telling you the folder doesn’t exist (it doesn’t have permission to look in that folder).