[FFmpeg-user] recursive loop through directory in osx

William Caulfield william.caulfield at contentbridge.tv
Fri May 12 01:57:18 EEST 2017


On Thu, May 11, 2017 at 1:41 PM, Ian McPherson <ianmaca at gmail.com> wrote:

> I want to use the following command on a media directory to convert a load
> of MKV to MP4. the command works fine. just need the loop to process
> through. how do I do that ?
>
> for f in *.mkv;do ffmpeg -i "$f" -c copy "${f%mkv}mp4";done
>
> file structure is:
> / TV / Program One / S01 / EP01.mkv
> / TV / Program One / S01 / EP02.mkv
> / TV / Program Two / S01 / EP01.mkv
> / TV / Program Two / S01 / EP02.mkv
> / TV / Program Two / S02 / EP01.mkv
>
>
Some clues here, although the space in your directory names may be a
special problem:

http://stackoverflow.com/questions/6122341/for-loop-for-files-in-multiple-folders-bash-shell

-- 
<https://www.google.com/a/contentbridge.tv/images/logo.gif>
*William Caulfield *| *ContentBridge Systems*


More information about the ffmpeg-user mailing list