>>83522704Here's a script a kind Anon on /g/ made that converts soundposts into MKV files. Save it as a .sh, give it execute +x permissions, and run it in the directory you want to process.
If you just wanted the mp3 file then you'd need to modify the script, probably use those top two lines that are decoding the URL and work from there.
#!/bin/env bash
urlre='^.*\[sound=(.+)\].*$'
function urldecode() { : "${*//+/ }"; echo -e "${_//%/\\x}"; }
for i in *.png *.gif *.jpg *.webm *.jpeg; do
if [ -e "${i%.*}.mkv" ]; then
echo Skipping \"$i\".
continue
fi
echo Processing \"$i\"...
[[ "$i" =~ $urlre ]]
ffmpeg -v error -i "$i" -i "$(urldecode ${BASH_REMATCH[1]})" -c copy "${i%.*}.mkv"
done