Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't get PRT to work on PMS 1.0.2.2413 #32

Open
tyronemills opened this issue Aug 3, 2016 · 22 comments
Open

Can't get PRT to work on PMS 1.0.2.2413 #32

tyronemills opened this issue Aug 3, 2016 · 22 comments
Assignees

Comments

@tyronemills
Copy link

tyronemills commented Aug 3, 2016

I am running PMS Version 1.0.2.2413 and have installed PRT 0.3.2 and am not able to get PRT to transcode a movie for me.

I can SSH into the slave from the master with no password.
I have confirmed the mounts and the ability for the slave to write to the shared /tmp directory.

  • /var/lib/plexmediaserver 10.0.1.110(ro,sync,no_subtree_check)
  • /usr/lib/plexmediaserver 10.0.1.110(ro,sync,no_subtree_check)
  • /home/tyrone/tmp 10.0.1.110(rw,sync,no_subtree_check)
  • /home/tyrone/data/Media 10.0.1.110(ro,sync,no_subtree_check)

Running prt get_cluster_load gives the following:

$ prt get_cluster_load
Cluster Load
10.0.1.110: 0.00%, 0.08%, 0.42%

Looking at the error I get in the PRT.log (bolded below), it appears as though the slave is being instructed to use the "Plex Transcoder", rather than "plex_transcoder". Also, the ssh command is referencing the master's IP, not the slaves. This is likely just me not understanding how the flow is supposed to work, but I wanted to point it out.

When I try to load a movie, I get the following error in the PRT.log:

2016-08-03 15:09:12,585 - prt - DEBUG - Getting load for host '10.0.1.110'
2016-08-03 15:09:12,909 - prt - DEBUG - Log for '10.0.1.110': [0.0, 0.0833333333333, 0.416666666667]
2016-08-03 15:09:12,909 - prt - INFO - Host with minimum load is '10.0.1.110'
2016-08-03 15:09:12,909 - prt - INFO - Using transcode host '10.0.1.110'
2016-08-03 15:09:12,909 - prt - INFO - Launching transcode_remote with args ['ssh', u'[email protected]', '-p', u'22', u"export LC_CTYPE=en_CA.UTF-8;export LESSOPEN=| /usr/bin/lesspipe %s;export LOGNAME=plex;export USER=plex;export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games;export HOME=/var/lib/plexmediaserver;export LANG=en_CA.UTF-8;export TERM=xterm-256color;export SHELL=/bin/bash;export LANGUAGE=en_CA:en;export SHLVL=2;export SUDO_USER=tyrone;export USERNAME=root;export XDG_RUNTIME_DIR=/run/user/1000;export SUDO_UID=1000;export XDG_SESSION_ID=1;export =/usr/lib/plexmediaserver/Resources/Plex Transcoder;export SUDO_COMMAND=/bin/su;export SUDO_GID=1000;export LESSCLOSE=/usr/bin/lesspipe %s %s;export OLDPWD=/home/tyrone/Plex-Remote-Transcoder;export PWD=/var/lib/plexmediaserver;export MAIL=/var/mail/plex;export LS_COLORS=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:.tar=01;31:.tgz=01;31:.arj=01;31:.taz=01;31:.lzh=01;31:.lzma=01;31:.tlz=01;31:.txz=01;31:.zip=01;31:.z=01;31:.Z=01;31:.dz=01;31:.gz=01;31:.lz=01;31:.xz=01;31:.bz2=01;31:.bz=01;31:.tbz=01;31:.tbz2=01;31:.tz=01;31:.deb=01;31:.rpm=01;31:.jar=01;31:.war=01;31:.ear=01;31:.sar=01;31:.rar=01;31:.ace=01;31:.zoo=01;31:.cpio=01;31:.7z=01;31:.rz=01;31:.jpg=01;35:.jpeg=01;35:.gif=01;35:.bmp=01;35:.pbm=01;35:.pgm=01;35:.ppm=01;35:.tga=01;35:.xbm=01;35:.xpm=01;35:.tif=01;35:.tiff=01;35:.png=01;35:.svg=01;35:.svgz=01;35:.mng=01;35:.pcx=01;35:.mov=01;35:.mpg=01;35:.mpeg=01;35:.m2v=01;35:.mkv=01;35:.webm=01;35:.ogm=01;35:.mp4=01;35:.m4v=01;35:.mp4v=01;35:.vob=01;35:.qt=01;35:.nuv=01;35:.wmv=01;35:.asf=01;35:.rm=01;35:.rmvb=01;35:.flc=01;35:.avi=01;35:.fli=01;35:.flv=01;35:.gl=01;35:.dl=01;35:.xcf=01;35:.xwd=01;35:.yuv=01;35:.cgm=01;35:.emf=01;35:.axv=01;35:.anx=01;35:.ogv=01;35:.ogx=01;35:.aac=00;36:.au=00;36:.flac=00;36:.mid=00;36:.midi=00;36:.mka=00;36:.mp3=00;36:.mpc=00;36:.ogg=00;36:.ra=00;36:.wav=00;36:.axa=00;36:.oga=00;36:.spx=00;36:_.xspf=00;36:;export PRT_ID=e8d20c7659c611e698fed43d7edf724c;cd /var/lib/plexmediaserver;prt_local -codec:0 h264 -codec:1 dca -noaccurate_seek -i '/home/tyrone/data/Media/Movies/AVP Alien vs. Predator (2004)1080p/AVP Alien vs. Predator.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 5.1 -b:1 768k -segment_format mpegts -f segment -flags -global_header -segment_time 10 -segment_start_number 0 -segment_copyts 1 -segment_time_delta 0.0625 -max_delay 5000000 -avoid_negative_ts disabled -map_metadata -1 -map_chapters -1 media-%05d.ts -start_at_zero -copyts -vsync cfr -y -nostats -loglevel quiet -loglevel_plex error -progressurl http://10.0.1.99:32400/video/:/transcode/session/ass2ggw0n5n/progress"]

2016-08-03 15:09:13,301 - prt - INFO - Transcode stopped on host '10.0.1.110'

Any help or ideas gratefully accepted.

Thanks in advance!

@tyronemills
Copy link
Author

In case it's needed, here is the contents of the ~/.prt.conf file:

{
"servers_script": null,
"ipaddress": "10.0.1.99",
"path_script": null,
"logging": {
"loggers": {
"prt": {
"handlers": [
"file_handler"
],
"propagate": "no",
"level": "DEBUG"
}
},
"handlers": {
"file_handler": {
"backupCount": 20,
"level": "INFO",
"encoding": "utf8",
"filename": "prt.log",
"formatter": "simple",
"class": "logging.handlers.RotatingFileHandler",
"maxBytes": 10485760
}
},
"version": 1,
"disable_existing_loggers": false,
"formatters": {
"simple": {
"format": "%(asctime)s - %(name)s - %(levelname)s - %(message)s"
}
}
},
"servers": {
"10.0.1.110": {
"port": "22",
"user": "plex"
}
}
}

@wnielson wnielson self-assigned this Aug 6, 2016
@wnielson
Copy link
Owner

wnielson commented Aug 6, 2016

Did you set your transcoder temporary directory in the PMS settings? The issue looks like it is trying to place the transcode output into the directory /var/lib/plexmediaserver. The cd /var/lib/plexmediaserver line in your output should be something like cd /opt/plex/tmp/plex-transcode-tif0xli491h59u1270mp9zfr-ae3c3bcd-925a-45f2-b51c-3e11fb2652e0.

@tyronemills
Copy link
Author

tyronemills commented Aug 6, 2016

Good catch! I set it, and I still get an error, with this output:

