2 Replies Latest reply on Aug 9, 2012 1:05 PM by colin-java

    Playing video media

      Hi, I am able to play video media (located on my pc) with the code..

      String filename = "C://movie.mp4";
      Media media = new Media(new File(filename).toURI().toString());

      But I can only get it to work for mp4 files, I assumed it worked also for flv,
      cause in one of the javafx sample projects on netbeans, it plays an flv file located on the web.

      Can anyone figure out how to get it to work for other file types, such as flv?

      Thanks very much.
        • 1. Re: Playing video media
          A list of all supported media formats is located here:


          ...I assumed it worked also for flv...

          Remember that FLV is a container format. A container format is sort of like a zip file specialized for video and audio. The video file inside the FLV file must be VP6 and the audio file must be MP3.

          Also, I am not clear on what the difference is, but there are at least two different types of FLV. JavaFX does not support Sorenson FLV, the FLV format used on Youtube.
          • 2. Re: Playing video media
            Thanks for reply, I understand it a little better now.