Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
A media playing framework based on Qt and FFmpeg. It helps you to write a player easily. 基于Qt和FFmpeg的音视频播放框架

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
config.tests
contrib/d2d1headers
doc
examples
i18n
qtc_packaging
res
scripts
src
templates
tests
.gitignore
Changelog
QtAV.pro
README.md
TODO.txt
common.pri
configure.pri
deploy.pri
gpl-3.0.txt
lgpl-2.1.txt
pack.pri
root.pri

README.md

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. Currently only a simple player is supplied. I will write a stylish one based on QtAV in the feature.

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. 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

  • Seek, pause/resume
  • Video capture
  • OSD
  • Aspect ratio
  • Transform video using GraphicsItemRenderer. (rotate, shear, etc)
  • Playing frame by frame (currently support forward playing)
  • Variant streams: locale file, http, rtsp, etc.
  • Playing music (not perfect)
  • Volume control
  • Fullscreen, stay on top
  • Compatible: QtAV can be built with both Qt4 and Qt5. QtAV will support both FFmpeg and Libav.
  • Multiple render engine support. Currently supports QPainter, GDI+, Direct2D, XV and OpenGL.

Extensible Framework (not finished)

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 audio output class using OpenAL, image converting class using cuda to get better performance etc. These features will be added in the feature by default.

For Developers

Requirements

  1. FFmpeg Latest version is recommanded.
    FFmpeg
  2. Qt 4 or 5
    Qt
  3. PortAudio v19
    PortAudio LogoPortAudio

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

Here is a brief guide:

It's recommend not to build in source dir.

cd your_build_dir
qmake QtAV_source_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, delete .qmake.cache and run qmake again

WARNING: If you are in windows mingw with sh.exe environment, you may need run qmake twice.

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

For End Users

Player Usage

An simple player can be found in examples. The command line options is

player [-vo qt|gl|d2d|gdi|xv] [url/path]filename

You can choose a paint engine with -vo option. For example, in windows that support Direct2D, you can run

player -vo d2d filename

The default is Qt's paint engine.

Default Shortcuts

  • Ctrl+O: open a file
  • Space: pause/continue
  • F: fullscreen on/off
  • 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 + / -
  • -> / <-: seek forward / backward
  • Drag and drop a media file to player

The default behavior can be replaced by subclassing QObject and call void AVPlayer::setPlayerEventFilter(QObject *obj) (use null to disable).

TODO

  1. Component framework
  2. Subtitle
  3. Filters
  4. Hardware acceleration using DirectX, NVIDIA Cuda, ATI UVD, Intel IPP, OpenCL and OpenGL:
    • decoding: DXVA, XvBA, cuvid
    • image, audio and filters
    • rendering: DirectX, XV, OpenGL
  5. Stylish GUI based on Qt Graphics View Framework
  6. Document and SDK
  7. Other: play speed, better sync method and seeking, tests, playing statistics, etc.
  8. Region of interest support.
  9. More platform support. Maemo, Android, iOS, BB10 etc. Depends on Qt and FFmpeg for those platforms.
  10. Try to write decoders myself.

Screenshots

QtAV on Win8

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

Rotate a video item

Alt text

Video Wall

Alt text

Copyright © Wang Bin wbsecg1@gmail.com

Shanghai University, Shanghai, China

2013-01-21

Something went wrong with that request. Please try again.