2016-08-06 11:09:21,277 - prt - INFO - Host with minimum load is '10.0.1.110'
2016-08-06 11:09:21,277 - prt - INFO - Using transcode host '10.0.1.110'
2016-08-06 11:09:21,277 - prt - INFO - Launching transcode_remote with args ['ssh', u'[email protected]', '-p', u'22', u"export ADDRFAM=inet;export PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR=/var/lib/plexmediaserver/Library/Application Support;export IFACE=p2p1;export XDG_DATA_HOME=/usr/lib/plexmediaserver/Resources/;export PLEX_MEDIA_SERVER_USER=plex;export UPSTART_EVENTS=filesystem net-device-up;export PLEX_MEDIA_SERVER_HOME=/usr/lib/plexmediaserver;export HOME=/var/lib/plexmediaserver;export PATH=/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/sbin:/sbin:/bin;export LD_LIBRARY_PATH=/usr/lib/plexmediaserver;export TERM=linux;export UPSTART_INSTANCE=;export PLEX_MEDIA_SERVER_MAX_STACK_SIZE=3000;export METHOD=manual;export XDG_CACHE_HOME=/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Cache/;export X_PLEX_TOKEN=pxpuk9HAKAsRgq6dheVr;export UPSTART_JOB=plexmediaserver;export FFMPEG_EXTERNAL_LIBS=/var/lib/plexmediaserver/Library/Application\\ Support/Plex\\ Media\\ Server/Codecs/ecd8c57-1099-linux-ubuntu-x86_64/;export PLEX_MEDIA_SERVER_TMPDIR=/tmp;export TMPDIR=/tmp;export OLDPWD=/;export LOGICAL=p2p1;export PWD=/usr/lib/plexmediaserver;export PLEX_MEDIA_SERVER_MAX_PLUGIN_PROCS=6;export PRT_ID=e5fd04ba5c0011e6abe1d43d7edf724c;cd /home/tyrone/tmp/plex-transcode-vpi6uq55a3n-4afbb772-4f1e-49b3-81b3-d0ce505f19f3;prt_local -codec:0 h264 -codec:1 dca -noaccurate_seek -i '/home/tyrone/data/Media/Movies/Matrix Reloaded, The (2003)1080p/The Matrix Reloaded.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 5.1 -b:1 768k -segment_format mpegts -f segment -flags -global_header -segment_time 10 -segment_start_number 0 -segment_copyts 1 -segment_time_delta 0.0625 -max_delay 5000000 -avoid_negative_ts disabled -map_metadata -1 -map_chapters -1 media-%05d.ts -start_at_zero -copyts -vsync cfr -y -nostats -loglevel quiet -loglevel_plex error -progressurl http://10.0.1.99:32400/video/:/transcode/session/vpi6uq55a3n/progress"]

2016-08-06 11:09:02,707 - prt - INFO - Launching transcode_local: ['/usr/lib/plexmediaserver/Resources/plex_transcoder', '-codec:0', 'h264', '-codec:1', 'dca', '-noaccurate_seek', '-i', '/home/tyrone/data/Media/Movies/Matrix Reloaded, The (2003)1080p/The Matrix Reloaded.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', '5.1', '-b:1', '768k', '-segment_format', 'mpegts', '-f', 'segment', '-flags', '-global_header', '-segment_time', '10', '-segment_start_number', '0', '-segment_copyts', '1', '-segment_time_delta', '0.0625', '-max_delay', '5000000', '-avoid_negative_ts', 'disabled', '-map_metadata', '-1', '-map_chapters', '-1', 'media-%05d.ts', '-start_at_zero', '-copyts', '-vsync', 'cfr', '-y', '-nostats', '-loglevel', 'quiet', '-loglevel_plex', 'error', '-progressurl', 'http://10.0.1.99:32400/video/:/transcode/session/vpi6uq55a3n/progress']
2016-08-06 11:09:21,651 - prt - INFO - Transcode stopped on host '10.0.1.110'

@wnielson
Copy link
Owner

wnielson commented Aug 6, 2016

What errors do you see in the Plex Media Server log?

@tyronemills
Copy link
Author

tyronemills commented Aug 7, 2016

