#!/bin/bash
# Конвертира всички .avi файлове рекурсивно в .mp4 (H.264 + AAC)

find . -type f -iname "*.avi" | while read -r file; do
  output="${file%.*}.mp4"
  echo "Конвертиране: $file → $output"
  ffmpeg -i "$file" -vcodec libx264 -acodec aac -y "$output"
done
