Build/synOTR.sh aktualisiert
This commit is contained in:
parent
40924e9aba
commit
e9a70c4ff3
|
@ -122,14 +122,17 @@
|
||||||
synOTR_PATH=$PATH:${APPDIR}/app/bin
|
synOTR_PATH=$PATH:${APPDIR}/app/bin
|
||||||
bsy="${APPDIR}/app/bin/busybox"
|
bsy="${APPDIR}/app/bin/busybox"
|
||||||
# ffmpeg="${APPDIR}/app/bin/ffmpeg"
|
# ffmpeg="${APPDIR}/app/bin/ffmpeg"
|
||||||
ffmpeg=`which ffmpeg` # mitgeliefertes ffmpeg läuft derzeit nicht korrekt
|
# ffmpeg=`which ffmpeg` # mitgeliefertes ffmpeg läuft derzeit nicht korrekt
|
||||||
|
ffmpeg="/usr/local/bin/ffmpeg6" # ffmpeg 6 von synocommunity
|
||||||
avcut="${APPDIR}/app/bin/avcut64"
|
avcut="${APPDIR}/app/bin/avcut64"
|
||||||
ionice="${APPDIR}/app/bin/ionice64"
|
ionice="${APPDIR}/app/bin/ionice64"
|
||||||
elif [ `echo $machinetyp | grep "armv7" ` ] ; then
|
elif [ `echo $machinetyp | grep "armv7" ` ] ; then
|
||||||
synOTR_LD_LIBRARY_PATH=${APPDIR}/app/libARMv7l:$LD_LIBRARY_PATH
|
synOTR_LD_LIBRARY_PATH=${APPDIR}/app/libARMv7l:$LD_LIBRARY_PATH
|
||||||
synOTR_PATH=$PATH:${APPDIR}/app/binARMv7l:/opt/bin
|
synOTR_PATH=$PATH:${APPDIR}/app/binARMv7l:/opt/bin
|
||||||
bsy="${APPDIR}/app/binARMv7l/busybox"
|
bsy="${APPDIR}/app/binARMv7l/busybox"
|
||||||
ffmpeg="${APPDIR}/app/binARMv7l/ffmpeg"
|
# ffmpeg="${APPDIR}/app/binARMv7l/ffmpeg"
|
||||||
|
# ffmpeg=`which ffmpeg` # mitgeliefertes ffmpeg läuft derzeit nicht korrekt
|
||||||
|
ffmpeg="/usr/local/bin/ffmpeg6" # ffmpeg 6 von synocommunity
|
||||||
avcut="${APPDIR}/app/binARMv7l/avcut"
|
avcut="${APPDIR}/app/binARMv7l/avcut"
|
||||||
if [[ `uname -a | grep "armadaxp" ` ]] ; then
|
if [[ `uname -a | grep "armadaxp" ` ]] ; then
|
||||||
echo " alternative avcut-Version ohne asm wird verwendet"
|
echo " alternative avcut-Version ohne asm wird verwendet"
|
||||||
|
@ -139,7 +142,8 @@
|
||||||
elif [ $machinetyp = "i686" ] ; then
|
elif [ $machinetyp = "i686" ] ; then
|
||||||
bsy="${APPDIR}/app/bin/busybox"
|
bsy="${APPDIR}/app/bin/busybox"
|
||||||
# ffmpeg="${APPDIR}/app/bin/ffmpeg"
|
# ffmpeg="${APPDIR}/app/bin/ffmpeg"
|
||||||
ffmpeg=`which ffmpeg` # mitgeliefertes ffmpeg läuft derzeit nicht korrekt
|
# ffmpeg=`which ffmpeg` # mitgeliefertes ffmpeg läuft derzeit nicht korrekt
|
||||||
|
ffmpeg="/usr/local/bin/ffmpeg6" # ffmpeg 6 von synocommunity
|
||||||
avcut="${APPDIR}/app/bin/avcut32"
|
avcut="${APPDIR}/app/bin/avcut32"
|
||||||
synOTR_LD_LIBRARY_PATH=$SAVED_LD_LIBRARY_PATH
|
synOTR_LD_LIBRARY_PATH=$SAVED_LD_LIBRARY_PATH
|
||||||
synOTR_PATH=$PATH:${APPDIR}/app/bin
|
synOTR_PATH=$PATH:${APPDIR}/app/bin
|
||||||
|
@ -329,7 +333,7 @@ sec_to_time()
|
||||||
MovieDB_query()
|
MovieDB_query()
|
||||||
{
|
{
|
||||||
#########################################################################################
|
#########################################################################################
|
||||||
# Diese Funktion sucht auf MovieDB.com nach Filminformationen #
|
# Diese Funktion sucht auf theTVDB.com nach Serieninformationen #
|
||||||
#########################################################################################
|
#########################################################################################
|
||||||
|
|
||||||
echo -e
|
echo -e
|
||||||
|
@ -1868,9 +1872,10 @@ if [ $OTRavi2mp4active = "on" ] && [ ! -z "$filetest" ] ; then
|
||||||
echo -n " "; date; echo -e
|
echo -n " "; date; echo -e
|
||||||
|
|
||||||
title=${title%.*}
|
title=${title%.*}
|
||||||
fileinfo=$($ffmpeg -i "$i" 2>&1)
|
# fileinfo=$($ffmpeg -i "$i" 2>&1)
|
||||||
ffprobeInfo=$(ffprobe -v quiet -print_format json -show_format -show_streams "$i" 2>&1)
|
# fileinfo=$($ffmpeg -i "$i" -f null - 2>&1)
|
||||||
|
|
||||||
|
ffprobeInfo=$(ffprobe -v quiet -print_format json -show_format -show_streams "$i" 2>&1)
|
||||||
# Errormeldung vor jason ab DSM 6.2 (wird hier abgeschnitten): ERROR:
|
# Errormeldung vor jason ab DSM 6.2 (wird hier abgeschnitten): ERROR:
|
||||||
# ld.so: object 'openhook.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored. { …
|
# ld.so: object 'openhook.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored. { …
|
||||||
ffprobeInfo="{ ${ffprobeInfo#*\{}"
|
ffprobeInfo="{ ${ffprobeInfo#*\{}"
|
||||||
|
@ -1899,7 +1904,8 @@ if [ $OTRavi2mp4active = "on" ] && [ ! -z "$filetest" ] ; then
|
||||||
echo "Audiocodec: $audiocodec"
|
echo "Audiocodec: $audiocodec"
|
||||||
|
|
||||||
# ------- VIDEOCODEC:
|
# ------- VIDEOCODEC:
|
||||||
videocodec=`echo "$fileinfo" | grep "Video:" | $bsy awk '{print $4}'`
|
videocodec=$(echo "${ffprobeInfo}" | jq -r '.streams[0].codec_tag_string' | tr '[:upper:]' '[:lower:]' ) # | sed "s/\"//g"
|
||||||
|
|
||||||
if [ $videocodec = "mpeg4" ] ; then
|
if [ $videocodec = "mpeg4" ] ; then
|
||||||
videocodec="divx"
|
videocodec="divx"
|
||||||
vExt="tmp.m4v";
|
vExt="tmp.m4v";
|
||||||
|
@ -2121,7 +2127,6 @@ for i in $(find "$WORKDIR" -maxdepth 1 -name "*TVOON*avi" -o -name "*TVOON*mp4"
|
||||||
echo "Fileextension: $fileextension"
|
echo "Fileextension: $fileextension"
|
||||||
|
|
||||||
# ------------------ technische Filmdaten via ffmpeg und ffprobe auslesen:
|
# ------------------ technische Filmdaten via ffmpeg und ffprobe auslesen:
|
||||||
fileinfo=$(ffmpeg -i "$i" 2>&1)
|
|
||||||
ffprobeInfo=$(ffprobe -v quiet -print_format json -show_format -show_streams "$i" 2>&1)
|
ffprobeInfo=$(ffprobe -v quiet -print_format json -show_format -show_streams "$i" 2>&1)
|
||||||
|
|
||||||
# Errormeldung vor jason ab DSM 6.2 (wird hier abgeschnitten): ERROR:
|
# Errormeldung vor jason ab DSM 6.2 (wird hier abgeschnitten): ERROR:
|
||||||
|
@ -2129,7 +2134,6 @@ for i in $(find "$WORKDIR" -maxdepth 1 -name "*TVOON*avi" -o -name "*TVOON*mp4"
|
||||||
ffprobeInfo="{ ${ffprobeInfo#*\{}"
|
ffprobeInfo="{ ${ffprobeInfo#*\{}"
|
||||||
|
|
||||||
if [ $LOGlevel = "2" ] ; then
|
if [ $LOGlevel = "2" ] ; then
|
||||||
echo "Dateiinformation von ffmpeg ausgelesen:"; echo "$fileinfo"; echo -e
|
|
||||||
echo "Dateiinformation von ffprobe ausgelesen:"; echo "$ffprobeInfo"; echo -e
|
echo "Dateiinformation von ffprobe ausgelesen:"; echo "$ffprobeInfo"; echo -e
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -2923,7 +2927,7 @@ for i in $(ls -tr "${logdir}" | egrep -o '^synOTR.*.log$') # A
|
||||||
done
|
done
|
||||||
|
|
||||||
# überzählige Logs löschen:
|
# überzählige Logs löschen:
|
||||||
count2del=$( expr $( ls -t "${logdir}" | egrep -o '^synOTR.*.log$' | wc -l ) - $LOGmax ) # wie viele Dateien sind überzählig
|
count2del=$(( $( ls -t "${logdir}" | egrep -o '^synOTR.*.log$' | wc -l ) - $LOGmax )) # wie viele Dateien sind überzählig
|
||||||
if [ $count2del -ge 0 ]; then
|
if [ $count2del -ge 0 ]; then
|
||||||
for i in `ls -tr "${logdir}" | egrep -o '^synOTR.*.log$' | head -n${count2del} `
|
for i in `ls -tr "${logdir}" | egrep -o '^synOTR.*.log$' | head -n${count2del} `
|
||||||
do
|
do
|
||||||
|
@ -2936,7 +2940,7 @@ if [ $count2del -ge 0 ]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# überzählige searches löschen:
|
# überzählige searches löschen:
|
||||||
count2del=$( expr $(ls -t "${logdir}" | egrep -o '^search.*.xml$' | wc -l) - $LOGmax )
|
count2del=$(($(ls -t "${logdir}" | egrep -o '^search.*.xml$' | wc -l) - $LOGmax ))
|
||||||
if [ ${count2del} -ge 0 ]; then
|
if [ ${count2del} -ge 0 ]; then
|
||||||
for i in `ls -tr "${logdir}" | egrep -o '^search.*.xml$' | head -n${count2del} `
|
for i in `ls -tr "${logdir}" | egrep -o '^search.*.xml$' | head -n${count2del} `
|
||||||
do
|
do
|
||||||
|
@ -2949,7 +2953,7 @@ if [ ${count2del} -ge 0 ]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# überzählige cutlists löschen:
|
# überzählige cutlists löschen:
|
||||||
count2del=$( expr $(ls -t "${logdir}" | egrep -o '.*.cutlist$' | wc -l) - $LOGmax )
|
count2del=$(($(ls -t "${logdir}" | egrep -o '.*.cutlist$' | wc -l) - $LOGmax ))
|
||||||
if [ ${count2del} -ge 0 ]; then
|
if [ ${count2del} -ge 0 ]; then
|
||||||
for i in `ls -tr "${logdir}" | egrep -o '.*.cutlist$' | head -n${count2del} `
|
for i in `ls -tr "${logdir}" | egrep -o '.*.cutlist$' | head -n${count2del} `
|
||||||
do
|
do
|
||||||
|
@ -2988,6 +2992,6 @@ fi
|
||||||
echo " -----------------------------------"
|
echo " -----------------------------------"
|
||||||
echo " | ==> synOTR ENDE <== |"
|
echo " | ==> synOTR ENDE <== |"
|
||||||
echo " -----------------------------------"
|
echo " -----------------------------------"
|
||||||
echo -e; echo " Gesamtzeit: $(sec_to_time $(expr $(date +%s)-${UNIXTIME}) )"
|
echo -e; echo " Gesamtzeit: $(sec_to_time $(( $(date +%s)-${UNIXTIME})))"
|
||||||
|
|
||||||
exit
|
exit
|
||||||
|
|
Loading…
Reference in a new issue