jellyfin-media-player fork

Vincent Lang d7e94d198d PlayerComponent: use newer properties for showing hardware decoding info 8 år sedan
CMakeModules 380db93d1c Make direct hardware decoding work on Intel/Linux 8 år sedan
bundle 924793b5e5 Switch back to preMachine and escalation for now. 8 år sedan
external 81e2c6ffe9 Fix build with Qt5.7 8 år sedan
release-notes f8897fec10 1.1.0 release notes 8 år sedan
resources 6e62e5a88a Allow keyinput to be mapped to a list of actions. 8 år sedan
scripts 7b3da572ee Make 32 bit Windows build work 8 år sedan
src d7e94d198d PlayerComponent: use newer properties for showing hardware decoding info 8 år sedan
.clang-format 3d4859f1b1 Initial public commit of Plex Media Player 9 år sedan
.clang-tidy 40be8ac9a2 Adjust .clang-tidy for public struct member names 8 år sedan
.gitignore 7716e6fc98 Ignore build dir 8 år sedan
CMakeLists.txt fe67575523 Remove invalid cmake option 8 år sedan
LICENSE 3510741dc1 License under GPLv2 9 år sedan
README.md 2d176676c8 Update README 8 år sedan

README.md

Building

You need:

  • Qt 5.6 (on OSX and windows it will be automatically downloaded when you run CMake)
  • cmake 3.1 or newer
  • ninja is recommended for building

Building on Mac OS X

Configure

If you're happy just building from the command line then run CMake for the ninja build tool:

  • mkdir build ; cd build
  • cmake -GNinja -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=output ..

Build (ninja):

  • ninja

Make a distributable package:

  • ninja install (be patient, it's slow)

Or if you prefer working in Xcode, run CMake for the xcode build):

  • mkdir build ; cd build
  • cmake -GXcode ..

Building on Linux

Using the Qt 5.6 release

It is possible to use a pre-built Qt 5.6 from http://download.qt.io/official_releases/qt/5.6/. Just download and install one of the linux-x64 packages. If your distro packages this version, you might be able to use that. Keep in mind that Qt 5.5 or older will not work properly.

Building Qt 5.6.0

You'll want to grab one of the Qt 5.6.0 (or later) packages from http://download.qt.io/ and unpack it locally. On Fedora, even with a working development environment set up, the following packages were necessary to successfully build Qt (and QtWebEngine):

sudo dnf install libxcb libxcb-devel libXrender libXrender-devel xcb-util-wm xcb-util-wm-devel xcb-util xcb-util-devel xcb-util-image xcb-util-image-devel xcb-util-keysyms xcb-util-keysyms-devel libcap-devel snappy-devel libsrtp-devel nss-devel pciutils-devel gperf

(The majority of the packages on this list came from http://code.qt.io/cgit/qt/qtbase.git/tree/src/plugins/platforms/xcb/README, but everything after xcb-util-keysyms-devel was trial-and-error in attempts build QtWebEngine; this list of packages may not be complete, but hopefully it provides a useful starting point.)

Once you've unpacked the Qt 5.6.0 package:

  • cd qt-everywhere-opensource-src-5.6.0
  • ./configure -confirm-license -opensource
  • make
  • sudo make install
  • cd qtwebengine
  • qmake
  • make
  • sudo make install

That should do it for Qt. It's worth noting that, on a Core i7-950 with 24GB of RAM, this took more than three hours to build. Also, you can prefix ./configure with a make flag definition such as "MAKEFLAGS="-j$(nproc)"", where nproc is the number of parallel builds desired. This will significantly speed up compile time. It is suggested to use a number 1 to 2x the # of cores you have. For more, also see this article.

Example:

MAKEFLAGS="-j$(nproc)" ./configure -confirm-license -opensource

Building mpv

mpv is a bit easier to build than Qt, and compiles much faster.

Before you attempt to build mpv, make sure you have the required dependencies installed: https://github.com/mpv-player/mpv#compilation Some optional dependencies like ALSA or PulseAudio support are required for proper operation of Plex Media Player.

  • git clone git://github.com/mpv-player/mpv
  • cd mpv
  • ./bootstrap.py
  • ./waf configure --enable-libmpv-shared
  • ./waf build
  • sudo ./waf install

Finally! Building plex-media-player

Assuming that everything else has installed correctly, building Plex Media Player should now be fairly straightforward:

  • git clone git://github.com/plexinc/plex-media-player
  • cd plex-media-player
  • mkdir build
  • cd build
  • cmake -GNinja -DCMAKE_BUILD_TYPE=Debug -DQTROOT=/usr/local/Qt-5.6.0 -DMPV_INCLUDE_DIR=/usr/local/include/mpv -DMPV_LIBRARY=/usr/local/lib/libmpv.so.1 -DCMAKE_INSTALL_PREFIX=output ..
  • ninja-build

You may have to adjust the path passed to -DQTROOT. If you use your distro's Qt, omit this argument.

Once ninja-build completes successfully, you should have a usable ./src/plexmediaplayer binary. Run it and test it out! If it works as you expect, you should be able to run sudo install ./src/plexmediaplayer ./src/pmphelper /usr/local/bin so that the program is usable from anywhere on the system.

License

Plex Media Player is licensed under GPL v2. See the LICENSE file. Licenses of dependencies are summarized under resources/misc/licenses.txt. This file can also be printed at runtime when using the --licenses option.