Transcoder fails when `/transcode` is on a network share

I believe changes in plex media server 1.5.4 released today should overcome the issue

See https://forums.plex.tv/discussion/comment/1416628/#Comment_1416628

I just installed 1.5.4.3596 and can verify that this does not fix the issue for Docker users (at least not for me.) I can play the video with version 1.4.4.3495 though so I am reverting back for now.

Log entry;
Apr 11, 2017 12:28:34.006 [0x7fefb23f4700] INFO - CodecManager: obtaining EAE
Apr 11, 2017 12:28:37.015 [0x7fefb23f4700] ERROR - Unzip: could not set executable bit on output file
Apr 11, 2017 12:28:37.017 [0x7fefb23f4700] ERROR - CodecManager: failed to extract zip
Apr 11, 2017 12:28:37.017 [0x7fefb23f4700] ERROR - Error configuring transcoder: Decoder install failed: eac3_eae

@chaosrose said:
I just installed 1.5.4.3596 and can verify that this does not fix the issue for Docker users (at least not for me.) I can play the video with version 1.4.4.3495 though so I am reverting back for now.

Log entry;
Apr 11, 2017 12:28:34.006 [0x7fefb23f4700] INFO - CodecManager: obtaining EAE
Apr 11, 2017 12:28:37.015 [0x7fefb23f4700] ERROR - Unzip: could not set executable bit on output file
Apr 11, 2017 12:28:37.017 [0x7fefb23f4700] ERROR - CodecManager: failed to extract zip
Apr 11, 2017 12:28:37.017 [0x7fefb23f4700] ERROR - Error configuring transcoder: Decoder install failed: eac3_eae
@sa2000

Updating my docker container to 1.5.4.3596 worked for me on my FreeNAS server.

@chaosrose said:
I just installed 1.5.4.3596 and can verify that this does not fix the issue for Docker users (at least not for me.) I can play the video with version 1.4.4.3495 though so I am reverting back for now.

Log entry;
Apr 11, 2017 12:28:34.006 [0x7fefb23f4700] INFO - CodecManager: obtaining EAE
Apr 11, 2017 12:28:37.015 [0x7fefb23f4700] ERROR - Unzip: could not set executable bit on output file
Apr 11, 2017 12:28:37.017 [0x7fefb23f4700] ERROR - CodecManager: failed to extract zip
Apr 11, 2017 12:28:37.017 [0x7fefb23f4700] ERROR - Error configuring transcoder: Decoder install failed: eac3_eae

That is different issue and does not relate to the transcoder temporary directory. Could you raise separate forum topic for it please with logs and environment setup details.

1.5.4 appears to solve my transcoding problem when running in an LX SmartOS zone.

Still getting this error after updating to 1.5.4.3596

Apr 11, 2017 11:51:36.001 [0x2ac2c5800700] ERROR - [Transcoder] [ac3_eae @ 0x141ea80] EAE timeout! EAE not running, or wrong folder? Could not read ‘/tmp/pms-806b3c00-2dfa-478b-94cd-7edbba853ac9/EasyAudioEncoder/Convert to WAV (to 8ch or less)/xn9l1l9sks9qsu8x6phjdzpv_1723-1-6.wav’
Apr 11, 2017 11:51:36.003 [0x2ac2be43d700] ERROR - [Transcoder] [ac3_eae @ 0x141ea80] error reading output
Apr 11, 2017 11:51:36.004 [0x2ac2be63e700] ERROR - [Transcoder] Error while decoding stream #0:1: Input/output error

Just an FYI it appears the Plex team’s fix for this issue is breaking the audio conversion off to its own temp directory in /tmp, not the most ideal fix as there is no way to configure this. The new way also completely ignores the temporary directory settings in the Plex Server settings.

@rlobbins said:
Just an FYI it appears the Plex team’s fix for this issue is breaking the audio conversion off to its own temp directory in /tmp, not the most ideal fix as there is no way to configure this. The new way also completely ignores the temporary directory settings in the Plex Server settings.

