Take the 2-minute tour ×

I am developing a web-application in grails.In that I have implemented video's playing option.For playing video I used the flashplayer plugin .It is working.Now I am planning to implement the feature that user's also can upload their video's.After uploading the video files how to convert those video files to .flv format?


Does flash player plays all the video formats?I tried with .wmv file .It is not working.

Can anyone provide help on this?


share|improve this question

1 Answer 1

up vote 6 down vote accepted

Flash can only play FLVs, and h.264 encoded videos (e.g. mp4, f4v). You can convert video into any of these formats using FFmpeg. If you're using Windows, you can get some pre-built binaries here.

Sample command-line that should convert inputfile.avi to an flv with an audio bitrate of 48kbps, and a video bitrate of 224kbps (might need to substitute libmp3lame for mp3 depending on version of ffmpeg):

ffmpeg -i inputfile.avi -s 640x480 -y -f flv -acodec mp3 -ac 1 -ab 48k -b 224k -ar 22050 outputfile.flv

Sample for h.264 / aac:

ffmpeg -i inputfile.avi -s 640x480 -y -f mp4 -vcodec libx264 -acodec libfaac -ab 48k -b 224k -ar 22050 outputfile.mp4
share|improve this answer
Great! Do you also have an example to convert to h264? –  Luke Mar 30 '09 at 3:07
Awesome. Thanks a lot! –  Luke Mar 30 '09 at 4:23

Your Answer


