QtMultimedia backend on Windows
-
Hi!
I want to use Qt5 with QtMultimedia on Windows 7. But the codecs for video and audio is limited to my Windows, QtMultimedia uses DirectShow for his work. Is there a possibiliy to use libav or gstreamer as a backend for QtMultimedia to have a huge number of supported codecs? My goal is to write a Qt-based software which can run on different Windows machines and understand different video formats indepented of the systems installed codecs. Currently I use Qt4.8 and gstreamer directly. I'm looking for a way to do this with QtMultimedia.
Thanks,
Robert Adler -
I suspect you need to bundle codecs just as VLC does. But I'm far from being an expert in this area :)
-
may this an option for you?"
"VLClib in Qt":http://wiki.videolan.org/LibVLC_SampleCode_Qt -
The idea with VLClib is not so bad. But it is the same way I'm currently using gstreamer with QtGStreamer. I'm lookung for a possibility to use gstreamer/vlclib as backend for QtMultimedia on Windows.
-
why do you depend on QtMultimedia exactly?
-
Don't really depend. Just the idea to use it as a simple framework and tell it what backend to use.
-
so you could use VLClib and write a simple QtMultimedia-like wrapper around it if that is more convenient for you?
-
I think that would be the solution. I looked into QtMultimedia src code. On Linux it uses gstreamer as backend, on Windows DirectShow. Perhaps I can port the code for the linux plugin to Windows.
-
It doesn't use DirectShow on Windows. It uses crappy WMF which is why it hardly plays any videos. I think a DirectShow back end is being worked on (http://comments.gmane.org/gmane.comp.lib.qt.devel/12033) but I just tested and WMF is still being used with 5.1.
-
Relying on a multi-media framework like DirectShow or MediaFoundation is highly unreliable! That's because what Video, Audio and Container formats work or do not work solely depends on what Filters (or Plugins, or Codecs, or however you like to call it) happen to be installed on the individual computer. Also, for the very same format, different Filters may be existent and those may not all behave in the same way, making the result highly unpredictable - even when the "required" Filter for format XYZ happens to be installed. Finally, some Filter combinations may work well, others may not. Overall, you want to keep away from that nightmare as far as you can.
I would highly recommend you go for a proper "all-in-one" solution that works "out-of-the-box" and does not rely on any external Plugins, Filters, Codecs or whatsoever. Your best bet in that regard is libavcodec/libavformat from FFmpeg project, which decodes pretty much everything you may need! However these libraries, while extremely powerful, are not easy to use. And they have a tendency to break the API in regular intervals ;-)
If you want something that just works, grab MPlayer. That's one big stand-alone binary that plays pretty much everything. And, despite it is a separate (console) program, it integrates nicely into GUI programs. Look at SMPlayer for an example. Note that SMPlayer is based on Qt.
"Here you can see some screenshots from SMPlayer":http://smplayer.sourceforge.net/images/screenshots/mainwindow.png
-
I have been watching this project with great interest:
http://sourceforge.net/projects/qtav
It's a proper "all-in-one" solution that works out of the box on at least all of the major desktop systems. It doesn't rely on any external Plugins, Filters, etc. And it is a wrapper around FFmpeg and Port Audio.