Yes - this is what is used now. The /tmp system directory for the audio transcodes

@dreww2021 said:
Still getting this error after updating to 1.5.4.3596

Apr 11, 2017 11:51:36.001 [0x2ac2c5800700] ERROR - [Transcoder] [ac3_eae @ 0x141ea80] EAE timeout! EAE not running, or wrong folder? Could not read ‘/tmp/pms-806b3c00-2dfa-478b-94cd-7edbba853ac9/EasyAudioEncoder/Convert to WAV (to 8ch or less)/xn9l1l9sks9qsu8x6phjdzpv_1723-1-6.wav’
Apr 11, 2017 11:51:36.003 [0x2ac2be43d700] ERROR - [Transcoder] [ac3_eae @ 0x141ea80] error reading output
Apr 11, 2017 11:51:36.004 [0x2ac2be63e700] ERROR - [Transcoder] Error while decoding stream #0:1: Input/output error

What are the permissions for the /tmp ?
Did this directory get created ?
/tmp/pms-806b3c00-2dfa-478b-94cd-7edbba853ac9

@dreww2021 said:
Still getting this error after updating to 1.5.4.3596

Apr 11, 2017 11:51:36.001 [0x2ac2c5800700] ERROR - [Transcoder] [ac3_eae @ 0x141ea80] EAE timeout! EAE not running, or wrong folder? Could not read ‘/tmp/pms-806b3c00-2dfa-478b-94cd-7edbba853ac9/EasyAudioEncoder/Convert to WAV (to 8ch or less)/xn9l1l9sks9qsu8x6phjdzpv_1723-1-6.wav’
Apr 11, 2017 11:51:36.003 [0x2ac2be43d700] ERROR - [Transcoder] [ac3_eae @ 0x141ea80] error reading output
Apr 11, 2017 11:51:36.004 [0x2ac2be63e700] ERROR - [Transcoder] Error while decoding stream #0:1: Input/output error

What are the permissions for the /tmp ?
Did this directory get created ?
/tmp/pms-806b3c00-2dfa-478b-94cd-7edbba853ac9

root@ALPHA:/mnt/user/appdata/PlexMediaServer# stat tmp
File: ‘tmp’
Size: 152 Blocks: 0 IO Block: 131072 directory
Device: 20h/32d Inode: 29459 Links: 1
Access: (0777/drwxrwxrwx) Uid: ( 99/ nobody) Gid: ( 100/ users)
Access: 2017-02-06 08:34:11.000000000 -0600
Modify: 2017-04-11 13:43:16.495527088 -0500
Change: 2017-04-11 13:43:16.495527088 -0500
Birth: -

I’m not getting anything in /tmp/ when it’s attempting to transcode audio.

Coming in late to this discussion…I see a few interwoven things here and ask for clarification.

Is this best sumarized as a file i/o time-out when attempting to read from the /tmp directory within a docker container?

If so, where is the docker container with respect to the host (on a network) and has /tmp (within the Docker container) been moved to a location outside the container?

If any of the above questions are true, please expound as where they resolve to.

If I’m still missing the file i/o issue, please help me understand.

Additionally: May I have a full set of log files? Settings - Server - Help - Download Logs? (attach the ZIP file here with a post)

@dreww2021 said:

@dreww2021 said:
Still getting this error after updating to 1.5.4.3596

Apr 11, 2017 11:51:36.001 [0x2ac2c5800700] ERROR - [Transcoder] [ac3_eae @ 0x141ea80] EAE timeout! EAE not running, or wrong folder? Could not read ‘/tmp/pms-806b3c00-2dfa-478b-94cd-7edbba853ac9/EasyAudioEncoder/Convert to WAV (to 8ch or less)/xn9l1l9sks9qsu8x6phjdzpv_1723-1-6.wav’
Apr 11, 2017 11:51:36.003 [0x2ac2be43d700] ERROR - [Transcoder] [ac3_eae @ 0x141ea80] error reading output
Apr 11, 2017 11:51:36.004 [0x2ac2be63e700] ERROR - [Transcoder] Error while decoding stream #0:1: Input/output error

