diff --git a/README.md b/README.md index fc5dc624e..9896a2690 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# [QtAV](https://sourceforge.net/projects/qtav) +# [QtAV](http://wang-bin.github.io/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. @@ -9,6 +9,7 @@ QtAV has been added to FFmpeg projects page [http://ffmpeg.org/projects.html](ht you must adhere to the terms of the license in question.** +#### [Web site](http://wang-bin.github.io/QtAV) #### [Download binaries from sourceforge](https://sourceforge.net/projects/qtav) #### [Source code on github](https://github.com/wang-bin/QtAV) @@ -16,7 +17,7 @@ you must adhere to the terms of the license in question.** QtAV can meet your most demands -- Hardware decoding suppprt: DXVA2, VAAPI(buggy now), CedarX(e.g. pcDuino) +- Hardware decoding suppprt: DXVA2, VAAPI(buggy now), CedarX(e.g. pcDuino), CUDA(the 1st player support CUDA on linux?) - Seek, pause/resume - Video capture in rgb and yuv format - OSD and custom filters @@ -34,6 +35,7 @@ QtAV can meet your most demands - Multiple video outputs for 1 player - Region of interest(ROI), i.e. video cropping - Video eq: brightness, contrast, saturation, hue +- Support renderering 16-bit YUV (e.g. Hi10P) using OpenGL and OpenGL ES2. (The 1st player/library support in ES2? VLC, XBMC, mplayer does not support now) - 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](http://libav.org). @@ -91,7 +93,7 @@ _WARNING_: If you are in windows mingw with sh.exe environment, you may need run Wrtie a media player using QtAV is quite easy. - WidgetRenderer renderer; + GLWidgetRenderer renderer; renderer.show(); AVPlayer player; player.setRenderer(&renderer); @@ -105,7 +107,7 @@ QtAV can also be used in **Qml** import QtQuick 2.0 import QtAV 1.3 Item { - VideoOut { + VideoOutput { anchors.fill: parent source: player } @@ -141,7 +143,7 @@ For End Users 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:] + player [-ao null] [-vo qt|gl|d2d|gdi|xv] [-vd "dxva[cuda[;vaapi[;ffmpeg]]]"] [--ffmpeg-log] [url|path|pipe:] To disable audio output, add `-ao null` @@ -178,8 +180,8 @@ QMLPlayer has less options now. To use DXVA decoder: - Up / Down: volume + / - - Ctrl+Up/Down: speed + / - - -> / <-: seek forward / backward -- Drag and drop a media file to player - Crtl+Wheel: zoom in/out +- Drag and drop a media file to player # TODO diff --git a/doc/CompileFFmpegAndPortAudioWithMSVC.md b/doc/CompileFFmpegAndPortAudioWithMSVC.md index 97e4dbe2c..e47091b0f 100644 --- a/doc/CompileFFmpegAndPortAudioWithMSVC.md +++ b/doc/CompileFFmpegAndPortAudioWithMSVC.md @@ -1,14 +1,54 @@ -## Build FFmpeg With MSVC +## FFmpeg Build Script -The difficulty is compiling FFmpeg with msvc. The method can be found on the internet. But there is an easier way. When compiling the latest version of FFmpeg with mingw gcc, the *.lib are also created and installed in /usr/local/bin, which can be linked by msvc. -For other libraries compiled with mingw gcc, we can link them in a similar way. I introduce how to use the portaudio library created by mingw gcc. If you compile portaudio with mingw gcc, portaudio.lib file will not be created. So we should create it manually. But the def file can be found in lib/.lib, it will not be installed by default. There is a powerful tool named _dlltool_, with which we can create a lib from a def file for vc, using the following command -`dlltool -m i386 -d libportaudio-2.dll.def -l portaudio.lib -D libportaudio-2.dll` -Then put portaudio.lib into /usr/local/lib and it will be found when linking. -The compiled libraries with msvc support can be found [here](https://sourceforge.net/projects/qtav/files/depends) +I write a script to simplify the build. The script is in QtAV/scripts/build_ffmpeg.sh. It supports mingw gcc, msvc(2013), android, maemo5, maemo6(meego), sailfish os etc. Just put the script in ffmpeg source tree and run + ./build_ffmpeg.sh + +To cross build for android, maemo etc, you have to set some vars, for example NDK_ROOT for android. The vars can be set in config-android.sh, config-maemo5.sh etc. + +#### Install + + make install prefix=some_dir + +ref: http://ffmpeg.org/platform.html#Microsoft-Visual-C_002b_002b-or-Intel-C_002b_002b-Compiler-for-Windows + +## Build with VC + +Open vs prompt, go to msys' bin dir and run + + sh --login -i + +Then your are ready to use bash environment and with VC environment. Then go to ffmpeg source dir and run './build_ffmpeg.sh vc' + +if get error about gawk, just ignore `make -ki` + +## Additional Tools for Windows + +Your msys may lack of some command line tools that ffmpeg build system needs, such as pr, od, install, pkg-config, nasm. You can download one of build-ffmpeg-win-additinal-tools_msys2/gnuwin32.7z here: https://sourceforge.net/projects/qtav/files/depends/ + +extract and append it's bin dir to PATH. then you can build ffmpeg with gcc or vc. + +If you build with vc and not vs2013, you have to download [c99wrap](https://github.com/libav/c99-to-c89/) + + +## Use MinGW libraries in VC + +If we build FFmpeg using mingw gcc, the `*,lib` are also created and installed in /usr/local/bin. So VC linker can use those. `*,lib` are generated by vc toolchain's `lib.exe` and `link.exe` if they are found. Otherwise `dlltool` is used. You may need additional link flag `/SAFESEH:NO` when linking to libs created by dlltool to avoid link error. + +If gcc does not create `*.lib`, for example, portaudio, then you can do it yourself. + + dlltool -m i386 -d libportaudio-2.dll.def -l portaudio.lib -D libportaudio-2.dll + +the def file can be found in lib/.lib for portaudio ## Build PortAudio +cmake is recommended. It's not difficult. + + ## Build QtAV https://github.com/wang-bin/QtAV/wiki/Build-QtAV + + +[prebuilt FFmpeg+portuaido](https://sourceforge.net/projects/qtav/files/depends) \ No newline at end of file diff --git a/doc/TODO.md b/doc/TODO.md index 4207c0b28..3831a7a02 100644 --- a/doc/TODO.md +++ b/doc/TODO.md @@ -1,20 +1,25 @@ #### MISC - LOGO! - qtav.org website -- Enable all features using my another project(libswresample tested): https://github.com/wang-bin/dllapi +- Enable all features using my another project(libswresample and cuda tested): https://github.com/wang-bin/dllapi - SDK document(doxygen seems greate) +- 3 level API like OpenMAX + * AL: use AVPlayer, VideoRenderer is enought + * IL: use codec, demuxer, renderer etc + * DL: private headers required. e.g. implement decoder - ring buffer instead of queue - tests and benchmark - meta data - component model, plugin - filter factory and manager - sws filter and other apis. cpu flags. see vlc/modules/video_chroma/swscale.c +- blu-ray #### Platform Support -- Maemo: can build now. No QtQuick support -- Android: Can build now. Need OpenSL. +- Maemo: audio not work now +- Android: no audio now. Need OpenSL. - Raspberry Pi -- iOS +- iOS: improve OpenAL - Black Berry - WinRT. Win8 app - debian PPA @@ -32,7 +37,7 @@ ####Rendering -- Use OpenGL shaders if possible. Currently is only available for ES2. But most desktop OpenGL support shaders. +- Rendering YUV with GLSL for QML. - Redesign VideoFrame class to support buffers in both device and host. Thus no copy required. e.g. DXVA, VAAPI has direct rendering api. ref: qtmmwidgets - OpenVG or GL text renderering, dwrite text renderering @@ -41,6 +46,7 @@ ref: qtmmwidgets #### Filters - Integrate libavfilter - Write some hardware accelerated filters using OpenCL/GLSL/CUDA. For example, stero 3d, yuv<->rgb, hue/contrast/brightness/gamma/sharp +- OpenCL, GLSL shader(use FBO) based filter chain. User can add custom cl/shaders - Audio filters - IPP - DShow filters support(mplayer dsnative?) @@ -56,7 +62,7 @@ ref: qtmmwidgets - config module and a gui one #### Hardware decoding -- Cuda support. Continue the work on `cuda` branch +- Better CUDA support. No CPU copy, all done in gpu from decoding to filtering to renderering. - DXVA HD - SSE4 optimized copy. Ref: VLC - OMX diff --git a/doc/UsingPipe.md b/doc/UsingPipe.md index 08d7859cf..c28768a94 100644 --- a/doc/UsingPipe.md +++ b/doc/UsingPipe.md @@ -8,4 +8,11 @@ It also supports streams from file number 'number' can be 0, 1, 2, .... 0 is stdin, 1 is stdout and 2 is stderr. If 'number' is empty, it means stdin. +Using pipe in AVPlayer class is almost the same. Just use "pipe:N" as file name. + +#### Named Pipe + + player \\.\pipe\name + + FFmpeg is powerful, do you think so? \ No newline at end of file diff --git a/src/QtAV_Global.cpp b/src/QtAV_Global.cpp index dcd67bd8f..3581d6442 100644 --- a/src/QtAV_Global.cpp +++ b/src/QtAV_Global.cpp @@ -148,10 +148,10 @@ QString aboutQtAV_HTML() "

" + QObject::tr("A media playing library base on Qt and FFmpeg.\n") + "

" "

" + QObject::tr("Distributed under the terms of LGPLv2.1 or later.\n") + "

" "

Copyright (C) 2012-2014 Wang Bin (aka. Lucas Wang) wbsecg1@gmail.com

\n" - "

" + QObject::tr("Shanghai University->S3 Graphics, Shanghai, China\n") + "

" + "

" + QObject::tr("Shanghai University->S3 Graphics, Shanghai, China") + "

\n" "

" + QObject::tr("Donate") + ": http://wang-bin.github.io/QtAV#donate

\n" "

" + QObject::tr("Source") + ": https://github.com/wang-bin/QtAV

\n" - "

" + QObject::tr("Downloads") + ": https://sourceforge.net/projects/qtav

"; + "

" + QObject::tr("Web Site") + ": http://wang-bin.github.io/QtAV

"; return about; }