Diverse Bilder & Sounds, Fehlerkorrekturen, neue Tage

This commit is contained in:
2025-11-18 21:35:32 +01:00
parent 543e6c272f
commit d8147df382
74 changed files with 603 additions and 63 deletions

View File

@@ -95,11 +95,34 @@ process_videos() {
echo "Video: $filename"
# Original-Auflösung auslesen
width=$(ffprobe -v error -select_streams v:0 -show_entries stream=width \
-of csv=p=0 "$vid")
height=$(ffprobe -v error -select_streams v:0 -show_entries stream=height \
-of csv=p=0 "$vid")
# Orientierung bestimmen
if [ "$width" -gt "$height" ]; then
orientation="landscape"
else
orientation="portrait"
fi
echo "➡️ Orientierung erkannt: $orientation (${width}x${height})"
# über Index 07 iterieren
for i in "${!VIDEO_NAMES[@]}"; do
res="${VIDEO_NAMES[$i]}"
scale="${VIDEO_SCALES[$i]}"
# Scale für Portrait drehen
if [ "$orientation" = "landscape" ]; then
target_scale="$scale"
else
IFS=':' read -r sw sh <<< "$scale"
target_scale="${sh}:${sw}"
fi
for vfmt in "${VIDEO_FORMATS[@]}"; do
OUT_DIR="$BASE_OUTPUT/videos/$res/$vfmt"
@@ -112,13 +135,15 @@ process_videos() {
continue
fi
echo "🎞️ Render: $name.$vfmt$target_scale ($res)"
if [ "$vfmt" = "mp4" ]; then
ffmpeg -y -i "$vid" -vf "scale=$scale" \
ffmpeg -y -i "$vid" -vf "scale=$target_scale" \
-c:v libx264 -crf 23 -preset medium \
-c:a copy \
"$OUT_FILE"
else
ffmpeg -y -i "$vid" -vf "scale=$scale" \
ffmpeg -y -i "$vid" -vf "scale=$target_scale" \
-c:v libvpx-vp9 -b:v 0 -crf 32 \
-c:a libopus \
"$OUT_FILE"