#!/bin/sh find . -name "*.avi" -exec sh -c 'ffmpeg -n -i "$1" -c:v libx264 -preset veryfast -c:a copy $(basename "$1" .avi).mp4' _ {} \;