How do I create a for loop that only executes on files larger than a specified filesize?
You can use find
for this:
find ./ -name "*.mp4" -size +500M -exec mp4box -splits 500000 {} \;
(I didn't test it, but it should be something like that)
With zsh
:
for f ( *.mp4(.Lk+500000) ) mp4box -splits 500000 $f
Glob qualifiers: (.)
to match plain files, (Lk+500000)
to match files greater than 500000 KB in size. Add (D)
to the qualifiers to include dotfiles.