Have a look at this example:
Code:
#!/bin/bash
while read inFile
do
outName="${inFile%.*}" # name part
outExt="${inFile##*.}" # extension part
outFile="${outName}.downscaled.${outExt}" # new name for outfile
# only do this when outfile does not exist
[[ -a "${outFile}" ]] || echo ffmpeg -i "${inFile}" ..... "${outFile}"
done < <( find . -type f -print )
This will create the new file(s) in the same directory as the original, but the name of the output file is changed: movie.avi -> movie.downscaled.avi
The
find .... part looks for all files from where the command is executed. You might want to change this to a full path:
find /path/to/first/movie/dir -type f -print
The above only echo's the ffmpeg command and does not execute it (remove the echo and edit the command to your needs).
This is just a rough example and might need some tweaking to meet your specific needs.