I have created a Qt 5.8 web engine based application but unfortunately, the video is not playing in the application.
After coming across many forums I found that I need to build QT with flag proprietary-codec
But this solution comes with the warning: When distributing proprietary codec libraries, you must acquire licenses for them.
Unfortunately, I can't use these proprietary codec libraries.
If I use open source codec libraries do I need to compile QT again with some other flag.
Is there any other solution to this approach.
Unfortunately for mp4 file format using proprietary codecs is the only option (i.e. this includes acquiring licenses to distribute and configuring/building Qt with the option you specified already in your question).
From Qt docs:
Qt WebEngine supports the MPEG-4 Part 14 (MP4) file format only if the required proprietary audio and video codecs, such as H.264 and MPEG layer-3 (MP3), have been enabled.
Related
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.
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.
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.
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.
I would like to capture some sound from the microphone in cpp, in order to use it in a Qt application.
So I'm looking for a multi platform library easily integrable in a Qt4 project.
Qt 4.6 introduces a new, low level suite of audio APIs in the QtMultimedia module. You can use QAudioInput to capture raw audio from a microphone.
At present, this API is implemented for Windows, Mac, and Linux (supporting PULSE and ALSA audio subsystems). Support for other platforms, including Symbian in the mobile space, is currently under development.
OpenAL is a good, cross-platform C++ library for capturing audio.