Code:
#!/bin/bash
#Start in the parent directory with the files
ls -RdX $PWD/* >out
grep -i "\.flv" out >out2
error lol 1 min
Figure out how to make the files you want here.
Converting AVI to MP4 with ffmpeg
Use a LINUX server with ffmpeg installed and configured.
You might want to use rsync to move the files and convert them on a non production server or go down for "maintenance".