There's a lot of examples around. Here's one : http://smashscripts.blogspot.com/2007/05/php-upload-and-convert-avi-wmv-mov-and.html You'll need some video software installed on the server for these scripts to work like ffmpeg etc.
Thanks for your help. but i have ready on my dedicated server the avi files. I don't to upload on my server. Just i need php convert ON THE FLY to convert to FLV file. Thanks