Aug 06, 2016 17:36:44.398 [0x7fdd76bff700] DEBUG - MDE: analyzing media item 85108
Aug 06, 2016 17:36:44.399 [0x7fdd76bff700] DEBUG - MDE: The Matrix Reloaded (2003): Direct Play is disabled
Aug 06, 2016 17:36:44.399 [0x7fdd76bff700] DEBUG - MDE: The Matrix Reloaded (2003): media must be transcoded in order to use the hls protocol
Aug 06, 2016 17:36:44.399 [0x7fdd76bff700] DEBUG - MDE: The Matrix Reloaded (2003): no direct play video profile exists for http/mkv/h264
Aug 06, 2016 17:36:44.399 [0x7fdd76bff700] DEBUG - MDE: The Matrix Reloaded (2003): no direct play video profile exists for http/mkv/h264/dca
Aug 06, 2016 17:36:44.399 [0x7fdd76bff700] DEBUG - MDE: The Matrix Reloaded (2003): no direct play video profile exists for http/mkv/h264/vorbis
Aug 06, 2016 17:36:44.399 [0x7fdd76bff700] DEBUG - MDE: The Matrix Reloaded (2003): no direct play video profile exists for http/mkv/h264/vorbis
Aug 06, 2016 17:36:44.399 [0x7fdd76bff700] DEBUG - MDE: The Matrix Reloaded (2003): no direct play video profile exists for http/mkv/h264/vorbis
Aug 06, 2016 17:36:44.399 [0x7fdd76bff700] DEBUG - MDE: The Matrix Reloaded (2003): selected media 0 / 85108
Aug 06, 2016 17:36:44.399 [0x7fdd76bff700] DEBUG - Starting a transcode session r20sw4ii7jf at offset -1.0 (state=2)
Aug 06, 2016 17:36:44.399 [0x7fdd76bff700] DEBUG - Streaming Resource: Added session 0x7fdd7dcb5a80:83cyhlvoyle
Aug 06, 2016 17:36:44.402 [0x7fdd76bff700] DEBUG - [Universal] Using local file path instead of URL: /home/tyrone/data/Media/Movies/Matrix Reloaded, The (2003)1080p/The Matrix Reloaded.mkv
Aug 06, 2016 17:36:44.402 [0x7fdd76bff700] VERBOSE - Sufficient disk space: 522.7MB source file, 105.32GB capacity, 91.77GB available on /home/tyrone/tmp
Aug 06, 2016 17:36:44.402 [0x7fdd76bff700] DEBUG - Job running: FFMPEG_EXTERNAL_LIBS='/var/lib/plexmediaserver/Library/Application\ Support/Plex\ Media\ Server/Codecs/ecd8c57-1099-linux-ubuntu-x86_64/' XDG_CACHE_HOME='/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Cache/' XDG_DATA_HOME='/usr/lib/plexmediaserver/Resources/' X_PLEX_TOKEN='xxxxxxxxxxxxxxxxxxxx' '/usr/lib/plexmediaserver/Resources/Plex Transcoder' '-codec:0' 'h264' '-codec:1' 'dca' '-noaccurate_seek' '-i' '/home/tyrone/data/Media/Movies/Matrix Reloaded, The (2003)1080p/The Matrix Reloaded.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' '5.1' '-b:1' '768k' '-segment_format' 'mpegts' '-f' 'segment' '-flags' '-global_header' '-segment_time' '10' '-segment_start_number' '0' '-segment_copyts' '1' '-segment_time_delta' '0.0625' '-max_delay' '5000000' '-avoid_negative_ts' 'disabled' '-map_metadata' '-1' '-map_chapters' '-1' 'media-%05d.ts' '-start_at_zero' '-copyts' '-vsync' 'cfr' '-y' '-nostats' '-loglevel' 'quiet' '-loglevel_plex' 'error' '-progressurl' 'http://127.0.0.1:32400/video/:/transcode/session/r20sw4ii7jf/progress'
Aug 06, 2016 17:36:44.404 [0x7fdd76bff700] VERBOSE - Starting child process with pid 30156
Aug 06, 2016 17:36:45.199 [0x7fdd787ff700] DEBUG - Request: [10.0.1.110:49384] PUT /video/:/transcode/session/r20sw4ii7jf/progress?index=0&id=0&codec=h264&type=video (7 live)
Aug 06, 2016 17:36:45.199 [0x7fdd787ff700] VERBOSE -  * index => 0
Aug 06, 2016 17:36:45.200 [0x7fdd787ff700] VERBOSE -  * id => 0
Aug 06, 2016 17:36:45.200 [0x7fdd787ff700] VERBOSE -  * codec => h264
Aug 06, 2016 17:36:45.200 [0x7fdd787ff700] VERBOSE -  * type => video
Aug 06, 2016 17:36:45.200 [0x7fdd787ff700] DEBUG - Auth: We found auth token (xxxxxxxxxxxxxxxxxxxx), enabling token-based authentication.
Aug 06, 2016 17:36:45.200 [0x7fdd787ff700] DEBUG - Auth: Came in with the master token, authorization succeeded.
Aug 06, 2016 17:36:45.200 [0x7fdda9ffe700] DEBUG - Completed: [10.0.1.110:49384] 206 PUT /video/:/transcode/session/r20sw4ii7jf/progress?index=0&id=0&codec=h264&type=video (7 live) 1ms 190 bytes
Aug 06, 2016 17:36:45.201 [0x7fdd71ffe700] DEBUG - Request: [10.0.1.110:49386] PUT /video/:/transcode/session/r20sw4ii7jf/progress?index=1&id=0&codec=dts&type=audio (8 live)
Aug 06, 2016 17:36:45.201 [0x7fdd71ffe700] VERBOSE -  * index => 1
Aug 06, 2016 17:36:45.201 [0x7fdd71ffe700] VERBOSE -  * id => 0
Aug 06, 2016 17:36:45.201 [0x7fdd71ffe700] VERBOSE -  * codec => dts
Aug 06, 2016 17:36:45.201 [0x7fdd71ffe700] VERBOSE -  * type => audio
Aug 06, 2016 17:36:45.201 [0x7fdd71ffe700] DEBUG - Auth: We found auth token (xxxxxxxxxxxxxxxxxxxx), enabling token-based authentication.
Aug 06, 2016 17:36:45.201 [0x7fdd71ffe700] DEBUG - Auth: Came in with the master token, authorization succeeded.
Aug 06, 2016 17:36:45.202 [0x7fdda9ffe700] DEBUG - Completed: [10.0.1.110:49386] 206 PUT /video/:/transcode/session/r20sw4ii7jf/progress?index=1&id=0&codec=dts&type=audio (7 live) 0ms 190 bytes
Aug 06, 2016 17:36:45.202 [0x7fdd787ff700] DEBUG - Request: [10.0.1.110:49388] PUT /video/:/transcode/session/r20sw4ii7jf/progress?index=2&id=0&codec=vorbis&type=audio (7 live)
Aug 06, 2016 17:36:45.202 [0x7fdd787ff700] VERBOSE -  * index => 2
Aug 06, 2016 17:36:45.202 [0x7fdd787ff700] VERBOSE -  * id => 0
Aug 06, 2016 17:36:45.203 [0x7fdd787ff700] VERBOSE -  * codec => vorbis
Aug 06, 2016 17:36:45.203 [0x7fdd787ff700] VERBOSE -  * type => audio
Aug 06, 2016 17:36:45.203 [0x7fdd787ff700] DEBUG - Auth: We found auth token (xxxxxxxxxxxxxxxxxxxx), enabling token-based authentication.
Aug 06, 2016 17:36:45.203 [0x7fdd787ff700] DEBUG - Auth: Came in with the master token, authorization succeeded.
Aug 06, 2016 17:36:45.203 [0x7fddaa7ff700] DEBUG - Completed: [10.0.1.110:49388] 206 PUT /video/:/transcode/session/r20sw4ii7jf/progress?index=2&id=0&codec=vorbis&type=audio (7 live) 0ms 190 bytes
Aug 06, 2016 17:36:45.204 [0x7fdd71ffe700] DEBUG - Request: [10.0.1.110:49390] PUT /video/:/transcode/session/r20sw4ii7jf/progress?index=3&id=0&codec=vorbis&type=audio (7 live)
Aug 06, 2016 17:36:45.204 [0x7fdd71ffe700] VERBOSE -  * index => 3
Aug 06, 2016 17:36:45.204 [0x7fdd71ffe700] VERBOSE -  * id => 0
Aug 06, 2016 17:36:45.204 [0x7fdd71ffe700] VERBOSE -  * codec => vorbis
Aug 06, 2016 17:36:45.204 [0x7fdd71ffe700] VERBOSE -  * type => audio
Aug 06, 2016 17:36:45.204 [0x7fdd71ffe700] DEBUG - Auth: We found auth token (xxxxxxxxxxxxxxxxxxxx), enabling token-based authentication.
Aug 06, 2016 17:36:45.204 [0x7fdd71ffe700] DEBUG - Auth: Came in with the master token, authorization succeeded.
Aug 06, 2016 17:36:45.205 [0x7fddaa7ff700] DEBUG - Completed: [10.0.1.110:49390] 206 PUT /video/:/transcode/session/r20sw4ii7jf/progress?index=3&id=0&codec=vorbis&type=audio (7 live) 0ms 190 bytes
Aug 06, 2016 17:36:45.205 [0x7fdd787ff700] DEBUG - Request: [10.0.1.110:49392] PUT /video/:/transcode/session/r20sw4ii7jf/progress?index=4&id=0&codec=vorbis&type=audio (7 live)
Aug 06, 2016 17:36:45.205 [0x7fdd787ff700] VERBOSE -  * index => 4
Aug 06, 2016 17:36:45.205 [0x7fdd787ff700] VERBOSE -  * id => 0
Aug 06, 2016 17:36:45.205 [0x7fdd787ff700] VERBOSE -  * codec => vorbis
Aug 06, 2016 17:36:45.205 [0x7fdd787ff700] VERBOSE -  * type => audio
Aug 06, 2016 17:36:45.205 [0x7fdd787ff700] DEBUG - Auth: We found auth token (xxxxxxxxxxxxxxxxxxxx), enabling token-based authentication.
Aug 06, 2016 17:36:45.206 [0x7fdd787ff700] DEBUG - Auth: Came in with the master token, authorization succeeded.
Aug 06, 2016 17:36:45.206 [0x7fddaa7ff700] DEBUG - Completed: [10.0.1.110:49392] 206 PUT /video/:/transcode/session/r20sw4ii7jf/progress?index=4&id=0&codec=vorbis&type=audio (7 live) 0ms 190 bytes
Aug 06, 2016 17:36:45.222 [0x7fdd76bff700] ERROR - Failed to start session successfully.
Aug 06, 2016 17:36:45.222 [0x7fdda6fff700] VERBOSE - JobManager: child process with PID 30156
Aug 06, 2016 17:36:45.222 [0x7fdd76bff700] DEBUG - Streaming Resource: Terminating session 0x7fdd7dcb5a80:83cyhlvoyle with reason Video conversion failed. The transcoder crashed or failed to start up.

@wnielson
Copy link
Owner

wnielson commented Aug 7, 2016

It seems like the transcoder is bombing out on the slave. Try running these commands on the slave:

sudo su plex
mkdir /home/tyrone/tmp/plex-transcode-vpi6uq55a3n-4afbb772-4f1e-49b3-81b3-d0ce505f19f3
export ADDRFAM=inet;export PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR=/var/lib/plexmediaserver/Library/Application Support;export IFACE=p2p1;export XDG_DATA_HOME=/usr/lib/plexmediaserver/Resources/;export PLEX_MEDIA_SERVER_USER=plex;export UPSTART_EVENTS=filesystem net-device-up;export PLEX_MEDIA_SERVER_HOME=/usr/lib/plexmediaserver;export HOME=/var/lib/plexmediaserver;export PATH=/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/sbin:/sbin:/bin;export LD_LIBRARY_PATH=/usr/lib/plexmediaserver;export TERM=linux;export UPSTART_INSTANCE=;export PLEX_MEDIA_SERVER_MAX_STACK_SIZE=3000;export METHOD=manual;export XDG_CACHE_HOME=/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Cache/;export X_PLEX_TOKEN=pxpuk9HAKAsRgq6dheVr;export UPSTART_JOB=plexmediaserver;export FFMPEG_EXTERNAL_LIBS=/var/lib/plexmediaserver/Library/Application\ Support/Plex\ Media\ Server/Codecs/ecd8c57-1099-linux-ubuntu-x86_64/;export PLEX_MEDIA_SERVER_TMPDIR=/tmp;export TMPDIR=/tmp;export OLDPWD=/;export LOGICAL=p2p1;export PWD=/usr/lib/plexmediaserver;export PLEX_MEDIA_SERVER_MAX_PLUGIN_PROCS=6;export PRT_ID=e5fd04ba5c0011e6abe1d43d7edf724c
cd /home/tyrone/tmp/plex-transcode-vpi6uq55a3n-4afbb772-4f1e-49b3-81b3-d0ce505f19f3
prt_local -codec:0 h264 -codec:1 dca -noaccurate_seek -i '/home/tyrone/data/Media/Movies/Matrix Reloaded, The (2003)1080p/The Matrix Reloaded.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 5.1 -b:1 768k -segment_format mpegts -f segment -flags -global_header -segment_time 10 -segment_start_number 0 -segment_copyts 1 -segment_time_delta 0.0625 -max_delay 5000000 -avoid_negative_ts disabled -map_metadata -1 -map_chapters -1 media-%05d.ts -start_at_zero -copyts -vsync cfr -y -nostats -loglevel quiet -loglevel_plex error -progressurl http://10.0.1.99:32400/video/:/transcode/session/vpi6uq55a3n/progress
rm -rf /home/tyrone/tmp/plex-transcode-vpi6uq55a3n-4afbb772-4f1e-49b3-81b3-d0ce505f19f3

