This snippet will (in current dir):
- Convert all files of
$first_ext
extension to ones with$second_ext
ones - Remove all files with the
$first_ext
extension
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