Playing mov-files via Qt - c++

I would like to play mov-files (Quicktime videos) in a Qt-application. As far as I see, QMediaPlayer is not capable to play this format. Does anybody know how to upgrade QMediaPlayer or know a good library to use or any other solution (except libVLC)?
Thanks

QMediaPlayer can play any format that the platform's media service supports. You should install the right codecs for a video type to be played successfully. Try to install GStreamer codecs on Linux. If you are on Windows install KLite Codecs.
QtMultimedia's implemention is platform dependent (uses direct show on windows, gstream on linux etc). May be it is good to consider using libraries like QtAV or libVLC.
They work for most platforms and no additional codecs and plugins are required to install.

Related

Backends to use for multimedia in Qt5

What are available and reliable multimedia backends to use with Qt5 for media playback on Linux?
I don't know about backends rather than gstreamer for linux, but you can try to integrate QmlVlc project into your code. You can find a demo here. It uses vlc for playing video. I successfully used this project for my purposes under Android. You can also try QtAV, it uses ffmpeg. From my experience it worked on Android as well, but there were issues with hanging UI. It might have needed more work to properly integrate though, but I didn't want to spend time on it, at least it was easy to try.
I know you were not asking for Android libs, but by using on Android I mean native (C++) code, so no Java was used.
you can use Gstreamer Qt bindings

Unable to play certain videos with QMediaPlayer

I have a Qt 5.3 application that plays videos which works fine for some videos. Unfortunately when given some .mov files, I either get a QMediaPlayer::FormatError or I can hear audio but no video.
I am assuming this is due to missing codecs, is there a way to add support so that I can play the videos?
EDIT: This is on OS X
QMediaPlayer can play any format that the platform's media service supports. You should install the right codecs for a video type to be played successfully. Try to install GStreamer codecs on Linux. If you are on Windows install KLite Codecs.
QtMultimedia's implemention is platform dependent (uses direct show on windows, gstream on linux etc). May be it is good to consider using libraries like QtAV or libVLC.
They work for most platforms and no additional codecs and plugins are required to install.

Using codecs in program

As I've mentioned in my another question, I'm having trouble with Qt 5.1's multimedia module. The QMediaPlayer class can't play some MP3 files. I haven't tested other formats thoroughly.
I'm not sure if this is a codec related problem. But I'm interested in using codec directly in my program rather than relying on the backend support for playing media files. I'll be developing the application in Qt 5.1 for desktop Windows platform.
I have no idea about using codecs in programs. Any pointer will be greatly appreciated.
You can go to [FFMPEG]: http://www.ffmpeg.org/ to integrate the open-source codec to play your media file.

Cross Platform (C/C++) Audio Library for MP3, AAC, WAV

I'm trying to find a cross platform audio library that will have the following abilities (in order of importance):
Full Windows, Mac, Linux support
C / C++ APIs
Free/cheap but commercially viable
MP3 Support
AAC Support
WMA Support
FLAC Support
OGG Support
ARM Linux support would be nice
Open Source
I've found several things like OpenAL, libao, Bass, etc. but they all seem to all either have a limitation of OS, codec or both. For the most part MP3 and AAC support are a must as I'm working on a media player and would like it to support those common formats.
Any suggestions?
You can take a look at GStreamer and FFmpeg.
EDIT:
Since you are willing to use Qt, you should definitely check Qt MultimediaKit, which is a part of the Qt Mobility project. Phonon is fading away because Qt is investing on MultimediaKit to replace it.
This example shows how to do simple audio playback. This example shows how to create a multimedia player. This example shows a more advanced music player, using Qt and QML.
I don't know if you are planning on using a framework like Qt.
This has a library called "Phonon" bundled, which is also really nice.
It is built on the corresponding native media framework, so QuickTime on Mac, Windows Media Player on Windows and GTK+ on Linux.
PulseAudio also looks promising without any framework.
Try out JUCE. It is like Qt in some respects, but much more audio-centric.I've been using it for some years now and it is well maintained and written.

how to play rtsp streamming in QT

I am trying to find a way to play in Qt 4.6 rtsp streaming, that i got from youtube api
can it be done somehow?
Live555 has some very useful libraries on this subject.
Checkout Phonon, multimedia framework for QT.
The most seamless way is to use Phonon.
If you are using Windows, Phonon uses DirectShow as the backend. To utilize this you need a RTSP DirectShow source filter, which you register in Windows. There are commercially available ones and a few open source projects that may have what you need.
For example,
http://sourceforge.net/projects/rtspdirectshow
A good rule of thumb is if you can play it in Windows Media Player (mplayer2.exe, wmplayer.exe), you can play it using Phonon. Currently you would not be able to play a URL containing "rtsp://" in WMP or Phonon is because no DirectShow source filters are installed which support RTSP.