@tyronemills
Copy link
Author

tyronemills commented Aug 7, 2016

tyrone@transcoder:~$ sudo su plex
[sudo] password for tyrone:

plex@transcoder:/home/tyrone$ mkdir /home/tyrone/tmp/plex-transcode-vpi6uq55a3n-4afbb772-4f1e-49b3-81b3-d0ce505f19f3

plex@transcoder:/home/tyrone$ export ADDRFAM=inet;export PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR=/var/lib/plexmediaserver/Library/Application Support;export IFACE=p2p1;export XDG_DATA_HOME=/usr/lib/plexmediaserver/Resources/;export PLEX_MEDIA_SERVER_USER=plex;export UPSTART_EVENTS=filesystem net-device-up;export PLEX_MEDIA_SERVER_HOME=/usr/lib/plexmediaserver;export HOME=/var/lib/plexmediaserver;export PATH=/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/sbin:/sbin:/bin;export LD_LIBRARY_PATH=/usr/lib/plexmediaserver;export TERM=linux;export UPSTART_INSTANCE=;export PLEX_MEDIA_SERVER_MAX_STACK_SIZE=3000;export METHOD=manual;export XDG_CACHE_HOME=/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Cache/;export X_PLEX_TOKEN=pxpuk9HAKAsRgq6dheVr;export UPSTART_JOB=plexmediaserver;export FFMPEG_EXTERNAL_LIBS=/var/lib/plexmediaserver/Library/Application\ Support/Plex\ Media\ Server/Codecs/ecd8c57-1099-linux-ubuntu-x86_64/;export PLEX_MEDIA_SERVER_TMPDIR=/tmp;export TMPDIR=/tmp;export OLDPWD=/;export LOGICAL=p2p1;export PWD=/usr/lib/plexmediaserver;export PLEX_MEDIA_SERVER_MAX_PLUGIN_PROCS=6;export PRT_ID=e5fd04ba5c0011e6abe1d43d7edf724c