What are the permissions for the /tmp ?
Did this directory get created ?
/tmp/pms-806b3c00-2dfa-478b-94cd-7edbba853ac9

root@ALPHA:/mnt/user/appdata/PlexMediaServer# stat tmp
File: ‘tmp’
Size: 152 Blocks: 0 IO Block: 131072 directory
Device: 20h/32d Inode: 29459 Links: 1
Access: (0777/drwxrwxrwx) Uid: ( 99/ nobody) Gid: ( 100/ users)
Access: 2017-02-06 08:34:11.000000000 -0600
Modify: 2017-04-11 13:43:16.495527088 -0500
Change: 2017-04-11 13:43:16.495527088 -0500
Birth: -

I’m not getting anything in /tmp/ when it’s attempting to transcode audio.

I set everything in /Codecs/ to 777 and that seems to have resolved my issue for now.

I’m running PMS on Windows 7 and since the 1.5.4 update today, I’m not having trouble with True HD audio transcodes from NAS content that started today. I can direct play them from PMP on my Plex Server but not on any client that requires audio transcode.

@kopfpilot said:
It doesn’t work for me with 1.5.4 on a synology nas either.

I removed the specific setting for the transcoder folder. As a result the data is written in /tmp/pms-585a8427-0bc7-4062-acc7-eb70e4a06604/EasyAudioEncoder with 755 permission mask with files inside the “Convert to” folders with a 644 permission mask. The /tmp folder is located in the general aufs overlay of the container. Up to 1.5.3 it was located in a subfolders of Library if no specific transcoder folder was specified.

mounts inside the container:
... none on / type aufs (rw,relatime,si=8afe44667b095b1c,dio,dirperm1) /dev/vg1001/lv on /transcode type ext4 (rw,relatime,journal_checksum,synoacl,data=writeback,jqfmt=vfsv0,usrjquota=aquota.user,grpjquota=aquota.group) ...

When the transcoder path is changed to /transcode and a volume is mapped to /transcode the result remains the same.

Appearently the docker inspect output is not enough:
{ ... { "Source": "/opt/docker/plex/transcode", "Destination": "/transcode", "Mode": "rw", "RW": true, "Propagation": "rprivate" }, ... }

Since synoacl is specific to synology, i am pretty sure that docker controlls the mount parameters, doesn’t it…

Sorry pasting the oringal response of sa2000 didn’t worked well, so i did split the quote into two blocks.

@sa2000 said:
If you are problems with the transcoder use of /tmp for the temporary transcoder cache directory then please post in this forum thread instead
http://forums.plex.tv/discussion/265492/transcoder-fails-when-transcode-is-on-a-network-share

If you are getting this error in the log ERROR - Unzip: could not set executable bit on output file then this is the right forum thread for your issue.

Could you check the Plex Media Server.log and if it is the latter, please attach your log here together with the details of the mount command / or mount entry in /etc/fstab

I posted this originaly in https://forums.plex.tv/discussion/267052/transcoder-fails-with-docker-version-1-5-3.
As there is no ERROR - Unzip: could not set executable bit on output file in logs, i moved the post over here.

The details of the mount command are provided in the first code block and a log snippet is attached. The /tmp folder uses the first set of mount parameters, while the /transcoder folder uses the second set of parameters.

The file I tried to transcode with 1.5.4 can be transcoded with 1.4.4.3495-edef59192 without an issue.

@WRXFanatic said:
I’m running PMS on Windows 7 and since the 1.5.4 update today, I’m not having trouble with True HD audio transcodes from NAS content that started today. I can direct play them from PMP on my Plex Server but not on any client that requires audio transcode.

