Skip navigation
Currently Being Moderated

any other way to play avi files in flex

Aug 10, 2009 12:05 AM



i have to play video files like avi,wma and etc.

For that i want to create the application in flex.

i created video player in flex. it support only flv files. but i need to play all the formats. is there anyway to create the application like this.

it may be component or using any api or whatever the things . jus i have to play various format video files in flex application.

already you told that, we can't embed vlc player.


but is there anyother way to develop this appllication.

  • Currently Being Moderated
    Aug 10, 2009 5:28 AM   in reply to karthick86mca


    So far I have not seen a avi player in flex.

    I think theoretically it would be possible to write a video decoder for different formats but  the question is wherher the flash palyer is fast enough to decode it in real time.


    I think the only practical solution to this is to  transcode the files on the server and then play the transcoded flv.

    Mark as:
  • Currently Being Moderated
    Aug 10, 2009 6:25 AM   in reply to dr.Evol

    Nope. Flex / AIR only supports FLV.


    If this post answers your question or helps, please mark it as such.

    Mark as:
  • Currently Being Moderated
    Aug 11, 2009 12:19 AM   in reply to karthick86mca

    By using ffmpeg we can encoding various format to flv


    I hope my reply help you

    Mark as:
  • Currently Being Moderated
    Aug 11, 2009 12:29 AM   in reply to karthick86mca

    FFMEG is a nice and simple tool to convert formats...


    You could of course use any of the streaming server systems such as Red5, Adobe media server, Wowza media... but these are (except Red5) commercial solutions and more targeted at massive live video streaming. I don't know what you need actually. If you need live streaming then you should take a look at one of those commercial solutions. Wowza ( is perhaps the most simple to use and out of the box solution, the other two require more work to be done.

    I'm also not sure but I think only wowza support format transcoding, for the other two I think you'll stil need FFMPEG or similar.


    If you just need to play pre-recorded video files, then just convert them by a standard converting program... flash media encoder, Riva FLV encoder (I think there is a Live version which is free).


    If you need to play video which user uploads or something like that, then just do a file upload, convert it on the server using ffmpeg and then download it or stream it back to the flex app.



    I hope it helps.



    Mark as:
  • Currently Being Moderated
    Aug 11, 2009 11:59 AM   in reply to karthick86mca

    Well,if this is going to be a web application, then you have to use the flash file upload capability (this is FileReference class), convert it on the server using ffmpeg and then send or stream it back to the browser.


    FileRefernce is a mechanism which allows you to select a file using standard OS file dialog, then you can send as http header to the server.

    Server receives it and saves it as a file.

    Then you can run a shell command and execute ffmpeg which will create a new file somewhere on the server filesystem.

    Then you can send back the URL of the new file.. flex/flash app can then either directly stream the video and play it or prompt the user to save the file.



    For using FileReference check out the documentation:


    there are also many examples out there, just google it.




    Personally I dont have many experience with ffmpeg, but if you google for "converting flash video with ffmpeg" or something like that you'll get many examples. Check also the oficial ffpeg site and read the documentation. Play with it locally from your command line and when you get familiar with it try to automate its running with php and then you are almost there.


    FFmpeg is simple as:


    ffmpeg -i mymovie.avi mymovie.flv


    Its all do-able in one day even with no experience.

    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points