QtAV is a media playing library based on Qt and FFmpeg. It can help you to write a player
with less effort than ever before.
QtAV has been added to FFmpeg projects page http://ffmpeg.org/projects.html
QtAV is free software licensed under the term of LGPL v2.1. The player example is licensed under GPL v3. If you use QtAV or its constituent libraries,
you must adhere to the terms of the license in question.
QtAV can meet your most demands
QtAV currently uses FFmpeg to decode video, convert image and audio data, and uses PortAudio to play
sound. Every part in QtAV is designed to be extensible. For example, you can write your decoder, audio output for particular platform. Here is a very good example to add cedar hardware accelerated decoder for A13-OLinuXino
or Libav (>=0.9) Latest version is recommanded.
or OpenAL
The required development files for MinGW can be found in sourceforge
page: depends
You can build QtAV with many compilers and on many platforms. You can use gcc, clang, vc to compile it.
See the wiki Build QtAV and QtAV Build Configurations
Here is a brief guide:
It's recommend not to build in source dir.
cd your_build_dir
qmake QtAV_project_dir/QtAV.pro
make
qmake will run check the required libraries at the first time, so you must make sure those libraries can be found by compiler.
Then qmake will create a cache file .qmake.cache in your build dir. Cache file stores the check results, for example, whether portaudio is available. If you want to recheck, run qmake QtAV_project_dir/QtAV.pro -config recheck
WARNING: If you are in windows mingw with sh.exe environment, you may need run qmake twice.(ISSUE #18)
Wrtie a media player using QtAV is quite easy.
WidgetRenderer renderer;
renderer.show();
AVPlayer player;
player.setRenderer(&renderer);
player.play("test.avi");
For more detail to using QtAV, see the wiki Use QtAV In Your Project or examples.
QtAV can also be used in Qml
import QtQuick 2.0
import QtAV 1.3
Item {
VideoOut {
anchors.fill: parent
source: player
}
AVPlayer { //or MediaPlayer
id: player
source: "test.mp4"
}
MouseArea {
anchors.fill: parent
onClicked: player.play()
}
}
An simple player can be found in examples. The command line options is
player [-ao null] [-vo qt|gl|d2d|gdi|xv] [-vd "dxva[;vaapi[;ffmpeg]]"] [--ffmpeg-log] [url|path|pipe:]
To disable audio output, add -ao null
Choose a render engine with -vo option(default is OpenGL). For example, in windows that support Direct2D, you can run
player -vo d2d filename
To select decoder, use -vd
option. Value can be dxva, vaapi and ffmpeg, or a list separated by ;
in priority order. For example:
player -vd "dxva;ffmpeg" filename
will use dxva if dxva can decode, otherwise ffmpeg will be used.
QMLPlayer has less options now. To use DXVA decoder:
QMLPlayer-vd "DXVA;FFmpeg" filename
Read https://github.com/wang-bin/QtAV/wiki/TODO for detail.
Use QtAV in QML with OpenGL shaders(example is from qtmultimedia. But qtmultimedia is replaced by QtAV)
QtAV on Mac OS X
IP camera using QtAV. OS: Fedora 18 (some developers from Italy http://www.selcomsrl.eu/)
QMLPlayer on ubuntu
Video Wall
软件由我一人利用空余学习和工作时间开发。如果您觉得不错,可以考虑资助一下
Thanks
Now I have received 1050 RMB(about 160$) and 100$
Copyright © Wang Bin wbsecg1@gmail.com
Shanghai University->S3 Graphics, Shanghai, China
2013-01-21