Please raise any issues you still have with transcoding on the windows Plex Media Server forum providing server logs and indication of time of the problem and what device and what plex client app
Forum http://forums.plex.tv/categories/windows

@kopfpilot said:

@kopfpilot said:
It doesn’t work for me with 1.5.4 on a synology nas either.

I removed the specific setting for the transcoder folder. As a result the data is written in /tmp/pms-585a8427-0bc7-4062-acc7-eb70e4a06604/EasyAudioEncoder with 755 permission mask with files inside the “Convert to” folders with a 644 permission mask. The /tmp folder is located in the general aufs overlay of the container. Up to 1.5.3 it was located in a subfolders of Library if no specific transcoder folder was specified.

mounts inside the container:
... none on / type aufs (rw,relatime,si=8afe44667b095b1c,dio,dirperm1) /dev/vg1001/lv on /transcode type ext4 (rw,relatime,journal_checksum,synoacl,data=writeback,jqfmt=vfsv0,usrjquota=aquota.user,grpjquota=aquota.group) ...

Thanks for moving your post to this thread. It is only audio transcoding that now uses the /tmp directory. The setting for /transcode directory would still be needed for other transcodes

The issue that you are getting is that after the transcode job is started, e.g.

Apr 12, 2017 07:14:27.266 [0x7fa616fff700] DEBUG - Job running: EAE_ROOT='/tmp/pms-a1368227-aa45-4152-b137-d5da7616e961/EasyAudioEncoder' FFMPEG_EXTERNAL_LIBS='/config/Library/Application\ Support/Plex\ Media\ Server/Codecs/57aa73f-1206-linux-ubuntu-x86_64/' XDG_CACHE_HOME='/config/Library/Application Support/Plex Media Server/Cache/' XDG_DATA_HOME='/usr/lib/plexmediaserver/Resources/' X_PLEX_TOKEN='{X_PLEX_TOKEN}' '/usr/lib/plexmediaserver/Plex Transcoder' '-codec:0' 'h264' '-codec:1' 'eac3_eae' '-eae_prefix:1' 'caee72199bcdf59e-com-plexapp-android_' '-i' '/mnt/tv/en/Billions/Billions.S02E05.Currency/Billions.S02E05.Currency.mkv' '-filter_complex' '[0:0]scale=w=min(720\,iw):h=min(406\,ih):force_original_aspect_ratio=decrease,format=pix_fmts=yuv420p|nv12[0]' '-map' '[0]' '-metadata:s:0' 'language=eng' '-codec:0' 'libx264' '-crf:0' '22' '-maxrate:0' '1290k' '-bufsize:0' '2580k' '-r:0' '23.975999999999999' '-preset:0' 'veryfast' '-level:0' '2.1' '-x264opts:0' 'subme=2:me_range=4:rc_lookahead=20:me=hex' '-force_key_frames:0' 'expr:gte(t,0+n_forced*8)' '-map' '0:1' '-metadata:s:1' 'language=eng' '-codec:1' 'aac' '-rematrix_maxval' '8.000000dB' '-ar:1' '48000' '-channel_layout:1' 'stereo' '-b:1' '128k' '-segment_format' 'mpegts' '-f' 'ssegment' '-individual_header_trailer' '0' '-segment_time' '8' '-segment_start_number' '0' '-segment_copyts' '1' '-segment_time_delta' '0.0625' '-segment_list' 'http://127.0.0.1:32400/video/:/transcode/session/caee72199bcdf59e-com-plexapp-android/seglist' '-segment_list_type' 'csv' '-segment_list_size' '2147483647' '-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/caee72199bcdf59e-com-plexapp-android/progress'

Errors are logged accessing the /tmp directories

