I’m working on a tool for my server and I’m trying to figure out how to tell the Plex Transcoder (modified fork of FFMpeg AFAIK) to load and or use one of my FFmpeg presets.
My preset is known good and works in *Nix environments and Dos/windows environments.
What I would like to do is have it be a selectable preset under the transcode options in the Plex Gui. I’ve placed my ffpreset in the /usr/local/share/ffmpeg directory where the other ffmpeg presets are located.
I would rather not overwrite the device profile.xml’s under the Resources/Profiles/ directory as I want this to be a global preset and not have to add it to every device individually.
Relevant data for the platform/container I’m testing on:
Not looking for realtime performance yet, can optimize the script down the line
#initial Pre-Alpha testing of a possible FFmpeg preset to be used/piped into a plex Media Server Transcoder instance.
#TestPlatform: Hp ML350 G6 with 2* intel Broadwell Xeon 5670’s @2.93 Ghz base clock (2*hexacore with SMT2 = 24 threads. 144GB of ECC DDR3 @1600MHZ). Video files stored on 30tb RaidZ1 array tested with 1.5GB/s sequential , cached in ARC. All OS/file systems on NVME or Raid0 sata SSD’s.
#Outside of VM on Host have an AMD rx 5600XT-but no Plex Pass because student :’(
#Operating System for testing: Host System is Most current stable build of Pop!_OS from system 76 as of 16/09/2020
#Plex and FFMPEG Running in FreeBSD Jail under FreeNAS 11.3 release. FreeNAS in 4 core 64GB VM running under LibVIRT QEMU server.
#Device running off of Lexar NVME SSD with sequential throughput ~2.4 GB/s. 300,000+ random read IOPs and 40,000-50,000 write IOPs
Looking into this further, I don’t know that it would be possible via FF Presets.
I’m unfortunately under the impression that the only currently viable way of achieving what I want is to recompile FFMPEG changing the default paths with the modifications I’m looking to make, then rename the relevant binary to “Plex Transcoder”
This introduces a potential issue with Server version upgrades. As of now I’m thinking that the Least messy way of doing this would be to have a script watch the main server for changes on boot, perform a checksum on the Transcoder binary to see if it has changed from my own version, and if it has changed, delete the new version with my own version.
I realize that changing the Transcoder for my own version would NOT be a supported use case, which is why I would prefer to not go down that path.
I realize it’s bad forum manners, but any chance that @PlexInfo@BigWheel@drzoidberg33 could provide some data? I’ve attached a text file with the relevant portions of the profile I’m hoping to pipe into the Transcoder
I’m not really the person to be able to give you a technical info, but I asked someone and they said it was not a supported thing and would not fit into pipelines.
We are working on tonemapping if that is the reason you are trying to do this. I’m always hesitant to say soon, with stuff like this which always ends up requiring lots of alpha testing and such but I believe our transcoder devs are close.
Any chance we could discuss over DM? I have a custom build the has full tone-mapping support finished.
Depending on their answers, in addition to some work that I started back to January (student so limited free time) , I’ve got most of the puzzle figured out.
Essentially, I have HEVC HDR to HEVC SDR and HEVC HDR to x264 SDR working in ffmpeg. there’s a few option, but I mostly just need to know how to have plex either load a preset from my ffmpeg work, or have to replace the entire transcoder with a custom version.
It’s a pain in the butt, but I’m 80% sure that by forking/upstreaming my work into the Unicorn Transcoder project, I can have HDR Transcoding working by the end of the month. as an external tool.
I have a potential inkling about why it hasn’t been included in the current iteration of the Plex Transcoder, but this probably isn’t the best place to discuss that sort of thing
I’d be willing to work with them privately on an alpha/beta build if that’s what it takes, I just want to provide this to the community
Also more than willing to sign an NDA so that we can collaborate!
For now I’m just missing time to work on this- joys of final exams.
I believe that for linux you could do something like the former nvenc trick with a wrapper, but use the -hwaccel auto or the -hwaccel vaapi in place of nvenc. There’s a bug in the amdgpu drivers related to the Vaapi_tonemap filter, and the openCL situation on navi (the card that I’m developing on) is very messy, so haven’t had a chance to use the opencl_tonemap filter yet