Plex Media Server Kodi

/ Comments off

Plex is a media player system and software suite consisting of many player applications for 10-foot user interfaces and an associated media server that organizes personal media stored on local devices. Integrated Plex Channels provide users with access to a growing number of online content providers such as YouTube, Vimeo, TEDTalks, and CNN among others. Plex also provides integration for cloud services including Dropbox, Box, Google Drive, or Copy.

Oct 19, 2017 Is It possible to make a plex server in kodi? I am using raspberry pi and a connected hard drive with that and I was wondering Is it possible to hold my media there and using plex to play it hitplay October 19, 2017, 7:10pm. Jan 25, 2021 Plex and Kodi are two of the biggest media servers in the media player industry. As both media centers enable users to enjoy and store collections of music, movies, and TV shows, let you stream the content on multiple devices and watch live TV channels.

Plex for Linux is split into a closed-source server Plex Media Server, and an open-source client Plex Home Theater, a fork of the popular Kodi project.

Plex Media Server (PMS)

Installation

Install the plex-media-serverAUR package, or the plex-media-server-plexpassAUR package if you have a Plex Pass.

Kodi solves all of the above problems, including playing 4K which sometimes buffers on the firestick plex directly. (no issues on the Shield though). 4K plays fine in kodi with plex addon. Kodi loads plex and shows my login logged in. But my server just cant be found now. Probably after a plex update. It uses Plex Media Server as its backend, using it to present media inside Kodi. Keep in mind, PKC replaces the ability to have any local media library, because it hacks the database and takes it over entirely, so you have a choice of using Kodi the standard way, or the PKC way.

Setup

Start/enable the plexmediaserver.service systemd unit.

To begin configuring the Plex Media Server, browse to http://localhost:32400/web/.

To configure Plex Media Server remotely, you can first create an SSH tunnel (setup can only be done from localhost)

ssh ip.address.of.server -L 8888:localhost:32400

and then browse to http://localhost:8888/web/.

or if you are running apache, with a reverse proxy, by adding this configuration in httpd-vhosts.conf

Plugins

PMS can be expanded with additional plugins. For example, PMS can be used as an IPTV client with the IPTV plugin.

Plugins can be installed inside /var/lib/plex/Plex Media Server/Plug-ins.

Plex Live TV and DVR

Plex live TV requires a plexpass.

To enable live TV viewing and DVR support with plex, you must have one of the supported tuners listed on the support page and plex-media-server-plexpassAUR installed. PMS will automatically recognize any connected tuners.

The plex user needs to be part of the video group in order to access local tuners. This can be done by running usermod -a -G video plex

To enable IPTV support via m3u playlist install xTeVeAUR.

Security

It is recommended to store your media files outside of your home directory, as making it accessible to PMS would mean lowering its security. Having a separate /media or /mnt/media partition is a good setup for use with PMS.

You can further increase security via systemd, by editingplexmediaserver.service as follows:

Note: Those mechanisms are currently limited. For instance, ReadOnlyDirectories do not apply to any submount, you have to list them as well.

Resource Management

Originally, PMS used ulimit to limit its allocated resources, however this is not compatible with running as a regular user. Instead, you can now set a maximum amount of memory via, again, systemd. For example, you can add:

to the file mentioned above.

Network

Note: PMS supports both IPv4 and IPv6. This section only assumes the use of IPv4.

PMS and its DLNA server require several ports to be open:

  • Plex Media Server: TCP 32400
  • Plex DLNA Server: TCP 32469, UDP 1900
  • Network Discovery: UDP 32410, 32412, 32413, 32414
  • Bonjour/Avahi Network Discovery (legacy): UDP 5353

A short example with iptables:

In order to connect to Plex through on a standard http port, this command can be used (for port 8080):

Then you can connect directly to http://yourplexaddress:8080 on this port

Library Updates

Plex Media Server has a setting 'Update my library automatically' which can detect new media files as they are downloaded to your library. But as your library grows, these updates might stop working reliably. To fix, you need to increase the number of files non-root users are allowed to subscribe to via inotify. Create the file /etc/sysctl.d/40-max-user-watches.conf

and run sudo sysctl --system to apply without rebooting. Now plex should see any new files.

Troubleshooting

This article or section needs expansion.

Reason: Look if journalctl can be made equivalent with SYSTEMD_LOG_LEVEL=debug, currently appears unreliable, see User talk:Alucryd#Plex (Discuss in Talk:Plex#)

Logs are located in:

In case there are no logs or they are not helpful, you might want to launch PMS manually to get some terminal output:

Plex's WebUI returns 404

There may be a situation when updating Plex's WebUI will return 404 Not Found. To fix this you just need to restartplexmediaservice.service.

Plex Home Theater (PHT)

Previously known as Plex Media Center, Plex Home Theater is the software component used for a long time as the front-end media player for Plex's back-end server component Plex Media Server. This component came from a fork of XBMC Media Center software on May 21, 2008.

Official support for Plex Home Theater (from Plex, Inc.) has been discontinued in favour of Plex Media Player (based on MPV). However, Plex Home Theater was forked and has been developed further by the Open Source community under the name OpenPHT

Installation

Install the openphtAUR package.

Plex Home Theater can be launched by running plexhometheater.sh from your terminal.

Plex Media Player (PMP)

Plex Media Player is the current release of Plex's media client. It has officially replaced #Plex Home Theater (PHT) (which is still receiving bug fixes) and builds upon previous functionality, such as using mpv. Plex has made PMP available to all users and it has also become compatible with Kodi. Keep in mind, PMP is not open-source (unlike PHT).

