Monday, 11 July 2016

Plex playback failure on Linux


This is my first post on what I hope to be a useful resource for Linux Tips and Tricks.

This evening I had a disagreement with Plex Media Server on my HP Gen 8 Micro Server, it runs a Debian based distro called Open Media Vault, it's pretty slick, check it out.

When I first setup this server with Open Media Vault I used an 8GB USB drive connected to the internal USB port as I didn't think the install would go beyond that, but it turns out the databases and metadata behind Plex Media Server chew up quite a bit of space. So I moved the Plex Library onto a 240GB SSD that is used for VM storage, all was good for quite a while till this evening when I updated Plex and it failed to transcode media, direct play wasn't an issue however.

The log file showed this when ever I attempted to play files from a device that needed to transcode:
Jul 10, 2016 20:50:33.579 [0x7f40a53f9700] ? - [Transcoder] Unknown decoder 'h264'

Googling didn't help much, the best I found was this comment on the Plex forums:
http://forums.plex.tv/discussion/comment/1204390/#Comment_1204390

So I had a look at /etc/fstab and the drive that I moved the Plex Library to had the noexec option, noexec prevents execution of binaries and scripts, I remounted the drive with the exec option and Plex worked again!

Here's a quick run down on how you can resolve the issue:

Locate where your Plex Media Server is installed with the find command:
# find / -name 'libh264_decoder.so'

/media/fa7154d4-1137-43ab-8720-1ccfe9cad638/plexmediaserver/Library/Application Support/Plex Media Server/Codecs/2c361e4-1071-linux-ubuntu-x86_64/libh264_decoder.so

Check /etc/fstab for the offending entry using the path from the output of the find command:
# grep '/media/fa7154d4-1137-43ab-8720-1ccfe9cad638' /etc/fstab

UUID=fa7154d4-1137-43ab-8720-1ccfe9cad638 /media/fa7154d4-1137-43ab-8720-1ccfe9cad638 ext4 defaults,nofail,user_xattr,noexec,usrjquota=aquota.user,grpjquota=aquota.group,jqfmt=vfsv0,acl 0 2

Before editing the fstab file you can test by remounting the filesystem with the exec option:
mount -o remount,exec /media/fa7154d4-1137-43ab-8720-1ccfe9cad638/

Use your favourite text editor to change it to exec or leave it out, note that the presence of the "user" option implies noexec unless overridden with exec.

I hope this is even slightly helpful to someone.

No comments:

Post a Comment