PlexPostProc Script Error # 1 : Failed to convert using ffmepg

Server Version#: 1.13.8.5395
Player Version#: 1.13.8.5395

NOTE: the script works perfectly when running it manually.

Oct 06 12:16:31 macbookpro sh[3340]: ********************************************************
Oct 06 12:16:31 macbookpro sh[3340]: Starting Transcoding: Converting to H.264 w/ffmpeg @720p
Oct 06 12:16:31 macbookpro sh[3340]: ********************************************************
Oct 06 12:16:35 macbookpro sh[3340]: ffmpeg: /usr/lib/plexmediaserver/libz.so.1: version `ZLIB_1.2.9’ not found (required by /usr/lib/x86_64-linux-gnu/libpng16.so.16)
Oct 06 12:16:35 macbookpro sh[3340]: ERROR # 1 : Failed to convert using ffmepg

1 Like
export LD_LIBRARY_PATH=/usr/lib/plexmediaserver

prior to execution.

Thanks… but it is not working

plexmediaserver.service - Plex Media Server for Linux
Loaded: loaded (/lib/systemd/system/plexmediaserver.service; enabled; vendor preset: enabled)
Active: active (running) since Sat 2018-10-06 10:48:43 EDT; 9h ago
Main PID: 3340 (sh)
Tasks: 53 (limit: 4915)
CGroup: /system.slice/plexmediaserver.service
├─3340 /bin/sh -c LD_LIBRARY_PATH=/usr/lib/plexmediaserver “/usr/lib/plexmediaserver/Plex Media Server”
├─3342 /usr/lib/plexmediaserver/Plex Media Server
├─3399 Plex Plug-in [com.plexapp.system] /usr/lib/plexmediaserver/Resources/Plug-ins-10d48da0d/Framework.bundle/Contents/Resources/Versions/2/Python/bootstrap.py --server-version 1.13.8.5395-10d48da0d
└─3464 /usr/lib/plexmediaserver/Plex Tuner Service /usr/lib/plexmediaserver/Resources/Tuner/Private /usr/lib/plexmediaserver/Resources/Tuner/Shared 1.13.8.5395-10d48da0d 32600 /waitmutex

Oct 06 18:42:58 macbookpro sh[3340]: Auto selecting the PID.
Oct 06 18:42:58 macbookpro sh[3340]: Commercials were found.
Oct 06 18:43:24 macbookpro sh[3340]: ********************************************************
Oct 06 18:43:24 macbookpro sh[3340]: Starting Transcoding: Converting to H.264 w/ffmpeg @720p
Oct 06 18:43:24 macbookpro sh[3340]: ********************************************************
Oct 06 18:43:24 macbookpro sh[3340]: ffmpeg: /usr/lib/plexmediaserver/libz.so.1: version `ZLIB_1.2.9’ not found (required by /usr/lib/x86_64-linux-gnu/libpng16.so.16)
Oct 06 18:43:24 macbookpro sh[3340]: ERROR # 1 : Failed to convert using ffmepg
Oct 06 18:43:29 macbookpro sh[3340]: GUI: Matching ‘The Goldbergs’
Oct 06 18:43:37 macbookpro sh[3340]: GUI: Score for ‘The Goldbergs’ (2013) is 104
Oct 06 18:43:37 macbookpro sh[3340]: GUI: Requesting metadata for ‘The Goldbergs’

I do not see where you are setting LD_LIBRARY PATH prior to executing ffmpeg.

May I see the script?

#!/bin/bash

LD_LIBRARY_PATH=/usr/lib/plexmediaserver
export LD_LIBRARY_PATH

Also try line below

#export LD_LIBRARY_PATH=/usr/lib/plexmediaserver

Rest of the script created by nebhead, link below:

https://github.com/nebhead/PlexPostProc/tree/FFMPEG-Branch

Since you’re using his script, I can only refer you to his github for support.

Your use of ffmpeg is yours to resolve at this point since it’s clearly an LD_LIBRARY_PATH issue and/or you’ve got a 32 bit vs 64 bit issue (names look the same but still won’t resolve and load).

I was having the same problem as OP and I got it working for myself. The problem lies with this:
export LD_LIBRARY_PATH=/usr/lib/plexmediaserver

The version of zlib in Plex’s library is not compatible the ffmpeg that I have installed. (Maybe one is newer than the other – I don’t know because I’m not going to look into it now that it is working)

So here is my complete, working script:

#!/bin/bash
 
(
FILENAME=$1     # %FILE% - Filename of original file
TEMPFILENAME="$(mktemp)" # Temporary File for transcoding
LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu
export LD_LIBRARY_PATH
 
ffmpeg -y -i "$FILENAME" -f lavfi -i "movie=$FILENAME[out0+subcc]" -map 0 -map 1:s -c:a copy -c:s srt -c:v libx265 -crf 23 -preset faster -f matroska "$TEMPFILENAME"
 
rm -f "$FILENAME" && mv -f "$TEMPFILENAME" "${FILENAME%.ts}.mkv"
)
 
exit 0

Just a couple things I want to point out:

  1. I am loading my default library path for my system. This may be different for other people.
  2. I’m wrapping most of the code inside parentheses, which creates a subshell because that will prevent the library setting from interfering with Plex’s parent process.

I hope this helps.

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.