Tree [c1ed58] master /
History



File Date Author Commit
config.tests 2013-12-16 Miroslav Bendík Miroslav Bendík [fbee70] Added cedarx decoder.
contrib 2013-03-30 wang-bin wang-bin [e03477] d2d: some toolchains need _COM_interface defini...
doc 2014-01-27 wang-bin wang-bin [dd90ab] update README. Add TODO.md and doc about config...
examples 2014-03-18 wang-bin wang-bin [cbb78a] add prefix QtAV to all include to avoid potenti...
i18n 2014-03-16 wang-bin wang-bin [386d23] player: misc
qml 2014-03-16 wang-bin wang-bin [7a13ca] version 1.3.2
qtc_packaging 2014-03-16 wang-bin wang-bin [7a13ca] version 1.3.2
res 2013-12-09 wang-bin wang-bin [d02e04] add HW support & contributors in README. Add m...
scripts 2014-03-02 wang-bin wang-bin [9ae2a3] add cpu usage logging script
src 2014-03-22 wang-bin wang-bin [c1ed58] fix wrong texture size. no align needed
templates 2014-02-08 wang-bin wang-bin [5938bc] virtual VideoRenderer.widget()/graphicsItem() i...
tests 2014-02-02 wang-bin wang-bin [9cee6f] test: add playing from memory example
.gitignore 2012-10-29 wang-bin wang-bin [4583eb] Audio and video works
Changelog 2014-03-16 wang-bin wang-bin [7a13ca] version 1.3.2
QtAV.pro 2014-03-16 wang-bin wang-bin [7a13ca] version 1.3.2
README.md 2014-03-16 wang-bin wang-bin [7a13ca] version 1.3.2
TODO.txt 2013-03-15 wang-bin wang-bin [1b4dc3] Merge branch 'master' into x11
common.pri 2013-09-12 wang-bin wang-bin [37d788] Merge remote-tracking branch 'origin/tmp'
configure.pri 2013-09-09 wang-bin wang-bin [b2b644] correct config.test output dir. issue 28
deploy.pri 2013-06-07 wang-bin wang-bin [6034c4] player: add install target(tv.ini) to bin
gpl-3.0.txt 2012-10-31 wang-bin wang-bin [0def63] misc. copyright, format .etc
lgpl-2.1.txt 2013-02-03 wang-bin wang-bin [d4c178] License change to LGPL v2.1
pack.pri 2014-03-16 wang-bin wang-bin [892b3f] fix make deb error. value in control can not ha...
root.pri 2013-09-25 wang-bin wang-bin [de4909] Merge branch 'text' into filter

Read Me

QtAV

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.

Download binaries from sourceforge

Source code on github

Features

QtAV can meet your most demands

  • Hardware decoding suppprt: DXVA2, VAAPI(buggy now), CedarX(e.g. pcDuino)
  • Seek, pause/resume
  • Video capture in rgb and yuv format
  • OSD and custom filters
  • Aspect ratio
  • Transform video using GraphicsItemRenderer. (rotate, shear, etc)
  • Playing frame by frame (currently support forward playing)
  • Playing speed control. At any speed.
  • Variant streams: locale file, http, rtsp, etc.
  • Playing music
  • Choose audio channel
  • Choose media stream, e.g. play a desired audio track
  • Volume control
  • Multiple render engine support. Currently supports QPainter, GDI+, Direct2D, XV and OpenGL(and ES2).
  • Dynamically change render engine when playing.
  • Multiple video outputs for 1 player
  • Region of interest(ROI), i.e. video cropping
  • Video eq: brightness, contrast, saturation, hue
  • QML support as a plugin. Most playback APIs are compatible with QtMultiMedia module
  • Compatiblity: QtAV can be built with both Qt4 and Qt5. QtAV supports
    both FFmpeg(>=0.9) and Libav.

Extensible Framework (work in progress)

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

For Developers

Requirements

  1. FFmpeg (>=0.9)Latest version is recommanded.

FFmpeg

or Libav (>=0.9) Latest version is recommanded.

Libav

  1. Qt 4 or 5
    Qt
  2. PortAudio v19
    PortAudio LogoPortAudio

or OpenAL OpenAL

The required development files for MinGW can be found in sourceforge
page: depends

Build

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)

How To Write a Player

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()
    }
}

How To Contribute

  • Fork QtAV project on github and make a branch. Commit in that branch, and push, then create a pull request to be reviewed and merged.
  • Create an issue if you have any problem when using QtAV or you find a bug, etc.
  • What you can do: translation, writing document, find or fix bugs, give your idea for this project etc.

Contributors

For End Users

Player Usage

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

Default Shortcuts

  • Double click: fullscreen switch
  • Ctrl+O: open a file
  • Space: pause/continue
  • F: fullscreen on/off
  • I: switch display quality
  • T: stays on top on/off
  • N: show next frame. Continue the playing by pressing "Space"
  • O: OSD
  • P: replay
  • Q/ESC: quit
  • S: stop
  • R: switch aspect ratio
  • M: mute on/off
  • Up / Down: volume + / -
  • Ctrl+Up/Down: speed + / -
  • -> / <-: seek forward / backward
  • Drag and drop a media file to player
  • Crtl+Wheel: zoom in/out

TODO

Read https://github.com/wang-bin/QtAV/wiki/TODO for detail.

Screenshots

Use QtAV in QML with OpenGL shaders(example is from qtmultimedia. But qtmultimedia is replaced by QtAV)

Alt text

QtAV on Mac OS X

Alt text

IP camera using QtAV. OS: Fedora 18 (some developers from Italy http://www.selcomsrl.eu/)

Alt text

QMLPlayer on ubuntu

QMLPlayer

Video Wall

Alt text


软件由我一人利用空余学习和工作时间开发。如果您觉得不错,可以考虑资助一下

What are the financial needs of QtAV?
  • Buy hardware for developing and testing purpose. (lack of AMD card now)

Thanks

Now I have received 1050 RMB(about 160$) and 100$

Alipay

PayPal Paypal

Support via Gittip

Gittip Gittip


Copyright © Wang Bin wbsecg1@gmail.com

Shanghai University->S3 Graphics, Shanghai, China

2013-01-21