How can I recursively find all audio and video files in a directory and move them elsewhere in a single operation?
find command allows you to limit what files are matched. You can then call your script with the
find . \( -name '*.mp3' -o -name '*.avi' \) -exec /path/to/your/script.sh
Now your script will be called for each mp3/avi file in the tree.
A simple test to show this would be to have script.sh read something like
#!/bin/bash echo Script called with "$1" as the filename
Now you can build your script to call
ffmpeg or whatever you like.