Jump to content

Help with Recording Post Processing Script


roaku
Go to solution Solved by TMCsw,

Recommended Posts

I have a script for converting ts to mkv and would like Emby to run it after all recordings.

The script is doing exactly as I want when I run it as the emby user in a terminal.

But when Emby tries to run it after a recording, it fails with a 127 exit code.

 

Here are my settings:

post-process-settings.png.f0210ef77c06d87650fbbba58f03f428.png

Excerpt from the log:

Quote
...
2022-09-10 14:57:06.787 Info LiveTV: Running recording post processor /bin/bash /volume1/emby_scripts/to-mkv.sh "/volumeUSB1/usbshare/DVR/The Dark Crystal (1982)/The Dark Crystal (1982).ts"
...
2022-09-10 14:57:07.458 Info LiveTV: Recording post-processing script completed with exit code 127
...

 

Copying the command from the log and running it as the emby user works fine over ssh:

sudo -u emby bash
/bin/bash /volume1/emby_scripts/to-mkv.sh "/volumeUSB1/usbshare/DVR/The Dark Crystal (1982)/The Dark Crystal (1982).ts"

 

Anything obviously wrong with the settings or something else? Thanks.
 

 

Link to comment
Share on other sites

  • Solution

Post processing  application should be:

/volume1/emby_scripts/to-mkv.sh

Post processor command line arguments should be:

"{path}"

also the very first line in your .sh should be:

#!/bin/bash

if that doesn't work try adding

unset LD_LIBRARY_PATH

to your script before any ffmpeg commands (only needed once)

 

  • Like 1
Link to comment
Share on other sites

9 hours ago, TMCsw said:

unset LD_LIBRARY_PATH

to your script before any ffmpeg commands (only needed once)

Correct. But only for running a system-installed ffmpeg.

In cases where you want to use the emby-included ffmpeg you must not unset LD_LIBRARY_PATH.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...