From eBower Wiki
Jump to: navigation, search
(Additional Plugins)
(Additional Plugins)
Line 94: Line 94:
  
 
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).
 
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).
 +
 +
== Unsupported Hardware ==
 +
 +
It '''may''' be possible to use unsupported hardware by using [https://tvheadend.org/ Tvheadend] and the [https://github.com/jkaberg/tvhProxy 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.

Revision as of 19:10, 19 January 2017

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. But I kind of like the idea of a merged library allowing me to pull DVR shows in the same searches and browses as non-DVR shows.

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

Then I need to create a directory and ensure that new files are owned by the group:

sudo mkdir --mode=u+rwx,g+rwxs,o+r,o-wx /mnt/movies
sudo chown plex:media /mnt/movies

Now you can touch test.txt in this directory and verify that it's owned by the media group. If you sudo su plex you should also be able to create a test.txt file.

Samba permissions

Samba creates a few other issues. 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.

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:

  • PlexWatch will tell you who's streaming what and when. There's a web-based UI as well, but just checking out /opt/plexWatch/plexWatch.log is good enough in most cases.
  • Plex WebTools is an installer for various plugins that can make management and upgrades easier.
  • 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.

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).

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.