Having asked the devs of FreeBSD, they say that vaapi is fully supported on FreeBSD. My Intel CPU has QuickSync support so I should be presented with an option to use HW acceleration when available. Can anyone shed some light on this?
TBH one of my servers runs on FreeBSD but its a old cpu with no support for it, so I have no way to even test…
However if you’re sure you’re cpu does support it I’m curious about the output of vainfo, I think you’ll need libva-intel-driver and libva-utils … and run that in Xorg (xterm or something like that … ssh to the terminal won’t do).
Also Xorg needs to be using the intel driver.
@mikec_pt said:
TBH one of my servers runs on FreeBSD but its a old cpu with no support for it, so I have no way to even test…However if you’re sure you’re cpu does support it I’m curious about the output of
vainfo, I think you’ll need libva-intel-driver and libva-utils … and run that in Xorg (xterm or something like that … ssh to the terminal won’t do).
Also Xorg needs to be using the intel driver.
So FreeBSD says the necessary libraries exist as installable packages but Plex needs to include some kind of “pre-packaged compressed tarball for FreeBSD”. It’s apparently missing a Plex provided library that will complete the service. That’s what I gathered from the folks at the #freebsd Freenode channel. I encourage you join it to get more information, as it seem a lot of the pieces for make this happen are already there, it just needs to be put together.
BTW, here’s the CPU I’m using.
@mikec_pt Any update on this?
Were you able to get the vainfo using Xorg?
I don’t really have any update on the state of that in Plex, as I said above I don’t currently have a machine were I can test…
What you said above however makes sense… If som libs are missing in the PMS freebsd install (libva maybe!?) then I don’t think it would work.
Can you list the libs you see in /usr/local/share/plexmediaserver?
I would say that if libva is not there than it wouldn’t work?
In the meantime I’ll inquire internally if this is supported or planed to be supported at all, perhaps it’s just a matter of linking a lib, perhaps not (I might not be able to get a definitive answer though so no promises so far).
I’ll post back here when I get that feedback.
@mikec_pt said:
Were you able to get thevainfousing Xorg?I don’t really have any update on the state of that in Plex, as I said above I don’t currently have a machine were I can test…
What you said above however makes sense… If som libs are missing in the PMS freebsd install (libva maybe!?) then I don’t think it would work.
Can you list the libs you see in
/usr/local/share/plexmediaserver?I would say that if libva is not there than it wouldn’t work?
In the meantime I’ll inquire internally if this is supported or planed to be supported at all, perhaps it’s just a matter of linking a lib, perhaps not (I might not be able to get a definitive answer though so no promises so far).
I’ll post back here when I get that feedback.
I’e used Xorg services before, but I’ve never set one up, so I don’t know at current how to do a vainfo with Xorg. Sorry about that. With that being said here is the list I pulled up, according to ls
CrashUploader libboost_random.so.1.59.0 libiconv.so.7 libsoci_sqlite3.so.3.0.0 Plex Media Server libavcodec.so.58 libboost_regex.so.1.59.0 liblrc.so.0 libsqlite3.so.0 Plex Relay libavformat.so.58 libboost_system.so.1.59.0 libminiupnpc.so.10 libssl.so.1.0.0 Plex Script Host libavutil.so.56 libboost_thread.so.1.59.0 libminizip.so.1 libswresample.so.3 Plex Transcoder libboost_atomic.so.1.59.0 libboost_timer.so.1.59.0 libnatpmp.so.1 libswscale.so.5 Plex Tuner Service libboost_chrono.so.1.59.0 libcrypto.so.1.0.0 libopencv_core.so.2.4 libtag.so.1 Plex_Media_Server libboost_date_time.so.1.59.0 libcurl.so.7 libopencv_imgproc.so.2.4 libxml2.so.9 Resources libboost_filesystem.so.1.59.0 libexpat.so.6 libpion-5.0.so libxslt.so.2 libboost_iostreams.so.1.59.0 libexslt.so.8 libpython2.7.so libz.so.1 libboost_locale.so.1.59.0 libfreeimage.so libpython2.7.so.1 Plex DLNA Server libboost_program_options.so.1.59.0 libhdhomerun.so libsoci_core.so.3.0.0 Plex Media Scanner
I don’t see libva in there but running $pkg search libva
returns
libva-2.1.0 VAAPI wrapper and dummy driver
libva-intel-driver-2.1.0 VAAPI intel driver
libva-utils-2.1.0 Collection of tests and utilities for VAAPI
libva-vdpau-driver-0.7.4_9 VDPAU-based backend for VAAPI
libvanessa_adt-0.0.9_1 Library that provides ADTs (queues, dynamic arrays, and more)
libvanessa_logger-0.0.10_1 Library that provides a generic logging layer
libvanessa_socket-0.0.12_1 Library that provides a simple layer for TCP/IP socket operations
So installable packages exist to complete the system.
I appreciate making the inquiry and look forward to hearing back.
Yeah, plex doesn’t provide libva, I’ve got all the necessary parts on both my boxes (one nvidia, one intel). Would be nice even if unsupported if plex were to use system libraries when available.
Just a note on this, it seems the freebsd drm implementation on 10/11 is a bit old, so I can say at least that even if Plex shipping the needed libs it wouldn’t be that simple.
FreeBSD12 does have a more recent implementation so that could perhaps be possible one day.
Disclaimer: This is my personal opinion in a quick analysis, it doesn’t not mean that support will or will not ever be added.
11.2 or later for the newer stuff, possibly older with nvidia.
Newer stuff seems to be 12-CURRENT only, the port also refers to needing /usr/src/, so I’m assuming it needs to compile something, so there’s no simple process like pkg install drm-kmod-next i.e.
Its possible the doc is outdated and this is in 11.2 at least but still do to FreeNAS pms is build targeting older freebsd versions, current stable for FreeNAS uses 11.1 base.
btw @unhooked.net hardware transcoding support for Linux uses Intel QuickSync, see:
https://support.plex.tv/articles/115002178853-using-hardware-accelerated-streaming/
On Linux, hardware-accelerated decoding is not supported on NVIDIA GPUs. Intel Quick Sync is required for hardware-accelerated decoding.
Well yeah, it’s gonna need source since it’s building a kernel module. 11-1 doesn’t have and probably isn’t getting the kernel changes needed for this. It was however added to 11-stable pre 11-2 release.
As for quick sync, wouldn’t it make sense to make whatever the shield is doing available elsewhere?
Windows/linux/bsd/android all use the same unified driver now.
I have no idea if they’ll ever release drm-next packages, they need to make sure the binary blobs are in sync with kernel source. Installing the port is a simple matter as is the nvidia drivers.
Well the SHILED is a completely different platform… its the same reason why it could do the same has Windows…
FreeBSD is in fact implementing the linux code so, if this is ever supported that much I can guarantee it will never be more than whats offered for Linux, that much is certain.
As for the rest the problem there is that this complicates things… FreeNAS users wouldn’t get hardware transcoding even if plex added the needed libraries… Last time I tried to spin up a 11.2 box with a old SandyBridge (I don’t have better than that to test on my own sadly) I didn’t even see /dev/dri/renderD128 path only card0 and control… so there’s not even support for render nodes… which I think were added in drm3. something if not earlier in linux… that much at least would need to be ported back (And it seems that it was in recent drm implementations only available in 12-CURRENT).
That was part of my brief analyses, and again its only my personal opinion but It doesn’t seem reasonable to spend dev effort in something like this when its not even working on a stable OS version and needs compiling source files.
And this is why I state that I don’t know if this will ever happen, but right now it doesn’t seem like the conditions allow for it, but… maybe… let me say again maybe in a near future with freebsd12 out it might be as simple as adding the libs…
Or maybe ask the freebsd devs to merge this back to 11 and 10? (I kid of course, I doubt that would ever happen )
I should point out that NAS4Free is not FreeNAS. NAS4Free devs are considering adding what’s needed to the OS natively in FW updates to support HW transcoding. The same could be said for FreeBSD devs if necessary. This is from my chats with all parties involved.
I was actually speaking about vanilla FreeBSD, obviously it will take time for the work to get to FreeNAS and NAS4Free unless the dev of such projects want to implement it on their on… or cherry pick changes from freebsd CURRENT…
@Cyberpower678 If you have reliable info on that, its great to know, but I’m not sure it means plex would have HW Transcoding support on NAS4Free before FreeBSD and FreeNAS, the tarball is build on/for FreeBSD so if anything is to be expected at any time it would be when this can be done in FreeBSD release builds.
It doesn’t need. I know this change will take time, but I’m super happy that I could get the ball rolling on this. It would absolutely amazing to get this all the way to Nas4free.
FYI since 1.13.9 FreeBSD should be able to use Hardware Transcode.
It should be noted though that this needs recent drm kernel model, when I tested this myself, I had to grab drm-next-kmod on freebsd12-alpha.
On the plus side on freebsd12 that should mean just installing a new package, no need for kernel rebuilds or such.
That’s great. Thank you! My hardware to test this arrives on Monday 
Shouldn’t this be mentioned in the 1.13.9 5456 changelog?
An unrelated p.s.
It looks like Plex for FreeBSD is still built on FreeBSD 9.3, now that the current FreeNAS is based on FreeBSD 11.1 wouldn’t it make sense to build binaries for/on a newer FreeBSD, or are there other FreeBSD downstream projects that still require Plex to run on 9.x or 10.x ? Maybe the reason is gcc/clang?
/usr/local/share/plexmediaserver-plexpass/Plex Media Server: ELF 64-bit LSB executable, x86-64, version 1 (FreeBSD), dynamically linked, interpreter /libexec/ld-elf.so.1, for FreeBSD 9.3, stripped
@flds that’s true yeah, and I’m not sure about all the reason that it is(was so), I believe that will change with this: Much faster (hopefully), smaller (mostly) and better PMS builds preview (1.14.0.391-7623e9224)
Oh I didn’t know about 1.14 yet. It’s fixed there indeed. I’ll stop being OT now 
Plex Media Server: ELF 64-bit LSB executable, x86-64, version 1 (FreeBSD), dynamically linked, interpreter /libexec/ld-elf.so.1, for FreeBSD 11.1, FreeBSD-style, stripped