bash: export: `net-device-up': not a valid identifier
bash: export: `Support/Plex': not a valid identifier
bash: export: `Server/Cache/': not a valid identifier

** Quoting the XDG_CACHE_HOME path and removing net-device-up from UPSTART_EVENTS made no difference to the outcome **

plex@transcoder:/usr/lib/plexmediaserver$ cd /home/tyrone/tmp/plex-transcode-vpi6uq55a3n-4afbb772-4f1e-49b3-81b3-d0ce505f19f3

plex@transcoder:/home/tyrone/tmp/plex-transcode-vpi6uq55a3n-4afbb772-4f1e-49b3-81b3-d0ce505f19f3$ prt_local -codec:0 h264 -codec:1 dca -noaccurate_seek -i '/home/tyrone/data/Media/Movies/Matrix Reloaded, The (2003)1080p/The Matrix Reloaded.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 5.1 -b:1 768k -segment_format mpegts -f segment -flags -global_header -segment_time 10 -segment_start_number 0 -segment_copyts 1 -segment_time_delta 0.0625 -max_delay 5000000 -avoid_negative_ts disabled -map_metadata -1 -map_chapters -1 media-%05d.ts -start_at_zero -copyts -vsync cfr -y -nostats -loglevel quiet -loglevel_plex error -progressurl http://10.0.1.99:32400/video/:/transcode/session/vpi6uq55a3n/progress

plex@transcoder:/home/tyrone/tmp/plex-transcode-vpi6uq55a3n-4afbb772-4f1e-49b3-81b3-d0ce505f19f3$ ls
prt.log

plex@transcoder:/home/tyrone/tmp/plex-transcode-vpi6uq55a3n-4afbb772-4f1e-49b3-81b3-d0ce505f19f3$ cat prt.log
2016-08-07 12:15:24,027 - prt - INFO - Launching transcode_local: ['/usr/lib/plexmediaserver/Resources/plex_transcoder', '-codec:0', 'h264', '-codec:1', 'dca', '-noaccurate_seek', '-i', '/home/tyrone/data/Media/Movies/Matrix Reloaded, The (2003)1080p/The Matrix Reloaded.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', '5.1', '-b:1', '768k', '-segment_format', 'mpegts', '-f', 'segment', '-flags', '-global_header', '-segment_time', '10', '-segment_start_number', '0', '-segment_copyts', '1', '-segment_time_delta', '0.0625', '-max_delay', '5000000', '-avoid_negative_ts', 'disabled', '-map_metadata', '-1', '-map_chapters', '-1', 'media-%05d.ts', '-start_at_zero', '-copyts', '-vsync', 'cfr', '-y', '-nostats', '-loglevel', 'quiet', '-loglevel_plex', 'error', '-progressurl', 'http://10.0.1.99:32400/video/:/transcode/session/vpi6uq55a3n/progressexport', 'ADDRFAM=inet']

@wnielson
Copy link
Owner

wnielson commented Aug 7, 2016

Try again with verbose logging enabled:

prt_local -codec:0 h264 -codec:1 dca -noaccurate_seek -i '/home/tyrone/data/Media/Movies/Matrix Reloaded, The (2003)1080p/The Matrix Reloaded.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 5.1 -b:1 768k -segment_format mpegts -f segment -flags -global_header -segment_time 10 -segment_start_number 0 -segment_copyts 1 -segment_time_delta 0.0625 -max_delay 5000000 -avoid_negative_ts disabled -map_metadata -1 -map_chapters -1 media-%05d.ts -start_at_zero -copyts -vsync cfr -y -nostats -loglevel verbose -loglevel_plex verbose -progressurl http://10.0.1.99:32400/video/:/transcode/session/vpi6uq55a3n/progress

@tyronemills
Copy link
Author

plex@transcoder:/home/tyrone/tmp/plex-transcode-vpi6uq55a3n-4afbb772-4f1e-49b3-81b3-d0ce505f19f3$ prt_local -codec:0 h264 -codec:1 dca -noaccurate_seek -i '/home/tyrone/data/Media/Movies/Matrix Reloaded, The (2003)1080p/The Matrix Reloaded.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 5.1 -b:1 768k -segment_format mpegts -f segment -flags -global_header -segment_time 10 -segment_start_number 0 -segment_copyts 1 -segment_time_delta 0.0625 -max_delay 5000000 -avoid_negative_ts disabled -map_metadata -1 -map_chapters -1 media-%05d.ts -start_at_zero -copyts -vsync cfr -y -nostats -loglevel verbose -loglevel_plex verbose -progressurl http://10.0.1.99:32400/video/:/transcode/session/vpi6uq55a3n/progress
Rescanning for external libs: '/var/lib/plexmediaserver/Library/Application\ Support/Plex\ Media\ Server/Codecs/ecd8c57-1099-linux-ubuntu-x86_64/'
ffmpeg version git-2016-07-12-ecd8c57 Copyright (c) 2000-2016 the FFmpeg developers
built with gcc 4.8.2 (GCC)
configuration: --libdir=/data/jenkins/pms-deps-universal-v2/BUILD_TAG/linux-ubuntu-x86_64/output/pms-depends-linux-ubuntu-x86_64-release-c0dbc55/lib --prefix=/data/jenkins/pms-deps-universal-v2/BUILD_TAG/linux-ubuntu-x86_64/output/pms-depends-linux-ubuntu-x86_64-release-c0dbc55 --disable-bzlib --disable-ffplay --disable-ffserver --disable-ffprobe --disable-avdevice --disable-schannel --disable-vda --disable-debug --disable-doc --disable-shared --pkg-config-flags=--static --arch=x86_64 --enable-muxers --enable-gpl --enable-version3 --enable-gnutls --disable-encoders --disable-decoders --disable-hwaccels --enable-libass --enable-librtmp --disable-devices --disable-lzma --disable-iconv --disable-protocol=concat --enable-libzvbi --enable-libvorbis --enable-libopus --external-decoder=h264 --enable-decoder=png --enable-decoder=apng --enable-decoder=bmp --enable-decoder=mjpeg --enable-decoder=thp --enable-decoder=gif --enable-decoder=dirac --enable-decoder=ffv1 --enable-decoder=ffvhuff --enable-decoder=huffyuv --enable-decoder=rawvideo --enable-decoder=zero12v --enable-decoder=ayuv --enable-decoder=r210 --enable-decoder=v210 --enable-decoder=v210x --enable-decoder=v308 --enable-decoder=v408 --enable-decoder=v410 --enable-decoder=y41p --enable-decoder=yuv4 --enable-decoder=ansi --enable-decoder=alac --enable-decoder=flac --enable-decoder=vorbis --enable-decoder=opus --enable-decoder=pcm_f32be --enable-decoder=pcm_f32le --enable-decoder=pcm_f64be --enable-decoder=pcm_f64le --enable-decoder=pcm_lxf --enable-decoder=pcm_s16be --enable-decoder=pcm_s16be_planar --enable-decoder=pcm_s16le --enable-decoder=pcm_s16le_planar --enable-decoder=pcm_s24be --enable-decoder=pcm_s24le --enable-decoder=pcm_s24le_planar --enable-decoder=pcm_s32be --enable-decoder=pcm_s32le --enable-decoder=pcm_s32le_planar --enable-decoder=pcm_s8 --enable-decoder=pcm_s8_planar --enable-decoder=pcm_u16be --enable-decoder=pcm_u16le --enable-decoder=pcm_u24be --enable-decoder=pcm_u24le --enable-decoder=pcm_u32be --enable-decoder=pcm_u32le --enable-decoder=pcm_u8 --enable-decoder=pcm_alaw --enable-decoder=pcm_mulaw --enable-decoder=ass --enable-decoder=dvbsub --enable-decoder=dvdsub --enable-decoder=ccaption --enable-decoder=pgssub --enable-decoder=jacosub --enable-decoder=microdvd --enable-decoder=movtext --enable-decoder=mpl2 --enable-decoder=pjs --enable-decoder=realtext --enable-decoder=sami --enable-decoder=ssa --enable-decoder=stl --enable-decoder=subrip --enable-decoder=subviewer --enable-decoder=text --enable-decoder=vplayer --enable-decoder=webvtt --enable-decoder=xsub --enable-decoder=libzvbi_teletext --enable-encoder=flac --enable-encoder=alac --enable-encoder=libvorbis --enable-encoder=libopus --enable-encoder=mjpeg --enable-encoder=wrapped_avframe --enable-encoder=ass --enable-encoder=dvbsub --enable-encoder=dvdsub --enable-encoder=movtext --enable-encoder=ssa --enable-encoder=subrip --enable-encoder=text --enable-encoder=webvtt --enable-encoder=xsub --enable-encoder=pcm_f32be --enable-encoder=pcm_f32le --enable-encoder=pcm_f64be --enable-encoder=pcm_f64le --enable-encoder=pcm_s8 --enable-encoder=pcm_s8_planar --enable-encoder=pcm_s16be --enable-encoder=pcm_s16be_planar --enable-encoder=pcm_s16le --enable-encoder=pcm_s16le_planar --enable-encoder=pcm_s24be --enable-encoder=pcm_s24le --enable-encoder=pcm_s24le_planar --enable-encoder=pcm_s32be --enable-encoder=pcm_s32le --enable-encoder=pcm_s32le_planar --enable-encoder=pcm_u8 --enable-encoder=pcm_u16be --enable-encoder=pcm_u16le --enable-encoder=pcm_u24be --enable-encoder=pcm_u24le --enable-encoder=pcm_u32be --enable-encoder=pcm_u32le --cc='ccache gcc' --extra-ldflags=-L/data/jenkins/pms-deps-universal-v2/BUILD_TAG/linux-ubuntu-x86_64/output/pms-depends-linux-ubuntu-x86_64-release-c0dbc55/lib --extra-libs='-lgcrypt -lgpg-error -ldl'
libavutil 55. 24.100 / 55. 24.100
libavcodec 57. 41.102 / 57. 41.102
libavformat 57. 37.100 / 57. 37.100
libavfilter 6. 45.100 / 6. 45.100
libswscale 4. 1.100 / 4. 1.100
libswresample 2. 0.101 / 2. 0.101
libpostproc 54. 0.100 / 54. 0.100
Rescanning for external libs: '/var/lib/plexmediaserver/Library/Application\ Support/Plex\ Media\ Server/Codecs/ecd8c57-1099-linux-ubuntu-x86_64/'
Last message repeated 220 times
[tcp @ 0x179fd80] Connection to tcp://127.0.0.1:32400 failed: Connection refused
Rescanning for external libs: '/var/lib/plexmediaserver/Library/Application\ Support/Plex\ Media\ Server/Codecs/ecd8c57-1099-linux-ubuntu-x86_64/'
[tcp @ 0x17a0060] Connection to tcp://127.0.0.1:32400 failed: Connection refused
Unknown decoder 'h264'
[tcp @ 0x179e180] Connection to tcp://127.0.0.1:32400 failed: Connection refused

@tyronemills
Copy link
Author

Rescanning for external libs: '/var/lib/plexmediaserver/Library/Application\ Support/Plex\ Media\ Server/Codecs/ecd8c57-1099-linux-ubuntu-x86_64/'

This directory is available on the Master, but the Slave can't access it, /var/lib/plexmediaserver/Library/Application\ Support/ is accessible, but /Plex\ Media\ Server is a broken symlink.

I added a new export to fix that and now get:

plex@transcoder:/home/tyrone/tmp/plex-transcode-vpi6uq55a3n-4afbb772-4f1e-49b3-81b3-d0ce505f19f3$ prt_local -codec:0 h264 -codec:1 dca -noaccurate_seek -i '/home/tyrone/data/Media/Movies/Matrix Reloaded, The (2003)1080p/The Matrix Reloaded.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 5.1 -b:1 768k -segment_format mpegts -f segment -flags -global_header -segment_time 10 -segment_start_number 0 -segment_copyts 1 -segment_time_delta 0.0625 -max_delay 5000000 -avoid_negative_ts disabled -map_metadata -1 -map_chapters -1 media-%05d.ts -start_at_zero -copyts -vsync cfr -y -nostats -loglevel verbose -loglevel_plex verbose -progressurl http://10.0.1.99:32400/video/:/transcode/session/vpi6uq55a3n/progress
/usr/lib/plexmediaserver/Resources/plex_transcoder: error while loading shared libraries: libiconv.so.2: cannot open shared object file: No such file or directory

@tyronemills
Copy link
Author

I just stood up a second slave and am getting the same results on it. :(

@wnielson
Copy link
Owner

wnielson commented Aug 8, 2016

This error

libiconv.so.2: cannot open shared object file: No such file or directory

means that the transcoder can't find a shared library. You need to make sure to set the LD_LIBRARY_PATH variable:

sudo su plex
export LD_LIBRARY_PATH=/usr/lib/plexmediaserver
export ADDRFAM=inet
export PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR='/var/lib/plexmediaserver/Library/Application Support'
export IFACE=p2p1
export XDG_DATA_HOME=/usr/lib/plexmediaserver/Resources/
export PLEX_MEDIA_SERVER_USER=plex
export UPSTART_EVENTS=filesystem net-device-up
export PLEX_MEDIA_SERVER_HOME=/usr/lib/plexmediaserver
export HOME=/var/lib/plexmediaserver
export PATH=/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/sbin:/sbin:/bin
export PLEX_MEDIA_SERVER_MAX_STACK_SIZE=3000
export METHOD=manual
export XDG_CACHE_HOME='/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Cache/'
export X_PLEX_TOKEN=pxpuk9HAKAsRgq6dheVr
export UPSTART_JOB=plexmediaserver
export FFMPEG_EXTERNAL_LIBS=/var/lib/plexmediaserver/Library/Application\ Support/Plex\ Media\ Server/Codecs/ecd8c57-1099-linux-ubuntu-x86_64/
export PLEX_MEDIA_SERVER_TMPDIR=/tmp
export TMPDIR=/tmp
export OLDPWD=/
export LOGICAL=p2p1
export PWD=/usr/lib/plexmediaserver
export PLEX_MEDIA_SERVER_MAX_PLUGIN_PROCS=6
export PRT_ID=e5fd04ba5c0011e6abe1d43d7edf724c

prt_local -codec:0 h264 -codec:1 dca -noaccurate_seek -i '/home/tyrone/data/Media/Movies/Matrix Reloaded, The (2003)1080p/The Matrix Reloaded.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 5.1 -b:1 768k -segment_format mpegts -f segment -flags -global_header -segment_time 10 -segment_start_number 0 -segment_copyts 1 -segment_time_delta 0.0625 -max_delay 5000000 -avoid_negative_ts disabled -map_metadata -1 -map_chapters -1 media-%05d.ts -start_at_zero -copyts -vsync cfr -y -nostats -loglevel verbose -loglevel_plex verbose -progressurl http://10.0.1.99:32400/video/:/transcode/session/vpi6uq55a3n/progress

@tyronemills
Copy link
Author

Strange... libiconv.so.2 is in /usr/lib/plexmediaserver and running those export commands didn't change the outcome.

plex@transcoder02:/usr/lib/plexmediaserver$ ls
libavcodec.so.57 libexpat.so.1 libgnsdk_rhythm.so.3.07.7 libsoci_sqlite3.so.3.0.0
libavformat.so.57 libexslt.so.0 libgnsdk_storage_sqlite.so.3.07.7 libsqlite3.so.0
libavutil.so.55 libfreeimage.so libgnsdk_submit.so.3.07.7 libssl.so.1.0.0
libboost_atomic.so.1.59.0 libgnsdk_correlates.so.3.07.7 libgnsdk_tocgen.so.3.07.7 libswscale.so.4
libboost_chrono.so.1.59.0 libgnsdk_dsp.so.3.07.7 libgnsdk_video.so.3.07.7 libtag.so.1
libboost_date_time.so.1.59.0 libgnsdk_fp.so.3.07.7 libiconv.so.2 libxml2.so.2
libboost_filesystem.so.1.59.0 libgnsdk_link.so.3.07.7 libjemalloc.so.1 libxslt.so.1
libboost_iostreams.so.1.59.0 libgnsdk_lookup_local.so.3.07.7 liblrc.so.0 libzen.so.0
libboost_locale.so.1.59.0 libgnsdk_lookup_localstream.so.3.07.7 libmediainfo.so.0 libz.so.1
libboost_program_options.so.1.59.0 libgnsdk_manager.so.3.07.7 libminiupnpc.so.10 MigratePlexServerConfig.sh
libboost_regex.so.1.59.0 libgnsdk_moodgrid.so.3.07.7 libminizip.so.1 plex-archive-keyring.gpg
libboost_system.so.1.59.0 libgnsdk_musicid_file.so.3.07.7 libnatpmp.so.1 Plex DLNA Server
libboost_thread.so.1.59.0 libgnsdk_musicid_match.so.3.07.7 libopencv_core.so.2.4 Plex Media Scanner
libboost_timer.so.1.59.0 libgnsdk_musicid.so.3.07.7 libopencv_imgproc.so.2.4 Plex Media Server
libcrypto.so.1.0.0 libgnsdk_musicid_stream.so.3.07.7 libpython2.7.so.1.0 Plex Media Server Tests
libcurl.so.4 libgnsdk_playlist.so.3.07.7 libsoci_core.so.3.0.0 Resources

@wnielson
Copy link
Owner

wnielson commented Aug 8, 2016

Here what I get without setting LD_LIBRARY_PATH:

plex@prt-2:$ ldd /usr/lib/plexmediaserver/Resources/plex_transcoder
    linux-vdso.so.1 =>  (0x00007ffd91bf5000)
    libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f9ae2215000)
    libiconv.so.2 => not found
    libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f9ae1e50000)
    libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f9ae1b4a000)
    libexpat.so.1 => /lib/x86_64-linux-gnu/libexpat.so.1 (0x00007f9ae1920000)
    librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f9ae1718000)
    libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f9ae1514000)
    libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f9ae12f6000)
    /lib64/ld-linux-x86-64.so.2 (0x00007f9ae242e000)

And here it is with:

plex@prt-2:$ export LD_LIBRARY_PATH=/usr/lib/plexmediaserver
plex@prt-2:$ ldd /usr/lib/plexmediaserver/Resources/plex_transcoder
    linux-vdso.so.1 =>  (0x00007ffdb5aaf000)
    libz.so.1 => /usr/lib/plexmediaserver/libz.so.1 (0x00007fd8914c0000)
    libiconv.so.2 => /usr/lib/plexmediaserver/libiconv.so.2 (0x00007fd8911d4000)
    libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fd890e0f000)
    libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fd890b09000)
    libexpat.so.1 => /usr/lib/plexmediaserver/libexpat.so.1 (0x00007fd8908d6000)
    librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007fd8906ce000)
    libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fd8904ca000)
    libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fd8902ac000)
    /lib64/ld-linux-x86-64.so.2 (0x00007fd8916db000)
    libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007fd890096000)

@tyronemills
Copy link
Author

tyronemills commented Aug 8, 2016

I get the same thing here...

plex@transcoder02:/usr/lib/plexmediaserver$ ldd /usr/lib/plexmediaserver/Resources/plex_transcoder
    linux-vdso.so.1 =>  (0x00007ffce206e000)
    libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007fb7f4a5f000)
    libiconv.so.2 => not found
    libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fb7f4699000)
    libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fb7f4393000)
    libexpat.so.1 => /lib/x86_64-linux-gnu/libexpat.so.1 (0x00007fb7f4169000)
    librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007fb7f3f60000)
    libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fb7f3d5c000)
    libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fb7f3b3e000)
    /lib64/ld-linux-x86-64.so.2 (0x000055c7daeae000)
plex@transcoder02:/usr/lib/plexmediaserver$ export LD_LIBRARY_PATH=/usr/lib/plexmediaserver
plex@transcoder02:/usr/lib/plexmediaserver$ ldd /usr/lib/plexmediaserver/Resources/plex_transcoder
    linux-vdso.so.1 =>  (0x00007ffd0c398000)
    libz.so.1 => /usr/lib/plexmediaserver/libz.so.1 (0x00007fa23a94f000)
    libiconv.so.2 => /usr/lib/plexmediaserver/libiconv.so.2 (0x00007fa23a663000)
    libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fa23a298000)
    libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fa239f92000)
    libexpat.so.1 => /usr/lib/plexmediaserver/libexpat.so.1 (0x00007fa239d5f000)
    librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007fa239b56000)
    libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fa239952000)
    libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fa239734000)
    /lib64/ld-linux-x86-64.so.2 (0x000055e5029fb000)
    libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007fa23951d000)

@wnielson
Copy link
Owner

wnielson commented Aug 8, 2016

Great, so now try running prt_local:

prt_local -codec:0 h264 -codec:1 dca -noaccurate_seek -i '/home/tyrone/data/Media/Movies/Matrix Reloaded, The (2003)1080p/The Matrix Reloaded.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 5.1 -b:1 768k -segment_format mpegts -f segment -flags -global_header -segment_time 10 -segment_start_number 0 -segment_copyts 1 -segment_time_delta 0.0625 -max_delay 5000000 -avoid_negative_ts disabled -map_metadata -1 -map_chapters -1 media-%05d.ts -start_at_zero -copyts -vsync cfr -y -nostats -loglevel verbose -loglevel_plex verbose -progressurl http://10.0.1.99:32400/video/:/transcode/session/vpi6uq55a3n/progress

@tyronemills
Copy link
Author

tyronemills commented Aug 8, 2016

plex@transcoder02:/usr/lib/plexmediaserver$ prt_local -codec:0 h264 -codec:1 dca -noaccurate_seek -i '/home/tyrone/data/Media/Movies/Matrix Reloaded, The (2003)1080p/The Matrix Reloaded.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 5.1 -b:1 768k -segment_format mpegts -f segment -flags -global_header -segment_time 10 -segment_start_number 0 -segment_copyts 1 -segment_time_delta 0.0625 -max_delay 5000000 -avoid_negative_ts disabled -map_metadata -1 -map_chapters -1 media-%05d.ts -start_at_zero -copyts -vsync cfr -y -nostats -loglevel verbose -loglevel_plex verbose -progressurl http://10.0.1.99:32400/video/:/transcode/session/vpi6uq55a3n/progress
ffmpeg version git-2016-07-12-ecd8c57 Copyright (c) 2000-2016 the FFmpeg developers
built with gcc 4.8.2 (GCC)
configuration: --libdir=/data/jenkins/pms-deps-universal-v2/BUILD_TAG/linux-ubuntu-x86_64/output/pms-depends-linux-ubuntu-x86_64-release-c0dbc55/lib --prefix=/data/jenkins/pms-deps-universal-v2/BUILD_TAG/linux-ubuntu-x86_64/output/pms-depends-linux-ubuntu-x86_64-release-c0dbc55 --disable-bzlib --disable-ffplay --disable-ffserver --disable-ffprobe --disable-avdevice --disable-schannel --disable-vda --disable-debug --disable-doc --disable-shared --pkg-config-flags=--static --arch=x86_64 --enable-muxers --enable-gpl --enable-version3 --enable-gnutls --disable-encoders --disable-decoders --disable-hwaccels --enable-libass --enable-librtmp --disable-devices --disable-lzma --disable-iconv --disable-protocol=concat --enable-libzvbi --enable-libvorbis --enable-libopus --external-decoder=h264 --enable-decoder=png --enable-decoder=apng --enable-decoder=bmp --enable-decoder=mjpeg --enable-decoder=thp --enable-decoder=gif --enable-decoder=dirac --enable-decoder=ffv1 --enable-decoder=ffvhuff --enable-decoder=huffyuv --enable-decoder=rawvideo --enable-decoder=zero12v --enable-decoder=ayuv --enable-decoder=r210 --enable-decoder=v210 --enable-decoder=v210x --enable-decoder=v308 --enable-decoder=v408 --enable-decoder=v410 --enable-decoder=y41p --enable-decoder=yuv4 --enable-decoder=ansi --enable-decoder=alac --enable-decoder=flac --enable-decoder=vorbis --enable-decoder=opus --enable-decoder=pcm_f32be --enable-decoder=pcm_f32le --enable-decoder=pcm_f64be --enable-decoder=pcm_f64le --enable-decoder=pcm_lxf --enable-decoder=pcm_s16be --enable-decoder=pcm_s16be_planar --enable-decoder=pcm_s16le --enable-decoder=pcm_s16le_planar --enable-decoder=pcm_s24be --enable-decoder=pcm_s24le --enable-decoder=pcm_s24le_planar --enable-decoder=pcm_s32be --enable-decoder=pcm_s32le --enable-decoder=pcm_s32le_planar --enable-decoder=pcm_s8 --enable-decoder=pcm_s8_planar --enable-decoder=pcm_u16be --enable-decoder=pcm_u16le --enable-decoder=pcm_u24be --enable-decoder=pcm_u24le --enable-decoder=pcm_u32be --enable-decoder=pcm_u32le --enable-decoder=pcm_u8 --enable-decoder=pcm_alaw --enable-decoder=pcm_mulaw --enable-decoder=ass --enable-decoder=dvbsub --enable-decoder=dvdsub --enable-decoder=ccaption --enable-decoder=pgssub --enable-decoder=jacosub --enable-decoder=microdvd --enable-decoder=movtext --enable-decoder=mpl2 --enable-decoder=pjs --enable-decoder=realtext --enable-decoder=sami --enable-decoder=ssa --enable-decoder=stl --enable-decoder=subrip --enable-decoder=subviewer --enable-decoder=text --enable-decoder=vplayer --enable-decoder=webvtt --enable-decoder=xsub --enable-decoder=libzvbi_teletext --enable-encoder=flac --enable-encoder=alac --enable-encoder=libvorbis --enable-encoder=libopus --enable-encoder=mjpeg --enable-encoder=wrapped_avframe --enable-encoder=ass --enable-encoder=dvbsub --enable-encoder=dvdsub --enable-encoder=movtext --enable-encoder=ssa --enable-encoder=subrip --enable-encoder=text --enable-encoder=webvtt --enable-encoder=xsub --enable-encoder=pcm_f32be --enable-encoder=pcm_f32le --enable-encoder=pcm_f64be --enable-encoder=pcm_f64le --enable-encoder=pcm_s8 --enable-encoder=pcm_s8_planar --enable-encoder=pcm_s16be --enable-encoder=pcm_s16be_planar --enable-encoder=pcm_s16le --enable-encoder=pcm_s16le_planar --enable-encoder=pcm_s24be --enable-encoder=pcm_s24le --enable-encoder=pcm_s24le_planar --enable-encoder=pcm_s32be --enable-encoder=pcm_s32le --enable-encoder=pcm_s32le_planar --enable-encoder=pcm_u8 --enable-encoder=pcm_u16be --enable-encoder=pcm_u16le --enable-encoder=pcm_u24be --enable-encoder=pcm_u24le --enable-encoder=pcm_u32be --enable-encoder=pcm_u32le --cc='ccache gcc' --extra-ldflags=-L/data/jenkins/pms-deps-universal-v2/BUILD_TAG/linux-ubuntu-x86_64/output/pms-depends-linux-ubuntu-x86_64-release-c0dbc55/lib --extra-libs='-lgcrypt -lgpg-error -ldl'
libavutil 55. 24.100 / 55. 24.100
libavcodec 57. 41.102 / 57. 41.102
libavformat 57. 37.100 / 57. 37.100
libavfilter 6. 45.100 / 6. 45.100
libswscale 4. 1.100 / 4. 1.100
libswresample 2. 0.101 / 2. 0.101
libpostproc 54. 0.100 / 54. 0.100
Unknown decoder 'h264'
[tcp @ 0x32a7b60] Connection to tcp://127.0.0.1:32400 failed: Connection refused

@wnielson
Copy link
Owner

wnielson commented Aug 8, 2016

Try setting the ffmpeg environmental variable:

export FFMPEG_EXTERNAL_LIBS=/var/lib/plexmediaserver/Library/Application\ Support/Plex\ Media\ Server/Codecs/ecd8c57-1099-linux-ubuntu-x86_64/

@tyronemills
Copy link
Author

tyronemills commented Aug 8, 2016

That changed this a little bit...

plex@transcoder:/home/tyrone$ export LD_LIBRARY_PATH=/usr/lib/plexmediaserver
plex@transcoder:/home/tyrone$ export FFMPEG_EXTERNAL_LIBS=/var/lib/plexmediaserver/Library/Application\ Support/Plex\ Media\ Server/Codecs/ecd8c57-1099-linux-ubuntu-x86_64/
plex@transcoder:/home/tyrone$ prt_local -codec:0 h264 -codec:1 dca -noaccurate_seek -i '/home/tyrone/data/Media/Movies/Matrix Reloaded, The (2003)1080p/The Matrix Reloaded.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 5.1 -b:1 768k -segment_format mpegts -f segment -flags -global_header -segment_time 10 -segment_start_number 0 -segment_copyts 1 -segment_time_delta 0.0625 -max_delay 5000000 -avoid_negative_ts disabled -map_metadata -1 -map_chapters -1 media-%05d.ts -start_at_zero -copyts -vsync cfr -y -nostats -loglevel verbose -loglevel_plex verbose -progressurl http://10.0.1.99:32400/video/:/transcode/session/vpi6uq55a3n/progress
Rescanning for external libs: '/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Codecs/ecd8c57-1099-linux-ubuntu-x86_64/'
ffmpeg version git-2016-07-12-ecd8c57 Copyright (c) 2000-2016 the FFmpeg developers
  built with gcc 4.8.2 (GCC)
  configuration: --libdir=/data/jenkins/pms-deps-universal-v2/BUILD_TAG/linux-ubuntu-x86_64/output/pms-depends-linux-ubuntu-x86_64-release-c0dbc55/lib --prefix=/data/jenkins/pms-deps-universal-v2/BUILD_TAG/linux-ubuntu-x86_64/output/pms-depends-linux-ubuntu-x86_64-release-c0dbc55 --disable-bzlib --disable-ffplay --disable-ffserver --disable-ffprobe --disable-avdevice --disable-schannel --disable-vda --disable-debug --disable-doc --disable-shared --pkg-config-flags=--static --arch=x86_64 --enable-muxers --enable-gpl --enable-version3 --enable-gnutls --disable-encoders --disable-decoders --disable-hwaccels --enable-libass --enable-librtmp --disable-devices --disable-lzma --disable-iconv --disable-protocol=concat --enable-libzvbi --enable-libvorbis --enable-libopus --external-decoder=h264 --enable-decoder=png --enable-decoder=apng --enable-decoder=bmp --enable-decoder=mjpeg --enable-decoder=thp --enable-decoder=gif --enable-decoder=dirac --enable-decoder=ffv1 --enable-decoder=ffvhuff --enable-decoder=huffyuv --enable-decoder=rawvideo --enable-decoder=zero12v --enable-decoder=ayuv --enable-decoder=r210 --enable-decoder=v210 --enable-decoder=v210x --enable-decoder=v308 --enable-decoder=v408 --enable-decoder=v410 --enable-decoder=y41p --enable-decoder=yuv4 --enable-decoder=ansi --enable-decoder=alac --enable-decoder=flac --enable-decoder=vorbis --enable-decoder=opus --enable-decoder=pcm_f32be --enable-decoder=pcm_f32le --enable-decoder=pcm_f64be --enable-decoder=pcm_f64le --enable-decoder=pcm_lxf --enable-decoder=pcm_s16be --enable-decoder=pcm_s16be_planar --enable-decoder=pcm_s16le --enable-decoder=pcm_s16le_planar --enable-decoder=pcm_s24be --enable-decoder=pcm_s24le --enable-decoder=pcm_s24le_planar --enable-decoder=pcm_s32be --enable-decoder=pcm_s32le --enable-decoder=pcm_s32le_planar --enable-decoder=pcm_s8 --enable-decoder=pcm_s8_planar --enable-decoder=pcm_u16be --enable-decoder=pcm_u16le --enable-decoder=pcm_u24be --enable-decoder=pcm_u24le --enable-decoder=pcm_u32be --enable-decoder=pcm_u32le --enable-decoder=pcm_u8 --enable-decoder=pcm_alaw --enable-decoder=pcm_mulaw --enable-decoder=ass --enable-decoder=dvbsub --enable-decoder=dvdsub --enable-decoder=ccaption --enable-decoder=pgssub --enable-decoder=jacosub --enable-decoder=microdvd --enable-decoder=movtext --enable-decoder=mpl2 --enable-decoder=pjs --enable-decoder=realtext --enable-decoder=sami --enable-decoder=ssa --enable-decoder=stl --enable-decoder=subrip --enable-decoder=subviewer --enable-decoder=text --enable-decoder=vplayer --enable-decoder=webvtt --enable-decoder=xsub --enable-decoder=libzvbi_teletext --enable-encoder=flac --enable-encoder=alac --enable-encoder=libvorbis --enable-encoder=libopus --enable-encoder=mjpeg --enable-encoder=wrapped_avframe --enable-encoder=ass --enable-encoder=dvbsub --enable-encoder=dvdsub --enable-encoder=movtext --enable-encoder=ssa --enable-encoder=subrip --enable-encoder=text --enable-encoder=webvtt --enable-encoder=xsub --enable-encoder=pcm_f32be --enable-encoder=pcm_f32le --enable-encoder=pcm_f64be --enable-encoder=pcm_f64le --enable-encoder=pcm_s8 --enable-encoder=pcm_s8_planar --enable-encoder=pcm_s16be --enable-encoder=pcm_s16be_planar --enable-encoder=pcm_s16le --enable-encoder=pcm_s16le_planar --enable-encoder=pcm_s24be --enable-encoder=pcm_s24le --enable-encoder=pcm_s24le_planar --enable-encoder=pcm_s32be --enable-encoder=pcm_s32le --enable-encoder=pcm_s32le_planar --enable-encoder=pcm_u8 --enable-encoder=pcm_u16be --enable-encoder=pcm_u16le --enable-encoder=pcm_u24be --enable-encoder=pcm_u24le --enable-encoder=pcm_u32be --enable-encoder=pcm_u32le --cc='ccache gcc' --extra-ldflags=-L/data/jenkins/pms-deps-universal-v2/BUILD_TAG/linux-ubuntu-x86_64/output/pms-depends-linux-ubuntu-x86_64-release-c0dbc55/lib --extra-libs='-lgcrypt -lgpg-error -ldl'
  libavutil      55. 24.100 / 55. 24.100
  libavcodec     57. 41.102 / 57. 41.102
  libavformat    57. 37.100 / 57. 37.100
  libavfilter     6. 45.100 /  6. 45.100
  libswscale      4.  1.100 /  4.  1.100
  libswresample   2.  0.101 /  2.  0.101
  libpostproc    54.  0.100 / 54.  0.100
Rescanning for external libs: '/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Codecs/ecd8c57-1099-linux-ubuntu-x86_64/'
    Last message repeated 220 times
[tcp @ 0x2ba3ca0] Connection to tcp://127.0.0.1:32400 failed: Connection refused
Rescanning for external libs: '/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Codecs/ecd8c57-1099-linux-ubuntu-x86_64/'
[tcp @ 0x2ba3e00] Connection to tcp://127.0.0.1:32400 failed: Connection refused
Unknown decoder 'h264'
[tcp @ 0x2ba2380] Connection to tcp://127.0.0.1:32400 failed: Connection refused
plex@transcoder:/home/tyrone$

@wnielson
Copy link
Owner

wnielson commented Aug 8, 2016

Plex is doesn't seem to be able to recognized the h264 encoder. See this thread for a possible fix?

@tyronemills
Copy link
Author

tyronemills commented Aug 9, 2016

I added exec to the fstab entry for /var/lib... and it didn't help. But it does tend to make sense that this is a server issue, as both slaves are having the same problem. But whatever it is, it's not impacting the main Plex server, just the slaves...

Contents and permissions of the 2 directories under /var/lib/plexmediaserver/Library/Application\ Support/Plex\ Media\ Server/Codecs/

/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Codecs/ecd8c57-1099-linux-ubuntu-x86_64

364 -rw-r--r-- 1 plex plex 370472 Jul 18 18:52 libaac_decoder.so
292 -rw-r--r-- 1 plex plex 297488 Jul 17 14:09 libaac_encoder.so
236 -rw-r--r-- 1 plex plex 238872 Jul 17 14:09 libac3_decoder.so
456 -rw-r--r-- 1 plex plex 465240 Jul 17 15:43 libdca_decoder.so
1280 -rw-r--r-- 1 plex plex 1310040 Jul 17 14:09 libh264_decoder.so
992 -rw-r--r-- 1 plex plex 1013560 Jul 18 02:06 libhevc_decoder.so
388 -rw-r--r-- 1 plex plex 396080 Jul 18 18:32 liblibmp3lame_encoder.so
1184 -rw-r--r-- 1 plex plex 1208760 Jul 17 14:09 liblibx264_encoder.so
260 -rw-r--r-- 1 plex plex 263480 Jul 31 15:06 libmp2_decoder.so
260 -rw-r--r-- 1 plex plex 263480 Jul 17 14:09 libmp3_decoder.so
416 -rw-r--r-- 1 plex plex 423576 Aug 3 06:53 libmpeg1video_decoder.so
412 -rw-r--r-- 1 plex plex 418936 Jul 31 15:06 libmpeg2video_decoder.so
604 -rw-r--r-- 1 plex plex 618104 Jul 17 14:09 libmpeg4_decoder.so
128 -rw-r--r-- 1 plex plex 127448 Jul 17 20:25 libtruehd_decoder.so
828 -rw-r--r-- 1 plex plex 844744 Jul 18 02:06 libvc1_decoder.so

/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Codecs/2c361e4-1071-linux-ubuntu-x86_64

364 -rw-r--r-- 1 plex plex 370440 Jul 4 21:40 libaac_decoder.so
292 -rw-r--r-- 1 plex plex 297488 Jun 28 15:25 libaac_encoder.so
236 -rw-r--r-- 1 plex plex 238872 Jun 28 21:01 libac3_decoder.so
456 -rw-r--r-- 1 plex plex 465208 Jun 28 16:02 libdca_decoder.so
1280 -rw-r--r-- 1 plex plex 1309976 Jun 28 14:49 libh264_decoder.so
992 -rw-r--r-- 1 plex plex 1013528 Jun 29 02:24 libhevc_decoder.so
388 -rw-r--r-- 1 plex plex 396080 Jul 7 09:59 liblibmp3lame_encoder.so
1184 -rw-r--r-- 1 plex plex 1208728 Jun 28 14:49 liblibx264_encoder.so
260 -rw-r--r-- 1 plex plex 263480 Jun 28 15:25 libmp2_decoder.so
260 -rw-r--r-- 1 plex plex 263480 Jun 28 15:46 libmp3_decoder.so
604 -rw-r--r-- 1 plex plex 618008 Jun 28 15:46 libmpeg4_decoder.so
552 -rw-r--r-- 1 plex plex 565032 Jun 29 02:03 libmsmpeg4v3_decoder.so
128 -rw-r--r-- 1 plex plex 127448 Jul 10 08:04 libtruehd_decoder.so
828 -rw-r--r-- 1 plex plex 844616 Jun 30 02:34 libvc1_decoder.so
232 -rw-r--r-- 1 plex plex 234328 Jul 4 04:13 libwmapro_decoder.so

@oaxlin
Copy link

oaxlin commented Jul 22, 2017

I'm just posting here to say I had this same problem on my recent slave installation.

Unknown decoder 'h264'

My Library/Application Support/Plex Media Server/Codecs/XXXXX sub-directory was empty
I had to MANUALLY copy the libh264_decoder.so file from the master to get the decode to function.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants