From fb0126547aa9d97f2948884df14a55c9db844b60 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 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/convert-video.sh b/convert-video.sh index 6885138..731968c 100755 --- a/convert-video.sh +++ b/convert-video.sh @@ -25,12 +25,12 @@ export ORIG="$(pwd)"; cd "${TMP_DIR}" -yt-dlp "${URL}" -o "${NAME}" +yt-dlp "${URL}" -S "+height:720" -f "b" -o "${NAME}" -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" +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" -ffmpeg -i $2.* -vf fps=20 frame%04d.png -rm $2.* +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' rm frame*.png