Is it possible to create a .mp4 container with Qt Multimedia or some other Qt APIs ?
I understand that Qt does not have encoding APIs, BUT if I've a library helping me to encode & decode, then can I use Qt to create the MP4 container and the additional third party library to encode video data into it ?
Qt (version 5.9.2 or earlier) does not have support for creating or writing to .mp4 files.
You might be able to do this with a third party add-on QtGstreamer
Related
Currently i'm using opencv (have an option to use QT as well) to play a video file (player) in full screen mode. My requirement is when i'm playing videofile-1 there could a request to play video file-2 and i need to switch to video file-2 seamlessly. Is it possible to do this in opencv or QT ? I know we can do this using RTSP or HTTP streaming.
OpenCV uses cv2.VideoCapture() to read from videofile and cv2.imshow() to project image/video to display. What are you doing between those you it is your choice, so answering your question I guess it's possible.
How to disable QMediaPlayer autoload subtitles with DirectVobSub which is tools of K-Lite Codec Pack? i don't want to show subtitle in QMediaPlayer if the subtitle file be in same directory of the video file?
Answer
As QMediaPlayer relies on external frameworks for rendering video, it has limited control over how those frameworks decide to render it. In this case, as George Y. mentioned, the subtitles are probably not possible to control without resorting to win32 API.
Another option might be investigating options for controlling which codecs are preferred, and perhaps ship codecs with your application that does not render the subtitles.
You have to unset the flag GST_PLAY_FLAG_TEXT on playbin2 in the file qgstreamerplayersession.cpp, build the plugin and use it. The flag is on by default. In Qt 5.2 the you will find the file at qtmultimedia/src/plugins/gstreamer/mediaplayer. The file location may be different for the older 4.x versions.
I am really new to Qt development as well as audio codecs. I recently found a way to play mp3 sound using QSound. I want to play it in my qt project using QAudioOutput, but there is no mp3 codec in QAudioDeviceInfo::supportedCodecs().
I tried install mp3 codec but it is still not listed in QAudioDeviceInfo::supportedCodecs(). How can I add a codec to QAudioDeviceInfo::supportedCodecs()?
By definition QAudioDeviceInfo provides an interface to query audio devices and their functionality. Which means any codec returned by QAudioDeviceInfo::supportedCodecs() is a codec format the device is able to play directly, and will be probably be raw audio format like pcm. On the other hand mp3 need to go through a software decoder first, so It will not be in this list.
Take a look at the Media Player example for a reference. It should be able to play mp3 and other formats. The project should be available in the Qt source or installation directory in your machine, either under the folder demo or examples.
It seems from the source that it does lot more than just barely playing audio. So focus on the constructor of the class Player as well as the method Player::addToPlaylist()
ps :I speak in conditional tense because I am more familiar with Qt 4 than Qt 5.
EDIT:
As long as windows media player cannot play mp3, you will not have full mp3 support in your Qt app, and the Player example I gave you will not work either. Download some codecs in your system till Windows media player can play mp3.
I want to create a qt application similar to Audacity that can run on mobile. Al that I want at the moment is the ability to change volume levels, pitch and tempo. I also want the ability to select, copy and paste parts of the audio file.
Do any of you know a API, SDK or something for Qt that would allow this?
All built in stuff I could find in Qt is QtMultimedia which allows me to import a audio file and then play it but it doesn't seem to have editing(except for bitrate, channel, etc.) or manipulation.
This is for Symbian, and can be built on windows or kubuntu.
Use one of the audio backends:
Audio plugins
Audio backends implement QAudioInput, QAudioOutput, QAudioDeviceInfo and QSoundEffect
Here is the list of the current audio backends:
Windows Multimedia
CoreAudio (Mac OS / iOS)
PulseAudio (Unix)
Alsa (Unix)
OpenSL ES (Android)
QNX
Only PulseAudio, CoreAudio, and QNX backends are actual plugins. The other backends are “#ifdef’ed” in the related classes.
References
Qt 5.4 Multimedia Backends
Qt 5.5.0 Multimedia Backends
Is it possible to handle different type of archive (zip,rar,7z,tar,) using qt framework ?
see: How to compress data with Qt? | Qt Developer Network