diff options
Diffstat (limited to 'odin/strm/send_kitty')
-rw-r--r-- | odin/strm/send_kitty | 8 |
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 | |||
10 | lastFile=${concatDir}/latest.mkv | 10 | lastFile=${concatDir}/latest.mkv |
11 | 11 | ||
12 | fList="" | 12 | fList="" |
13 | tmpFile="" | ||
13 | 14 | ||
14 | function cleanup() { | 15 | function cleanup() { |
15 | [[ -n "${fList}" ]] && rm -v ${fList} | 16 | [[ -n "${fList}" ]] && rm -fv ${fList} |
17 | [[ -n "${tmpFile}" ]] && rm -fv ${tmpFile} | ||
16 | } | 18 | } |
17 | 19 | ||
18 | trap cleanup EXIT | 20 | trap cleanup EXIT |
@@ -37,7 +39,9 @@ if [[ $(wc -l ${fList} | cut -d ' ' -f 1) -eq 0 ]]; then | |||
37 | fi | 39 | fi |
38 | 40 | ||
39 | newFile="${concatDir}/hlidskjalf.$(date +'%Y-%m-%d-%H-%M-%S').mkv" | 41 | newFile="${concatDir}/hlidskjalf.$(date +'%Y-%m-%d-%H-%M-%S').mkv" |
42 | tmpFile=$(mktemp --tmpdir ${concatDir} "${newfile:h}/.${newFile:t:r}.XXXXXX.mkv") | ||
40 | 43 | ||
41 | ffmpeg -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} | 44 | ffmpeg -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} |
45 | mv -v ${tmpFile} ${newFile} | ||
42 | queue.hel -p -r ${newFile} | 46 | queue.hel -p -r ${newFile} |
43 | ln -vfs $(realpath --relative-to=${lastFile:h} ${newFile}) ${lastFile} | 47 | ln -vfs $(realpath --relative-to=${lastFile:h} ${newFile}) ${lastFile} |