Created
May 3, 2025 16:45
-
-
Save pkcpkc/51be204a2810406de0644cd6b0467258 to your computer and use it in GitHub Desktop.
Converts video files in current folder to AMV 128x128 compatible with RUIZU Digital Music Player. Prerequisite: ffmpeg
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Converts video files to 128x128 amv video for RUIZU Digital Music Player | |
# Requires ffmpeg: brew install ffmpeg | |
# Supported video formats | |
extensions=("mp4" "mov" "avi" "mkv" "flv" "wmv" "mpeg" "mpg" "webm" "divx") | |
for ext in "${extensions[@]}"; do | |
for file in *."$ext"; do | |
[ -e "$file" ] || continue | |
basename="${file%.*}" | |
output="${basename}.amv" | |
echo "Converting: $file → $output" | |
ffmpeg -i "$file" -vf scale=128:128,fps=30 \ | |
-c:v amv -b:v 256k \ | |
-c:a adpcm_ima_amv -ar 22050 -ac 1 \ | |
-block_size 735 "$output" | |
done | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment