# DVR-Postprocessing-Script on Synology

**URL:** <https://forums.plex.tv/t/dvr-postprocessing-script-on-synology/439114>\
**Category:** General Discussions\
**Tags:** livetv-dvr, server-synology\
**Created:** [July 29, 2019, 8:44am UTC](https://forums.plex.tv/t/dvr-postprocessing-script-on-synology/439114 "2019-07-29T08:44:01Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![phiku](https://avatars.discourse-cdn.com/v4/letter/p/9d8465/32.png) [@phiku](https://forums.plex.tv/u/phiku)\
**Post date:** [July 29, 2019, 8:44am UTC](https://forums.plex.tv/t/dvr-postprocessing-script-on-synology/439114/1 "2019-07-29T08:44:01Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![iced98lx](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/iced98lx/32/82788_2.png) [@iced98lx](https://forums.plex.tv/u/iced98lx)\
**Post date:** [July 29, 2019, 4:29pm UTC](https://forums.plex.tv/t/dvr-postprocessing-script-on-synology/439114/2 "2019-07-29T16:29:15Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![phiku](https://avatars.discourse-cdn.com/v4/letter/p/9d8465/32.png) [@phiku](https://forums.plex.tv/u/phiku)\
**Post date:** [July 30, 2019, 9:20am UTC](https://forums.plex.tv/t/dvr-postprocessing-script-on-synology/439114/3 "2019-07-30T09:20:48Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/plex/original/3X/2/a/2acb9765406f63293d357b4ec509ec39aa28f2ad.png) [@system](https://forums.plex.tv/u/system)\
**Post date:** [October 28, 2019, 9:24am UTC](https://forums.plex.tv/t/dvr-postprocessing-script-on-synology/439114/4 "2019-10-28T09:24:34Z")

</div>

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