Installation

Install the plex-media-playerAUR package.

Kodi and PleXBMC

With the PleXBMC add-on, Kodi can be used as a replacement for PHT. Visual studio code kotlin autocomplete.

Installation

Install the kodi[broken link: replaced by kodi-gbm] package, then follow the instructions over here.

Retrieved from 'https://wiki.archlinux.org/index.php?title=Plex&oldid=665325'

Plex is a media player system and software suite consisting of many player applications for 10-foot user interfaces and an associated media server that organizes personal media stored on local devices. Integrated Plex Channels provide users with access to a growing number of online content providers such as YouTube, Vimeo, TEDTalks, and CNN among others. Plex also provides integration for cloud services including Dropbox, Box, Google Drive, or Copy.

Plex for Linux is split into a closed-source server Plex Media Server, and an open-source client Plex Home Theater, a fork of the popular Kodi project.

Kodi

Plex Media Server (PMS)

Installation

Install the plex-media-serverAUR package, or the plex-media-server-plexpassAUR package if you have a Plex Pass.

Setup

Start/enable the plexmediaserver.service systemd unit.

To begin configuring the Plex Media Server, browse to http://localhost:32400/web/.

Plex Media Server Kodi

To configure Plex Media Server remotely, you can first create an SSH tunnel (setup can only be done from localhost)

ssh ip.address.of.server -L 8888:localhost:32400

and then browse to http://localhost:8888/web/.

or if you are running apache, with a reverse proxy, by adding this configuration in httpd-vhosts.conf

Plugins

PMS can be expanded with additional plugins. For example, PMS can be used as an IPTV client with the IPTV plugin.

Plugins can be installed inside /var/lib/plex/Plex Media Server/Plug-ins.

Plex Live TV and DVR

Plex live TV requires a plexpass.

To enable live TV viewing and DVR support with plex, you must have one of the supported tuners listed on the support page and plex-media-server-plexpassAUR installed. PMS will automatically recognize any connected tuners.

The plex user needs to be part of the video group in order to access local tuners. This can be done by running usermod -a -G video plex

To enable IPTV support via m3u playlist install xTeVeAUR.

Security

It is recommended to store your media files outside of your home directory, as making it accessible to PMS would mean lowering its security. Having a separate /media or /mnt/media partition is a good setup for use with PMS.

You can further increase security via systemd, by editingplexmediaserver.service as follows:

Note: Those mechanisms are currently limited. For instance, ReadOnlyDirectories do not apply to any submount, you have to list them as well.

Resource Management

Originally, PMS used ulimit to limit its allocated resources, however this is not compatible with running as a regular user. Instead, you can now set a maximum amount of memory via, again, systemd. For example, you can add:

to the file mentioned above.

Network

Note: PMS supports both IPv4 and IPv6. This section only assumes the use of IPv4.

PMS and its DLNA server require several ports to be open:

  • Plex Media Server: TCP 32400
  • Plex DLNA Server: TCP 32469, UDP 1900
  • Network Discovery: UDP 32410, 32412, 32413, 32414
  • Bonjour/Avahi Network Discovery (legacy): UDP 5353

A short example with iptables:

In order to connect to Plex through on a standard http port, this command can be used (for port 8080):

Then you can connect directly to http://yourplexaddress:8080 on this port

Library Updates

Plex Media Server Or Kodi

Plex Media Server has a setting 'Update my library automatically' which can detect new media files as they are downloaded to your library. But as your library grows, these updates might stop working reliably. To fix, you need to increase the number of files non-root users are allowed to subscribe to via inotify. Create the file /etc/sysctl.d/40-max-user-watches.conf

and run sudo sysctl --system to apply without rebooting. Now plex should see any new files.

Troubleshooting

This article or section needs expansion.

Reason: Look if journalctl can be made equivalent with SYSTEMD_LOG_LEVEL=debug, currently appears unreliable, see User talk:Alucryd#Plex (Discuss in Talk:Plex#)

Logs are located in:

In case there are no logs or they are not helpful, you might want to launch PMS manually to get some terminal output:

Plex's WebUI returns 404

There may be a situation when updating Plex's WebUI will return 404 Not Found. To fix this you just need to restartplexmediaservice.service.

Plex Home Theater (PHT)

Previously known as Plex Media Center, Plex Home Theater is the software component used for a long time as the front-end media player for Plex's back-end server component Plex Media Server. This component came from a fork of XBMC Media Center software on May 21, 2008.

Official support for Plex Home Theater (from Plex, Inc.) has been discontinued in favour of Plex Media Player (based on MPV). However, Plex Home Theater was forked and has been developed further by the Open Source community under the name OpenPHT

Installation

Install the openphtAUR package.

Plex Home Theater can be launched by running plexhometheater.sh from your terminal.

Plex Media Player (PMP)

Plex Media Player is the current release of Plex's media client. It has officially replaced #Plex Home Theater (PHT) (which is still receiving bug fixes) and builds upon previous functionality, such as using mpv. Plex has made PMP available to all users and it has also become compatible with Kodi. Keep in mind, PMP is not open-source (unlike PHT).

Plex Media Server Kodi 2019

Installation

Install the plex-media-playerAUR package.

Kodi and PleXBMC

With the PleXBMC add-on, Kodi can be used as a replacement for PHT.

Plex Media Server For Mac

Installation

Install the kodi[broken link: replaced by kodi-gbm] package, then follow the instructions over here.

Retrieved from 'https://wiki.archlinux.org/index.php?title=Plex&oldid=665325'