From 5662f536d729ea17af253ee39bdf4bf789649d67 Mon Sep 17 00:00:00 2001 From: capta1nseal Date: Sun, 15 Sep 2024 19:22:23 +0300 Subject: [PATCH] Decrease max video download quality to 720p. Larger downloads were causing errors, slower to process, and unnecessary. --- convert-video.sh | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/convert-video.sh b/convert-video.sh index a311071..f2fc04c 100755 --- a/convert-video.sh +++ b/convert-video.sh @@ -25,6 +25,7 @@ export ORIG="$(pwd)"; cd "${TMP_DIR}" +<<<<<<< HEAD ffmpeg -i "${INPUT}" -filter_complex "[0:a]channelsplit=channel_layout=stereo[left][right]" -map '[left]' -f s8 -ac 1 -ar 48k "${OUTPUT}/left.s8" -map '[right]' -f s8 -ac 1 -ar 48k "${OUTPUT}/right.s8" ffmpeg -i "${INPUT}" -vf fps=20 frame%04d.png @@ -32,9 +33,14 @@ ffmpeg -i "${INPUT}" -vf fps=20 frame%04d.png ls frame*.png | parallel 'echo {}; python3 ${ORIG}/cc-pic.py -W 164 -H 81 -p cover {} ${OUTPUT}/{.}.cpi' ======= ffmpeg -i $2.* -filter_complex "[0:a]channelsplit=channel_layout=stereo[left][right]" -map '[left]' -f s8 -ac 1 -ar 48k "${ORIG}/${NAME}/left.s8" -map '[right]' -f s8 -ac 1 -ar 48k "${ORIG}/${NAME}/right.s8" +======= +yt-dlp "${URL}" -S "+height:720" -f "b" -o "${NAME}" -ffmpeg -i $2.* -vf fps=20 frame%04d.png -rm $2.* +ffmpeg -i $2* -filter_complex "[0:a]channelsplit=channel_layout=stereo[left][right]" -map '[left]' -f s8 -ac 1 -ar 48k "${ORIG}/${NAME}/left.s8" -map '[right]' -f s8 -ac 1 -ar 48k "${ORIG}/${NAME}/right.s8" +>>>>>>> fb01265 (Decrease max video download quality to 720p. Larger downloads were causing errors, slower to process, and unnecessary.) + +ffmpeg -i $2* -vf fps=20 frame%04d.png +rm $2* ls frame*.png | parallel 'echo {}; python3 ${ORIG}/cc-pic.py -W 164 -H 81 -p full {} ${ORIG}/${NAME}/{.}.cpi' >>>>>>> 544c8a9 (Swap to -p full.) rm frame*.png