I want to convert a bunch of mkvs to mp4s with the following command:
for i in $(ls *mkv); do ffmpeg -i $i -vcodec copy -acodec copy $i.mp4; done;
However, the filenames have whitespaces and hyphens in them, so the command does not work properly. (When I manually replace The File - 01.mkv
with The\ File\ \-\ 01.mkv
, the same command works).
What's the best way to get this to work?
find
. – Michael Homer Mar 07 '15 at 04:05