Plex Remote Transcoder - A distributed transcoding backend for Plex

I added a prelimnary WIP verion of the docker-containers on github: https://github.com/kopfpilot/docker-plex-prt
though, slaves don’t register at the master yet.

For time beeing plex 0.9.96.6 is preinstalled and pinned to the version unsing the ENV VERSION, which can be overridden by adding -e VERSION= to your create or run cmd or the docker-compose.yml.

I still try to access ssh without the unknown host notification. Once this is solved, i will make the client self adding itself to the master.

See the Dockerfiles/ docker-compose.yml for needed volumes mapping and ports to expose. Slaves will reuse the volumes from the master-container, if you use “volumes-from”. Otherweise you have to take care of the volumes mapping yourself.

The Image is not uploded to dockerhub yet - which i plan to do, once i am ready. Means you have build it yourself.

build docker images: docker-compose build
run containers: docker-compose up -d

That’s what i could come up with the few hours i had the last past days. Mounting the shares is ment to happen on the docker host level.

Hi @wnielson
The new PRT SESSIONS function return the following errors any idea why ?

plex@SUPERMAN:/home/frodon$ prt sessions
Traceback (most recent call last):
File “/usr/local/bin/prt”, line 9, in
load_entry_point(‘prt==0.3.2’, ‘console_scripts’, ‘prt’)()
File “build/bdist.linux-x86_64/egg/prt.py”, line 524, in main
File “build/bdist.linux-x86_64/egg/prt.py”, line 406, in sessions
File “build/bdist.linux-x86_64/egg/prt.py”, line 379, in get_sessions
AttributeError: ‘function’ object has no attribute ‘name’

@igowas said:
Hi @wnielson
The new PRT SESSIONS function return the following errors any idea why ?

plex@SUPERMAN:/home/frodon$ prt sessions
Traceback (most recent call last):
File “/usr/local/bin/prt”, line 9, in
load_entry_point(‘prt==0.3.2’, ‘console_scripts’, ‘prt’)()
File “build/bdist.linux-x86_64/egg/prt.py”, line 524, in main
File “build/bdist.linux-x86_64/egg/prt.py”, line 406, in sessions
File “build/bdist.linux-x86_64/egg/prt.py”, line 379, in get_sessions
AttributeError: ‘function’ object has no attribute ‘name’

What version of psutil are using?

python -c "import psutil; print psutil.version_info"

@wnielson said:

@igowas said:
Hi @wnielson
The new PRT SESSIONS function return the following errors any idea why ?

plex@SUPERMAN:/home/frodon$ prt sessions
Traceback (most recent call last):
File “/usr/local/bin/prt”, line 9, in
load_entry_point(‘prt==0.3.2’, ‘console_scripts’, ‘prt’)()
File “build/bdist.linux-x86_64/egg/prt.py”, line 524, in main
File “build/bdist.linux-x86_64/egg/prt.py”, line 406, in sessions
File “build/bdist.linux-x86_64/egg/prt.py”, line 379, in get_sessions
AttributeError: ‘function’ object has no attribute ‘name’

What version of psutil are using?

python -c "import psutil; print psutil.version_info"

frodon@SUPERMAN:~$ python -c “import psutil; print psutil.version_info”
(4, 3, 0)

@igowas said:

What version of psutil are using?

python -c "import psutil; print psutil.version_info"

frodon@SUPERMAN:~$ python -c “import psutil; print psutil.version_info”
(4, 3, 0)

Can you pull the latest version and try again?

@wnielson said:

@igowas said:

What version of psutil are using?

python -c "import psutil; print psutil.version_info"

frodon@SUPERMAN:~$ python -c “import psutil; print psutil.version_info”
(4, 3, 0)

Can you pull the latest version and try again?

Yes I will soon. Another question here. My Plex Database is growing none stop since I upgraded PMS to version 1 évent is thumbnail option is set to off. Have you seen the samethingg on your installation. ?

EDIT: Okay nstead of using ubuntu 14.04 I tried with a ubuntu server 16.04 and the PRT SESSION option is working fine. psutil version is different on that ubuntu version
python -c “import psutil; print psutil.version_info” (3, 4, 2)

@wnielson
Getting this while looking on Slave dmesg any idea what is related to ?

[16676.721170] plex_transcoder[11126]: segfault at 0 ip 00000000005f8108 sp 00007ffcd6141650 error 6 in plex_transcoder[400000+c39000]

I’m also getting this error. I’m using 3.4.2

Traceback (most recent call last):
File “/usr/local/bin/prt”, line 9, in
load_entry_point(‘prt==0.3.2’, ‘console_scripts’, ‘prt’)()
File “build/bdist.linux-x86_64/egg/prt.py”, line 524, in main
File “build/bdist.linux-x86_64/egg/prt.py”, line 406, in sessions
File “build/bdist.linux-x86_64/egg/prt.py”, line 379, in get_sessions
AttributeError: ‘function’ object has no attribute ‘name’