Apr 12, 2017 07:14:30.000 [0x7fa5f9ffe700] ERROR - [Transcoder] [eac3_eae @ 0x14591a0] EAE timeout! EAE not running, or wrong folder? Could not read '/tmp/pms-a1368227-aa45-4152-b137-d5da7616e961/EasyAudioEncoder/Convert to WAV (to 8ch or less)/caee72199bcdf59e-com-plexapp-android_846-1-0.wav'
Apr 12, 2017 07:14:30.001 [0x7fa6067ff700] ERROR - [Transcoder] [eac3_eae @ 0x14591a0] error reading output
Apr 12, 2017 07:14:30.002 [0x7fa616fff700] ERROR - [Transcoder] Error while decoding stream #0:1: Input/output error

Are these directories being created under /tmp ?
Could you get directory listing showing directories/files/date/time/sizes/permissions

and also similar ls -ail of of this area
"/config/Library/Application Support/Plex Media Server/Codecs/"
You will need to complete the path

I attached the output of ‘ls -ailR’ output the post and added the matching log snippet.

There is an odditiy, though. In the tmp folder everything except the filename extention is correct. Plex expects *.wav, while the files in the tmp folder have the extension *.ec3.

@kopfpilot said:
I attached the output of ‘ls -ailR’ output the post and added the matching log snippet.

There is an odditiy, though. In the tmp folder everything except the filename extention is correct. Plex expects *.wav, while the files in the tmp folder have the extension *.ec3.

Thank you
So we are failing on looking for the wav file

Apr 12, 2017 13:48:40.000 [0x7f9658bff700] ERROR - [Transcoder] [eac3_eae @ 0x14591a0] EAE timeout! EAE not running, or wrong folder? Could not read '/tmp/pms-3c04b5e9-4c7d-45b6-b538-1c8fca9747f2/EasyAudioEncoder/Convert to WAV (to 8ch or less)/caee72199bcdf59e-com-plexapp-android_834-1-0.wav'
Apr 12, 2017 13:48:40.001 [0x7f9664fff700] ERROR - [Transcoder] [eac3_eae @ 0x14591a0] error reading output
Apr 12, 2017 13:48:40.002 [0x7f9658bff700] ERROR - [Transcoder] Error while decoding stream #0:1: Input/output error 

and the list directory shows the ec3 files only

./pms-3c04b5e9-4c7d-45b6-b538-1c8fca9747f2/EasyAudioEncoder/Convert to WAV (to 8ch or less):
total 112
1521 drwxr-xr-x 2 abc users  4096 Apr 12 13:48 .
1513 drwxr-xr-x 8 abc users  4096 Apr 12 13:48 ..
1545 -rw-r--r-- 1 abc users 51200 Apr 12 13:48 caee72199bcdf59e-com-plexapp-android_834-1-5.ec3
1541 -rw-r--r-- 1 abc users 51200 Apr 12 13:48 caee72199bcdf59e-com-plexapp-android_834-1-6.ec3

Is PMS running under user abc ? That is the user with write permissions

Can you see an EasyAudioEncoder process running?

There is no EasyAudioEncode process running, just “/usr/lib/plexmediaserver/Plex Transcoder”.
See attached output of `ps -auxf´ (best to be viewed with an editor which respects unix line endings).

Further testing:
I executed /config/Library/Application Support/Plex Media Server/Codecs/EasyAudioEncoder-133-linux-ubuntu-x86_64/EasyAudioEncoder/EasyAudioEncoder from shell and got following output:
“Dolby, Dolby Digital, Dolby Digital Plus, Dolby TrueHD and the double D symbol are trademarks of Dolby Laboratories.”

docker log ${containerId} prints out a couple of those lines as well. So appearently it is at least called…

If i start EasyAudioEncode as a background process from shell, i can see it in top. Though, If top is running in the shell and transcoding playback is started from a client, it does not appear in the process list.

Thanks @kopfpilot - need to get you a linux person

@sa2000: thank you :slight_smile:

Btw. the transcoding itself seem to happen in the background: the cpu load rises and the temporary EasyAudioEncode file keeps beeing replaced iterativly with a growing index number (caee72199bcdf59e-com-plexapp-android_834-1-n.ec3, where n is the index number), until playback is stopped.