0

I am working on a playout and wants to preview a .mpg file with javafx media .I have tried playing the file but MEDIA_UNSUPPORTED : Unrecognized file signature! exception was thrown is it possible to do that using codecs if yes which codecs do i need to install .i havent tried anything else yet but suggestions are most welcome

Shashank
  • 41
  • 3

1 Answers1

0

No, JavaFX 2 cannot play mpeg2 encoded files (with the exception of the audio layer mp3).

The list of supported codec types for JavaFX is not extensible beyond those documented.


There is some sample code to integrate the 3rd party vlcj component with a JavaFX 2 canvas node, but that does not make use of JavaFX 2 media.

jewelsea
  • 150,031
  • 14
  • 366
  • 406
  • I tried to play video through vlcj's sample code for javafx but when the video gets played for sometime i am getting out of heap space error...I know i can increase the heap size but the video size can be larger than the maximum allowed heap for my computer.... i using direct media player component class for playing the video.... what should i do? – Shashank Mar 08 '13 at 09:33
  • You can use tools such as [JProfiler](http://www.ej-technologies.com/products/jprofiler/overview.html) or the [NetBeans Profiler](http://profiler.netbeans.org) to track down memory leaks in your program. – jewelsea Mar 08 '13 at 11:53