From a6e74b9c7a7df3d4a9033327715cf81ddf10c36c Mon Sep 17 00:00:00 2001 From: Jacob Casper Date: Tue, 3 May 2022 12:33:56 -0500 Subject: [PATCH] Initial commit --- hevc-pipeline.sh | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100755 hevc-pipeline.sh diff --git a/hevc-pipeline.sh b/hevc-pipeline.sh new file mode 100755 index 0000000..3574233 --- /dev/null +++ b/hevc-pipeline.sh @@ -0,0 +1,20 @@ +#!/bin/bash +mapfile -t hevc_films < <(ssh mbp 'find /srv/deluge/Downloads/ \( -name '"'"'*.mkv'"'"' -o -name '"'"'*.mp4'"'"' \) -type f -print0| xargs -0 -P 4 -I@ bash -c '"'"'test "hevc" == $(ffprobe -v error -select_streams v:0 -show_entries stream=codec_name -of default=noprint_wrappers=1:nokey=1 "@") && echo "@"'"'"'' ) + +# copy all streams from input 0 except subs and annotations +# -map -0:s -map -0:t \ + +printf '%s\0' "${hevc_films[@]}" | xargs -0 -P 1 -I@ bash -c 'ssh mbp '"'"'cat "@"'"'"' | + ffmpeg \ + -fflags +igndts \ + -i - \ + -map 0 \ + -c:v libx264 -level:v 4.1 -tag:v avc1 \ + -crf 23 \ + -vf \ + format=yuv420p \ + -preset veryfast \ + -c:a copy \ + -f matroska \ + - | \ + ssh mbp '"'"'cat > "@".new'"'"'' -- 2.20.1