Skip to content

Commit

Permalink
version 1.4.2 2014-12-27
Browse files Browse the repository at this point in the history
Changelog:
- Async load
- Faster seek and preview. Thanks wm4(mpv developer)
- Better a/v sync solution. Now can play high fps video better than ANY
other players.
- DXVA: enable HEVC decoder if libavcodec runtime supports. LAVFilters
ffmpeg supports it.
- Cedarv improvements, nv12 output support, neon code from libvdpau-
sunxi
- Multiple OpenAL instances support
- AVInput class to extend media sources. Support play from qrc resouces.
- Display the first frame after seek
- Better clock error correction
- Fix play frame by frame issues
- Fix QML video shake
- More details for error signals
- Apply user options in the next playback
- Dynamic load libass (submodule 'capi' is required)
- VA-API: fix blurred bottom line issue. works on libav >= 9 now.
- Progress is start at 0 by default even if 1st pts is not 0.
- Fix capture issues: capture current displayed frame, easier api
- RGB48 support. OpenGL only supports RGB48LE.
- Link to static ffmpeg support
- Fix open error if input url/path contains special charactors
  • Loading branch information
wang-bin committed Dec 27, 2014
1 parent 2c5f3f6 commit fa6df7e
Show file tree
Hide file tree
Showing 14 changed files with 201 additions and 129 deletions.
25 changes: 25 additions & 0 deletions Changelog
Original file line number Diff line number Diff line change
@@ -1,3 1,28 @@
version 1.4.2 2014-12-27