@dbershev said:
I’m also getting this error. I’m using 3.4.2

Traceback (most recent call last):
File “/usr/local/bin/prt”, line 9, in
load_entry_point(‘prt==0.3.2’, ‘console_scripts’, ‘prt’)()
File “build/bdist.linux-x86_64/egg/prt.py”, line 524, in main
File “build/bdist.linux-x86_64/egg/prt.py”, line 406, in sessions
File “build/bdist.linux-x86_64/egg/prt.py”, line 379, in get_sessions
AttributeError: ‘function’ object has no attribute ‘name’

Please try the latest commit.

@igowas said:
@wnielson
Getting this while looking on Slave dmesg any idea what is related to ?

[16676.721170] plex_transcoder[11126]: segfault at 0 ip 00000000005f8108 sp 00007ffcd6141650 error 6 in plex_transcoder[400000+c39000]

I haven’t seen this before. I’m not sure what could be the culprit…

@wneilson, Sorry if I missed it in a previous comment, but whats the upgrade procedure for going to a new commit?

@dbershev said:
@wneilson, Sorry if I missed it in a previous comment, but whats the upgrade procedure for going to a new commit?

Do a git pull then python setup.py install.

@wnielson No error, but its not listing any sessions either. Is there a log I can check?

@dbershev said:
@wnielson No error, but its not listing any sessions either. Is there a log I can check?

Are you sure there is an active transcoding session? If so, the log should be at /tmp/prt.log.

@wnielson Yeah, I checked the log and a session is being transcoded. Just doesn’t seem to show up if I do a prt sessions. Not sure if prt is working correctly for me tbh.

2016-07-13 17:05:32,931 - prt - INFO - Host with minimum load is ‘192.168.1.XX’
2016-07-13 17:05:32,932 - prt - INFO - Using transcode host ‘192.168.1.XX’
2016-07-13 17:05:32,932 - prt - INFO - Launching transcode_remote with args [‘ssh’, u’plex@192.168.1.XX’, ‘-p’, u’XX’, u’export LANG=en_US.UTF-8;export PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR=/var/lib/plexmediaserver/Library/Applicati on Support;export SHELL=/bin/bash;export XDG_DATA_HOME=/usr/lib/plexmediaserver/Resources/;export XDG_CACHE_HOME=/var/ lib/plexmediaserver/Library/Application Support/Plex Media Server/Cache/;export X_PLEX_TOKEN=TOKEN;expo rt PLEX_MEDIA_SERVER_HOME=/usr/lib/plexmediaserver;export PWD=/;export LOGNAME=plex;export USER=plex;export FFMPEG_EXT ERNAL_LIBS=/var/lib/plexmediaserver/Library/Application\ Support/Plex\ Media\ Server/Codecs/2c361e4-1071-linux-ubun tu-x86_64/;export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin;export HOME=/var/lib/plexmediaserv er;export PLEX_MEDIA_SERVER_TMPDIR=/tmp;export LD_LIBRARY_PATH=/usr/lib/plexmediaserver;export PLEX_MEDIA_SERVER_MAX_P LUGIN_PROCS=6;export PRT_ID=72038fa8496711e69728005056a09731;cd /opt/plex/tmp/plex-transcode-2lgd7xcy0xx-fb5e6414-4358 -4512-a5c2-7421044e39d4;prt_local -codec:0 h264 -codec:1 dca -noaccurate_seek -i /media/multimedia/Movies/Avengers.mkv -map 0:0 -metadata:s:0 language=eng -codec:0 copy -map 0:1 -metadata:s:1 language=eng -codec:1 aac -ar:1 48000 -channel_layout:1 stereo -b:1 256k -f dash -use_timeline 0 -min_seg_duration 500 0000 -skip_to_segment 1 -time_delta 0.0625 -avoid_negative_ts disabled -map_metadata -1 -map_chapters -1 -movflags +fa ststart dash -start_at_zero -copyts -vsync cfr -y -nostats -loglevel quiet -loglevel_plex error -progressurl http://192.168.1.XX:32400/video/:/transcode/session/2lgd7xcy0xx/progress’]

@wnielson
@dbershev
Same here im getting no errors but no sessions displayed

@dbershev @igowas Finally squashed the bug. Try the latest version.

@wnielson said:
@dbershev @igowas Finally squashed the bug. Try the latest version.

Thx its working now !
If you look at your system messages by using dmesg do you have a few lines like this

plex_transcoder[82410]: segfault at 0 ip 00000000005f8108 sp

I’m not experiencing any issue but I’m just curious. I think it’s happening when someone stop a media but I’m not sure.

@wnielson Fixed it for me as well, thanks!

@wnielson
The next version of PMS available with a plexpass " plexmediaserver_1.0.1.2396-c094d0d_amd64.deb " doesnt work with PRT. X(