Created
October 28, 2017 12:59
-
-
Save JasperE84/aed136efb34058607208bc0a98e89163 to your computer and use it in GitHub Desktop.
TVHeadend postprocessor script for comskip
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# This is a postprocessor script to run comskip on a recording and optionally keep a logfile | |
# TVHeadend config: Configuration -> Recording -> Select profile -> Add the following in setting "Post-processor command": /home/USER/PATH/comskip-pp.sh "%f" | |
# Get comskip for linux from: https://github.com/erikkaashoek/Comskip | |
# | |
# Comskip and script paths | |
COMSKIPPATH="/home/hts/comskip/Comskip/comskip" | |
COMSKIPINI="/home/hts/comskip/comskip.ini" | |
# Keep logs | |
POSTSCRIPTLOGGING=false | |
POSTSCRIPTLOGPATH="/home/hts/comskip/logs" | |
# Input parameter | |
INPUTVIDEO="$1" # Full path to recording, i.e. /home/hts/recordings/News.ts | |
if [ "$POSTSCRIPTLOGGING" = true ] ; then | |
POSTLOGFILE="${POSTSCRIPTLOGPATH}/tvheadendpp$$.log" | |
else | |
POSTLOGFILE="/dev/null" | |
fi | |
echo "***** STARTED: `/bin/date`" > $POSTLOGFILE | |
echo "***** USER: `/usr/bin/whoami`" >> $POSTLOGFILE | |
echo "***** INPUT: $INPUTVIDEO" >> $POSTLOGFILE | |
$COMSKIPPATH --ini="$COMSKIPINI" "$INPUTVIDEO" 2>&1 </dev/null >> $POSTLOGFILE | |
echo "***** FINISHED: `/bin/date`" >> $POSTLOGFILE |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment