Problem with DVR Postprocessing Script

I have a postprocessing script that utilitizes Don Melton’s trancode-video script. It works just fine on files when i sudo to the plex user. However when it tries to run via the DVR process it seems like HandBrakeCLI which is what it ultimately utilizes is having a problem. The post processing script can be found here and the transcode-video scripts are here.

Do you have any error output from the failure?

@nokdim Sorry should have posted that…

Sep 22 10:25:19 organ-media1 sh[18626]: PATH
Sep 22 10:25:19 organ-media1 sh[18626]: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
Sep 22 10:25:19 organ-media1 sh[18626]: Starting
Sep 22 10:25:20 organ-media1 sh[18626]: /usr/local/bin/transcode-video: HandBrakeCLI failed during execution
Sep 22 10:25:20 organ-media1 sh[18626]: ERROR # 255 : Failed to convert file /video/TV/.grab/581f90acd46a4918aeb69bd6541a2b516766c9b7/Family Feud (2010) - S19E19 - Episode 19.ts

Its not a permissions issue as the tmp folder used/created for the recording is owned by plex.

I would suggest you look at this post.

You have things that don’t make sense to me like

line 4 PGMNAME=HandBrakeCLI I think can be commented out?!?!
line 20 the PATH echo just spits out the word PATH for no reason…
line 23 $NOW that you call has no ref to a real time you would have to declare it first like NOW=$(date)

Ill keep going through this and see as those are not the cause of the failure but things I noticed.

Turned out to be an issue with shared libraries… Not sure why or why it worked when running through the command line. But reinstall handbrake froma different source and things are working now.