DVR-Postprocessing-Script on Synology

Hi,

I copied a postprocessing scipt form the plex forum for transcode dvr-movies but only what I get is error 1.

#!/bin/bash
dvrPostLog=’/volume1/homes/plex/dvrProcessing.log’
echo “=================================” | tee -a dvrPostLog [ # -ge 1 -a -f “$1” ]
echo “date '+%Y-%m-%d'” | tee -a $dvrPostLog
echo "date '+%H:%M:%S' file ‘$1’ is opened" | tee -a $dvrPostLog
ffmpeg -i “1" -acodec copy -vcodec libx264 -preset superfast "{1%.ts}.mp4”
echo "date '+%H:%M:%S' conversion done. new file saved" | tee -a $dvrPostLog

and the log DVR:Recorder: Postprocessing script ‘/volume1/homes/plex/DVRPost.sh’ exited with error code 1.

the user plex is the owner and the script is executable an runs with admin-users.

What’s wrong?

thanks phiku

Following along, the last time I asked this question someone removed the synology tag despite this being a topic that needs to be specific due to restrictions of the platform

Did you install the ffmpeg package from the package manager?

Yes I already installed the ffmpeg package and the script is working if it’s trigged manually by an admin-account.

If it’s triggerd by plex after DVR-Recording, there is no log written as it is wirtten in the frist line of the script.