Fou-lu is a god emperor for a reason!
What you propose is possible, because I'm doing the same thing on my fileserver. You mainly just need to shell_exec() ffmpeg with the right parameters (which is pretty hard to get right). If you're looking at HTML5, you want ffmpeg2theora (get the binary from their website, because the package you *may* find will be old and bad). I suggest dumping flv and just doing baseline mp4 (which is supported by 9.something flash player) using the ipod* presets supplied with ffmpeg.
I can help you compile ffmpeg with the relevant options if you need.
There's a lot of information to digest, I hope I've given you enough keywords to Google and come back to us with something more specific.