Code:
#!/bin/bash
#Start in the parent directory with the files
ls -RdX $PWD/* >out
grep -i "\.flv" out >out2
sed -i 's/\.flv//g' out2
for word in $(cat out2)
do
ffmpeg -i $word.flv -c:v libx264 -b:v 1000k $word.mp4
done
fixed it file naming issue :P