From eBower Wiki
Jump to: navigation, search
(Additional Plugins)
(Additional Plugins)
Line 75: Line 75:
 
Some useful plugins for Plex:
 
Some useful plugins for Plex:
  
* [http://tautulli.com/ Tautulli] provides a slick front end for seeing who's streaming on your server.
+
* [http://tautulli.com/ Tautulli] provides a slick front end for seeing who's streaming on your server. It includes various notification plugins that can replace [https://github.com/ljunkie/plexWatch/blob/master/README.md PlexWatch] for my needs.
* [https://github.com/ljunkie/plexWatch/blob/master/README.md PlexWatch] will tell you who's streaming what and when. There's a web-based UI as well, but just checking out <tt>/opt/plexWatch/plexWatch.log</tt> is good enough in most cases.
 
 
* [https://forums.plex.tv/discussion/126254/rel-webtools-2-x/p1 Plex WebTools] is an installer for various plugins that can make management and upgrades easier.
 
* [https://forums.plex.tv/discussion/126254/rel-webtools-2-x/p1 Plex WebTools] is an installer for various plugins that can make management and upgrades easier.
* [https://forums.plex.tv/discussion/101755/rel-hdhomerun-viewer/p1 HD HomeRun Viewer] can be installed using the WebTools above and allows for realtime viewing of an HD HomeRun. It seems a bit more reliable than the HDGrandSlam mentioned above.
+
* [https://github.com/mrworf/plexupdate PlexUpdate] can keep your server up-to-date, but it's possible that Tautulli can replace it as well.
* [https://github.com/mrworf/plexupdate PlexUpdate] can keep your server up-to-date.
 
  
 
== Commercial Detection and Removal ==
 
== Commercial Detection and Removal ==

Revision as of 11:42, 11 April 2018

I've been a long-time Plex user, but it's been largely polished and not in need of documentation. However their new DVR solution has some quirks in that it's the first time I need to write to a directory.

Basic Information

First, you currently need to be a Plex Pass membership. Take a look at whether this would enable you to cut the cord on your cable company, if so a lifetime pass will pay for itself in a short timeframe. I took a look at the effort I expended in getting a MythTV setup working, realized how often I'd likely need to rebuild the system as devices evolve, and the time it takes to transcode (or re-rip) my library and quickly found that my time was worth a lot more than the cost of Plex Pass.

First you'll want to read the FAQ for DVR support. It has links for the proper download version as well as the supported hardware. You'll also want to check out the DVR Beta forum for support.

The currently supported hardware is from SiliconDust. It's a decent but simple bit of kit that takes the OTA signal in and puts out a MPEG stream. I opted for the EXTEND based on the premise that an onboard transcoder to a lower bitrate stream may be of some level of benefit in the future, but the CONNECT should work just fine as well.

Library Permissions

One option is to create a dedicated DVR directory. For example, I use /mnt/movies and /mnt/tv_shows. A trivial solution is to create /mnt/dvr/movies and /mnt/dvr/tv_shows with different permissions owned wholly by Plex. I use this method ow to segregate content that I own on DVD from stuff that's from the DVR and other sources.

Group permissions are the key to this solution. I want to be able to write to a directory, but I also need Plex to be able to write to it. As such, I created a media group and added both myself and the plex user to it.

sudo groupadd media
sudo usermod -a -G media plex
sudo usermod -a -G media $USER

Unfortunately Plex forces permissions onto the new files it creates and those permissions are 644, meaning members of the plex group can't edit or delete files. You can fix this periodically using a cron:

sudo su plex
crontab -e
00 * * * * find /path/to/library -type f -exec chmod 664 {} \;
00 * * * * find /path/to/library -type d -exec chmod 775 {} \;

You can also tack these onto the end of the postprocessing script (see Commercial Detection and Removal below).

Samba permissions

Samba allows us to force user/group ownership and permissions. First we'll want to ensure that the directory is writable in the /etc/samba/smb.conf configuration:

[movies]
   comment = Movies
   path = /path/to/movies
   guest ok = no
   writable = yes
   browseable = yes
   valid users = your_username, plex
   force group = media

In the Plex server's /etc/fstab you should have a line like the following:

//samba-server/movies /mnt/movies cifs credentials=/etc/smbuser/plex,_netdev,noauto,defaults,noperm 0 0

The /etc/smbuser/plex file is very simple:

username=plex
password=plaintext_password

If course, you'll want to sudo chmod 600 /etc/smbuser/plex and not use a very important password here.

Where's the Grid View?

There isn't one. And really in the current state you don't need it. The grid view is there to help tie you to the stations that are broadcasting a show, but really it's awkward. Let's take a look at NBC's Tuesday night lineup (network and day chosen at random). We start at 8:00 with a game show, then go to a drama/comedy, then a first-responder drama. There is absolutely nothing to tie these shows together other than the setting on your tuner.

Instead you just search. Lets say you like crime procedurals, search for Law and Order and start recording. Search for CSI and pick a series. Now you can look in the Program Guide and you notice that Chicago Fire is in your Recommended For You section. This is much cleaner, you don't need to know that it's NBC who's airing it or that it's at 10pm on Tuesday - that's all hidden in the back end.

With live TV things change a bit. There's an "On Right Now" and "Starting Soon" section, but that would be a bit easier to view in a table format. However, I wouldn't want a table with the channel as the Y axis, instead I'd rather see all of the sitcoms that are airing now and for the next few hours without caring about which station they're on - effectively showing me a tuner scheduling diagram with time on the X axis and a filter by genre or name. This way I don't need to worry about trying to ignore a game show on a station but needing to pay attention to what's on next I can browse by content instead of by channel.

Review

THIS IS BETA SOFTWARE. There are bugs and missing features. I expect that. I've created a list of suggestions for improvement on the beta forum but most of them are minor. I'm able to record individual shows or series. They appear in your existing libraries. I can stream to the web UI, Android devices, or a Chromecast. I can access the content locally or on the road.

The one major missing feature is that I can't stream live TV. This has been mentioned once or twice on the forums... There is a workaround, there's a HDGrandSlam Plex Plugin that lets you view live TV (Android devices don't currently transcode the stream, see below for the HD HomeRun Viewer). Assuming that Plex devs don't have Aereo-style legal issues but more technical ones it may be a good solution until the development catches up.

Additional Plugins

Some useful plugins for Plex:

  • Tautulli provides a slick front end for seeing who's streaming on your server. It includes various notification plugins that can replace PlexWatch for my needs.
  • Plex WebTools is an installer for various plugins that can make management and upgrades easier.
  • PlexUpdate can keep your server up-to-date, but it's possible that Tautulli can replace it as well.

Commercial Detection and Removal

Software called Comskip can detect commercials in DVR files with varying degrees of success. You'll need to first install dependencies, then download it from GitHub:

sudo apt-get install git autoconf libtool libargtable2-dev libavutil-dev libavformat-dev ffmpeg libavcodec-dev
git clone git://github.com/erikkaashoek/Comskip 
cd Comskip
./autogen.sh
./configure
make
sudo cp comskip /usr/local/bin/

This just detects commercials, to remove them you can use the comcut and comchap scripts:

git clone git://github.com/BrettSheleski/comchap
cd comchap
sudo cp comc* /usr/local/bin/

Using comcut filename.ts you should now be able to remove commercials and overwrite filename.ts with a commercial-free version. Needless to say, if the content is important to you this may be a bit scary, so you may instead wish to use comchap which will do the same, but instead add chapter boundaries at the commercials for easy skipping.

To enable this automatically, just go to the Plex web UI, Settings -> DVR, then click DVR Settings. There's an entry for Postprocessing Script which can be changed to "/usr/local/bin/comcut" (or comchap if you're more comfortable with that).

For me the reliability is too variable based on the source channel, the major networks seem to be reliable but some of the stations showing older shows not so much. As such, I've created a plex-post wrapper script which allows me to treat each show differently. By default it will copy the original file to the library prior to trying to cut out the commercials. But I can specify shows that use comchap instead or that save me the hard drive space and avoid the copy. Some shows are also commercial-free and rather than risk a processing artifact I just skip the post processing step altogether.

Unsupported Hardware

It may be possible to use unsupported hardware by using Tvheadend and the Tvheadend proxy. I haven't tested this myself, nor would I recommend you buy hardware hoping it will work, but if you've got a tuner already it could be worth playing with.