[FFmpeg-user] recursively convert subfolder sequences to .mov?

Liam Condron-Farnos 23liam at googlemail.com
Wed Mar 20 13:35:04 CET 2013


>but I still have to change the name of the input path, output path and filename on a per folder basis.
>I did 15 last night, 1 at a time, but it's gonna be a drag processing 130gb per reel like this.

You're on OSX (I assume, from the /Volumes), which I think means you
have access to find and bash. The following with work with GNU find:

find /Volumes/reel1 -type d -exec bash -c 'ffmpeg -f image2
-pattern_type glob -r 24 -i "$0/*.dpx" -vcodec prores
"$0/${0##*/}.mov"' '{}' \;

^That will find all directories within /Volumes/reel1, and feed them
into ffmpeg. Also, you probably want to use -r 24 as an input option
(by default, ffmpeg uses a frame rate of 25 fps, and if you set an
output rate of 24 fps, it'll drop frames).

For other versions of find, you may need to use xargs

find /Volumes/reel1 -type d -print0 | xargs -0 -I {} bash -c 'ffmpeg
-f image2 -pattern_type glob -r 24 -i "$0/*.dpx" -vcodec prores
"$0/${0##*/}.mov"' '{}'

Note that I haven't tested either of these (though I have used similar
lines for different purposes), so check the man page or online guides
yourself.


More information about the ffmpeg-user mailing list