The Plex Media Player is now part of the multimedia repository for Fedora 25+. I works as a standalone player and also as the main interface for an HTPC setup, where the “TV interface” starts as the main thing when you power up your system.
Plex Media Player uses MPV in the background, so any compilation option that was added to MPV, is now also part of Plex Media Player by using the same libraries that were already available in the multimedia repository.
If you are using Gnome Software, you will also find it in the software selection screens.
To install it on Fedora, just perform the following commands:
dnf -y install plex-media-player
You will then find it along with the other applications in your menu.
Normal desktop interface
To get to the normal desktop interface just look for the Plex Media Player icon in your menu. You will be greeted with the familiar Plex web interface, with the main difference being that the player is local through the MPV library.
Enabling Plex Media Player startup at boot
If you are planning to do an HTPC installation, and would like to have Plex Media Player starting instead of the login screen the moment you boot the device, execute the following commands as root:
dnf install plex-media-player-session systemctl set-default plex-media-player echo "allowed_users = anybody" >> /etc/X11/Xwrapper.config
The first command installs the required files (services, targets and PolicyKit overrides). The second command instructs the system to load by default the Plex Media Player target; that is X immediately followed by the player itself. The third command allows the system to start the X server as the Plex Media Player user, otherwise only users logged in through a console or root can start it.
You will be greeted with the TV interface just after boot:
If you want to go back to your normal installation (let’s say Gnome), then revert back the changes (again type the following commands as root):
systemctl set-default graphical sed -i -e '/allowed_users = anybody/d' /etc/X11/Xwrapper.config rpm -e plex-media-player-session
MPV with CUDA
This has been already available for a long time, but with FFmpeg 3.3, CUDA dynamic support loading is enabled also in MPV, so the hard dependency on the CUDA library is gone, and the binaries load the library dynamically:
$ strings /usr/bin/mpv | grep libcuda libcuda.so.1 $ strings /usr/lib64/libmpv.so.1.25.0 | grep libcuda libcuda.so.1
So assuming you have the Nvidia driver already installed with the appropriate CUDA part, you can then play a video with the following command line:
mpv --hwdec=cuda /path/to/video.file
And then check with
nvidia-smi or with the Nvidia control panel if the video engine is being utilized:
If you want to enable that by default, just make sure your configuration file has something like this inside:
$ cat ~/.config/mpv/mpv.conf #hwdec=vdpau #vo=vdpau hwdec=cuda
Source From: fedoraplanet.org.
Original article title: Simone Caronni: Plex Media Player and MPV with CUDA.
This full article can be read at: Simone Caronni: Plex Media Player and MPV with CUDA.