Search code examples
user-interfacevideoplaybackmultimedia

Multimedia framework for video playback in a GUI application?


Some time ago I started a project in which I needed to do the following things:

  • Play videos:
    • In any common format (avi, mpeg, xvid, etc.)
    • Be able to pause and reposition the stream programmatically.
    • Be able to set the playback speed (not mandatory, but desirable)
  • Let me paint custom graphics (kept in sync with the video) over the playback component.
  • Allow access the current frame as a raster image (this is not mandatory, but desirable).

And also be easy to use (e.g. visual component oriented, I don't want to deal a lot with the multimedia streams internals).

As I already had some related code written in Java, I tried with all the Java libraries that I found (JMF, FMJ, JVLC, Jffmpeg, gstreamer-java) but no one satisfied all my hard requirements (for example, those which allowed me to draw over the frame couldn't be paused or rewinded, those which were full-featured were outdated, etc.), so I put the project on hold.

Now I'm on the mood for a comeback and I won't mind to rewrite the code in other language (of a level equal or higher than Java, but please not C or C++, I've become too lazy :-p) that has a good GUI framework or Rich Client Platform freely available too. Being multiplatform is a good point, as I like to develop and test in Linux, but I'd like to reach a larger audience, so being able to target Windows is a must.

So what language and frameworks would you recommend me?


Solution

  • I would use OpenCV library. There are all the features you need: formats support, any frame fetching, frame modification, etc. Check out this installation guide and some samples.