#!/bin/bash for src in * do if [[ "$(file -b --mime-type "$src")" =~ ^video ]] then ffmpeg -i "$src" -vn -acodec copy "$1/${src%.*}.mka" fi done