This snippet will (in current dir):
- Convert all files of
$first_extextension to ones with$second_ext. - Remove all files with the
$first_extextension.
first_ext="webm"
second_ext="mp4"
for i in *.$first_ext; do ffmpeg -i "$i" "${i%.*}.$second_ext"; done; for i in *.$first_ext; do rm "$i"; done