diff options
author | heqnx <root@heqnx.com> | 2025-07-06 17:05:57 +0300 |
---|---|---|
committer | heqnx <root@heqnx.com> | 2025-07-06 17:05:57 +0300 |
commit | 31ec32d4b429ecf3aac2c947b9dfb2bbff35de33 (patch) | |
tree | 252d9ad6243b685b68731b9fe7b687b1dfbc9559 /files | |
parent | a064cbda2086b79b6cc04111cb308a6b2d770aa6 (diff) | |
download | ansible-icecast2-31ec32d4b429ecf3aac2c947b9dfb2bbff35de33.tar.gz ansible-icecast2-31ec32d4b429ecf3aac2c947b9dfb2bbff35de33.zip |
added a conversion script and small typos
Diffstat (limited to 'files')
-rw-r--r-- | files/convert-mp4-to-webm.sh | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/files/convert-mp4-to-webm.sh b/files/convert-mp4-to-webm.sh new file mode 100644 index 0000000..5fd56e1 --- /dev/null +++ b/files/convert-mp4-to-webm.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +SOURCE_DIR="." +OUTPUT_PREFIX="video" +COUNT=1 + +mkdir -p webm_output &>/dev/null + +for FILE in "${SOURCE_DIR}"/*.mp4; do + OUTPUT_FILE="webm_output/${OUTPUT_PREFIX}${COUNT}.webm" + printf "%s\n" "[inf] processing ${FILE} -> ${OUTPUT_FILE}" + ffmpeg -i "${FILE}" -an -c:v libvpx-vp9 -crf 32 -b:v 0 -vf "scale=1920:1080,fps=24" -threads 4 -speed 3 -g 48 "${OUTPUT_FILE}" + + ((COUNT++)) +done + +printf "%s\n" "[inf] all videos converted to optimized .webm format in ./webm_output/" |