summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--odin/strm/send_kitty8
1 files changed, 6 insertions, 2 deletions
diff --git a/odin/strm/send_kitty b/odin/strm/send_kitty
index 2b3e017b..e4139885 100644
--- a/odin/strm/send_kitty
+++ b/odin/strm/send_kitty
@@ -10,9 +10,11 @@ concatDir=${wDir}/concat
10lastFile=${concatDir}/latest.mkv 10lastFile=${concatDir}/latest.mkv
11 11
12fList="" 12fList=""
13tmpFile=""
13 14
14function cleanup() { 15function cleanup() {
15 [[ -n "${fList}" ]] && rm -v ${fList} 16 [[ -n "${fList}" ]] && rm -fv ${fList}
17 [[ -n "${tmpFile}" ]] && rm -fv ${tmpFile}
16} 18}
17 19
18trap cleanup EXIT 20trap cleanup EXIT
@@ -37,7 +39,9 @@ if [[ $(wc -l ${fList} | cut -d ' ' -f 1) -eq 0 ]]; then
37fi 39fi
38 40
39newFile="${concatDir}/hlidskjalf.$(date +'%Y-%m-%d-%H-%M-%S').mkv" 41newFile="${concatDir}/hlidskjalf.$(date +'%Y-%m-%d-%H-%M-%S').mkv"
42tmpFile=$(mktemp --tmpdir ${concatDir} "${newfile:h}/.${newFile:t:r}.XXXXXX.mkv")
40 43
41ffmpeg -safe 0 -f concat -i =(awk $'{ print "file \'"$0"\'" }' ${fList}) -c:v libx264 -r 30 -crf 27 -preset veryfast -vf 'scale=1920:1080:force_original_aspect_ratio=decrease,pad=1920:1080:(ow-iw)/2:(oh-ih)/2' -metadata "description=$(xargs -a ${fList} -- basename -s ".mkv")" ${newFile} 44ffmpeg -safe 0 -f concat -i =(awk $'{ print "file \'"$0"\'" }' ${fList}) -c:v libx264 -r 30 -crf 27 -preset veryfast -vf 'scale=1920:1080:force_original_aspect_ratio=decrease,pad=1920:1080:(ow-iw)/2:(oh-ih)/2' -metadata "description=$(xargs -a ${fList} -- basename -s ".mkv")" ${tmpFile}
45mv -v ${tmpFile} ${newFile}
42queue.hel -p -r ${newFile} 46queue.hel -p -r ${newFile}
43ln -vfs $(realpath --relative-to=${lastFile:h} ${newFile}) ${lastFile} 47ln -vfs $(realpath --relative-to=${lastFile:h} ${newFile}) ${lastFile}