Changelog:
- Async load
- Faster seek and preview. Thanks wm4(mpv developer)
- Better a/v sync solution. Now can play high fps video better than ANY other players.
- DXVA: enable HEVC decoder if libavcodec runtime supports. LAVFilters ffmpeg supports it.
- Cedarv improvements, nv12 output support, neon code from libvdpau-sunxi
- Multiple OpenAL instances support
- AVInput class to extend media sources. Support play from qrc resouces.
- Display the first frame after seek
- Better clock error correction
- Fix play frame by frame issues
- Fix QML video shake
- More details for error signals
- Apply user options in the next playback
- Dynamic load libass (submodule 'capi' is required, https://github.com/wang-bin/capi)
- VA-API: fix blurred bottom line issue. works on libav >= 9 now.
- Progress is start at 0 by default even if 1st pts is not 0.
- Fix capture issues: capture current displayed frame, easier api
- RGB48 support. OpenGL only supports RGB48LE.
- Link to static ffmpeg support
- Fix open error if input url/path contains special charactors


version 1.4.1 2014-11-06

Changelog:
Expand Down
36 changes: 14 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 31,7 @@ QtAV can meet your most demands
- Multiple video outputs for 1 player
- Region of interest(ROI), i.e. video cropping
- Video eq(software and OpenGL): brightness, contrast, saturation, hue
- QML support. Most playback APIs are compatible with QtMultiMedia module
- QML support. Most playback APIs are compatible with QtMultimedia module
- Compatiblity: QtAV can be built with both Qt4 and Qt5. QtAV supports
both FFmpeg(>=1.0) and [Libav](http://libav.org) (>=9.0). Latest FFmpeg release is recommended.

Expand All @@ -47,10 47,10 @@ QtAV can meet your most demands

[![Qt](http://qt-project.org/images/qt13a/Qt-logo.png "Qt4.8 or Qt5")](http://qt-project.org)
[![FFmpeg](http://ffmpeg.org/ffmpeg-logo.png "(>=1.0)Latest version is recommanded")](http://ffmpeg.org)
![OpenAL](http://upload.wikimedia.org/wikipedia/zh/2/28/OpenAL_logo.png "OpenAL or OpenAL soft")
![OpenAL](http://upload.wikimedia.org/wikipedia/zh/2/28/OpenAL_logo.png "OpenAL or OpenAL soft")
[![Libav](http://libav.org/libav-logo-text.png ">=9.0")](http://libav.org)
[![PortAudio](http://www.portaudio.com/images/portaudio_logotext.png)](http://www.portaudio.com)

Latest FFmpeg, Qt5 and OpenAL releases are preferred.

**The required development files for MinGW can be found in sourceforge
Expand Down Expand Up @@ -79,17 79,13 @@ QtAV can also be used in **Qml**
import QtQuick 2.0
import QtAV 1.4
Item {
VideoOutput {
anchors.fill: parent
source: player
}
AVPlayer { //or MediaPlayer
id: player
Video {
id: video
source: "test.mp4"
}
MouseArea {
anchors.fill: parent
onClicked: player.play()
onClicked: video.play()
}
}

Expand All @@ -101,15 97,13 @@ QtAV can also be used in **Qml**

#### Contributors

- Wang Bin(Lucas Wang) <[email protected]>: creator, maintainer
- Gianluigi Tiesi: avdevice input support
- Alexander
- skaman: aspect ratio from stream
- Stefan Ladage <[email protected]>: QIODevice support. Wiki about build QtAV for iOS. Let OpenAL work on OSX and iOS
- Miroslav Bendik <[email protected]>: Cedarv support. Better qmlvideofx appearance
- Dimitri E. Prado <[email protected]>: issue 70
- theoribeiro <[email protected]>: initial QML support
- Vito Covito <[email protected]>: interrupt callback
- Wang Bin(Lucas Wang): creator, maintainer
- Gianluigi Tiesi(sherpya): avdevice input support
- Stefan Ladage: QIODevice support. Wiki about build QtAV for iOS. Let OpenAL work on OSX and iOS
- Miroslav Bendik: Cedarv support. Better qmlvideofx appearance
- theoribeiro: initial QML support
- Vito Covito: interrupt callback
- Alexander, Marius Wachtler, Petar Koretić, Sandro Cavazzoni(skaman), Dimitri E. Prado, karlox ...

For End Users
-------------
Expand Down Expand Up @@ -166,8 160,6 @@ Use QtAV in QML with OpenGL shaders(example is from qtmultimedia. But qtmultimed

![QMLPlayer](http://www.qtav.org/screenshots/QMLPlayer-preview-ubuntu.jpg "QMLPlayer")

Video Wall

![Alt text](http://www.qtav.org/screenshots/videowall.png "video wall")


Expand All @@ -187,4 179,4 @@ Video Wall
> Shanghai University->S3 Graphics->Deepin, Shanghai, China
> 2013-01-21
> 2013-01-21
221 changes: 136 additions & 85 deletions doc/BuildQtAV.md
Original file line number Diff line number Diff line change
@@ -1,85 1,136 @@
## 1. Setup the environment

QtAV depends on FFmpeg, PortAudio and some other optional libraries such as direct2d and xvideo.
You can download FFmpeg and PortAudio development files for windows from [QtAV sourceforge page](https://sourceforge.net/projects/qtav/files/depends)
You can also download FFmpeg development files for windows from [Zeranoe](http://ffmpeg.zeranoe.com/builds)
Or you can build them your self [Compile FFmpeg and PortAudio](https://github.com/wang-bin/QtAV/wiki/Compile-FFmpeg-and-PortAudio)

You *MUST* let your compiler know where FFmpeg headers and libraries are. Otherwise you will get an error when running qmake. If they are already be where they should be, just skip this step.

vc compiler will search headers in __*INCLUDE*__ and search libraries in __*LIB*__, so you can set the environment like below if your compile in command line

set INCLUDE=ffmpeg_path\include;portaudio_path\include;%INCLUDE%
set LIB=ffmpeg_path\lib;portaudio_path\lib;%LIB%

GCC will search headers in environment var __*CPATH*__ and libraries in __*LIBRARY_PATH*__. So you can set those vars to include your FFmepg and PortAudio dir.

gcc in unix shell environment(including mingw with sh.exe):

export CPATH=ffmpeg_path/include:portaudio_path/include:$CPATH
export LIBRARY_PATH=ffmpeg_path/include:portaudio_path/lib:$LIBRARY_PATH

The project includes libQtAV.pri will not add linking options about FFmpeg etc., so the linker may find the depended libraries from $LD_LIBRARY_PATH:

export LD_LIBRARY_PATH=ffmpeg_path/lib:portaudio_path/lib:$LD_LIBRARY_PATH

gcc in windows cmd environment without sh.exe

set CPATH=ffmpeg_path\include;portaudio_path\include;%CPATH%
set LIBRARY_PATH=ffmpeg_path\lib;portaudio_path\lib;%LIBRARY_PATH%

If you are building in QtCreator, goto QtCreator's 'Projects' page and add or append those environment.

## 2. Run qmake

For most platforms, just

qmake
make

It's strongly 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, you can either delete _**.qmake.cache**_ and run qmake again, or run

qmake QtAV_source_dir/QtAV.pro CONFIG =recheck


_WARNING_: If you are in windows mingw with sh.exe environment, you may need run qmake twice. I have not find out the reason!

## 3. Make

use make, jom, nmake or QtCreator to build it.



## Build in Windows

You MUST setup the environment before qmake as mention at the beginning.

#### Build In Visual Studio

I don't put any vs project file in QtAV, because it's easy to create by qmake.

Open cmd

qmake -r -tp vc QtAV.pro

Then sln and vcxproj(vcproj) files will be created. Open QtAV.sln in your Visual Studio, Compile it.

Another solution is using Qt vs plugin. It will help you to load qmake projects(not tested).

#### Build In QtCreator With MSVC

QtCreator will detect VC compiler if it is installed. So it's easy to build in QtCreator


#### Build in Command Line VC

I have got VC compiler and win sdk from latest VS2012 Update1. You can download it from http://qtbuild.googlecode.com/files/vs2012-x86.7z

The environment is small but has the almost complete functionality for developing C . At least it can build Qt.
## 0. Prerequisites

Get QtAV source code

git clone https://github.com/wang-bin/QtAV.git
git submodule update --init


FFmpeg (>=1.0) or Libav (>=9.0) is always required. The latest FFmpeg release is recommended (that's what i use). If you use libav, you vaapi can not work in C apps and libavfilter does not work.

You can download precompiled FFmpeg from [QtAV sourceforge page](https://sourceforge.net/projects/qtav/files/depends/FFmpeg), or if you are using Windows you can also download FFmpeg development files from [Zeranoe](http://ffmpeg.zeranoe.com/builds).

Another option is to build FFmpeg yourself. See [FFmpeg compilation guides](http://trac.ffmpeg.org/wiki/CompilationGuide) for some pointers.

Other requirements are:

#### Windows

PortAudio or OpenAL.

#### OS X, iOS

None. System's OpenAL is used

#### Android

OpenAL with OpenSL backend. Currently OpenSL code doesn't work correctly, but OpenAL works fine.

#### Ubuntu

OpenAL. To enable all supported features, you must install XVideo and VA-API dev packages.

sudo apt-get install libopenal-dev libva-dev libxv-dev

You may have to install VA-API drivers to make VA-API available at runtime. See https://github.com/wang-bin/QtAV/wiki/Enable-Hardware-Decoding


## 1. Setup the environment

You **MUST** let your compiler know where FFmpeg headers and libraries are. Otherwise you will get an error when running qmake. If they are already be where they should be, just skip this step.

Choose one of the following methods.

#### (Recommended) Put FFmpeg headers and libs into Qt directories

This is the simplest and best way to let compilers find ffmpeg and other depend libraries. Qt header dir and library dir is always be searched. This should work for all platforms, including android, iOS and meego.

#### Use Environment Vars

On Windows, Visual Studio will search headers in `%INCLUDE%` and search libraries in `%LIB%`, so you can set the environment like below if your compile in command line:

set INCLUDE=ffmpeg_path\include;portaudio_path\include;%INCLUDE%
set LIB=ffmpeg_path\lib;portaudio_path\lib;%LIB%

GCC will search headers in environment variables `$CPATH` and libraries in `$LIBRARY_PATH`. So you can set those vars to include your FFmepg and PortAudio dir.

gcc in unix shell environment(including mingw with sh.exe):

export CPATH=ffmpeg_path/include:portaudio_path/include:$CPATH
export LIBRARY_PATH=ffmpeg_path/lib:portaudio_path/lib:$LIBRARY_PATH

The project includes libQtAV.pri will not add linking options about FFmpeg etc., so the linker may find the dependent libraries from $LD_LIBRARY_PATH:

export LD_LIBRARY_PATH=ffmpeg_path/lib:portaudio_path/lib:$LD_LIBRARY_PATH

GCC on windows cmd.exe environment without UNIX Shell:

set CPATH=ffmpeg_path\include;portaudio_path\include;%CPATH%
set LIBRARY_PATH=ffmpeg_path\lib;portaudio_path\lib;%LIBRARY_PATH%

If you are building in QtCreator, goto QtCreator's 'Projects' page and add or append those environment.

![QtCreator Settings](http://wang-bin.github.io/qtav.org/images/qtc-set.jpg "QtCreator Settings")

## 2. Run qmake

For most platforms, just

qmake
make

It's strongly recommend not to build in source dir.

mkdir your_build_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, you can either delete `.qmake.cache` and run qmake again, or run

qmake QtAV_source_dir/QtAV.pro CONFIG =recheck

_WARNING_: If you are in windows mingw with sh.exe environment, you may need run qmake twice. I have not found out the reason behind this phenomenon.

## 3. Make

use make, jom, nmake or QtCreator to build it.


### Build on Windows

You MUST setup the environment before qmake as mention at the beginning.

#### Build in Visual Studio

I don't put any vs project file in QtAV, because it's easy to create by qmake.

Open cmd

qmake -r -tp vc QtAV.pro

Then sln and vcxproj(vcproj) files will be created. Open QtAV.sln in your Visual Studio, Compile it.

Another solution is using Qt vs plugin. It will help you to load qmake projects(not tested).

#### Build In QtCreator With MSVC

QtCreator will detect VC compiler if it is installed. So it's easy to build in QtCreator


#### Build in Command Line VC

I have got VC compiler and win sdk from latest VS2012 Update1. You can download it from http://qtbuild.googlecode.com/files/vs2012-x86.7z

The environment is small but has the almost complete functionality for developing C . At least it can build Qt.


## Build Debian Packages

run

debuild -us -uc

in QtAV source tree
2 changes: 1 addition & 1 deletion examples/QMLPlayer/qml/QMLPlayer/About.qml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 18,7 @@ Page {
font.pixelSize: Utils.scaled(14)
onContentHeightChanged: parent.height = contentHeight 2*anchors.margins
onLinkActivated: Qt.openUrlExternally(link)
text: "<h3>QMLPlayer based on QtAV 1.4.1 </h3>"
text: "<h3>QMLPlayer based on QtAV 1.4.2 </h3>"
"<p>Distributed under the terms of LGPLv2.1 or later.</p>"
"<p>Copyright (C) 2012-2014 Wang Bin (aka. Lucas Wang) <a href='mailto:[email protected]'>[email protected]</a></p>"
"<p>Shanghai University->S3 Graphics->Deepin, Shanghai, China</p>"
Expand Down
15 changes: 12 additions & 3 deletions examples/QMLPlayer/qml/QMLPlayer/main.qml
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 89,9 @@ Rectangle {
onStopped: control.setStopState()
onPaused: control.setPauseState()
onError: {
if (error != MediaPlayer.NoError)
msg.text = errorString
if (error != MediaPlayer.NoError) {
msg.error(errorString)
}
}
}

Expand All @@ -105,7 106,7 @@ Rectangle {
subtitleLabel.text = text
}
onLoaded: {
msg.text = qsTr("Subtitle") ": " path.substring(path.lastIndexOf("/") 1)
msg.info(qsTr("Subtitle") ": " path.substring(path.lastIndexOf("/") 1))
console.log(msg.text)
}
onSupportedSuffixesChanged: {
Expand Down Expand Up @@ -154,6 155,14 @@ Rectangle {
interval: 2000
onTriggered: msg.visible = false
}
function error(txt) {
styleColor = "red"
text = txt
}
function info(txt) {
styleColor = "green"
text = txt
}
}
ControlPanel {
id: control
Expand Down
2 changes: 1 addition & 1 deletion examples/player/player.pro
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 2,7 @@ TEMPLATE = app
QT = opengl
greaterThan(QT_MAJOR_VERSION, 4): QT = widgets
TRANSLATIONS = res/player_zh_CN.ts
VERSION = 1.4.2
VERSION = $$QTAV_VERSION

STATICLINK = 0
PROJECTROOT = $$PWD/../..
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 2,8 @@
<Package>
<DisplayName>Development files</DisplayName>
<Description>Install QtAV headers and lib.</Description>
<Version>1.4.1-0</Version>
<ReleaseDate>2014-11-06</ReleaseDate>
<Version>1.4.2-0</Version>
<ReleaseDate>2014-12-27</ReleaseDate>
<Name>com.qtav.product.dev</Name>
<Default>script</Default>
<Script>installscript.qs</Script>
Expand Down
Loading

0 comments on commit fa6df7e

Please sign in to comment.