wang-bin / qtav Goto Github PK
View Code? Open in Web Editor NEWA cross-platform multimedia framework based on Qt and FFmpeg. 基于Qt和FFmpeg的跨平台高性能音视频播放框架. Recommand to use new sdk https://github.com/wang-bin/mdk-sdk
Home Page: http://qtav.org
A cross-platform multimedia framework based on Qt and FFmpeg. 基于Qt和FFmpeg的跨平台高性能音视频播放框架. Recommand to use new sdk https://github.com/wang-bin/mdk-sdk
Home Page: http://qtav.org
the logic for both AudioThread::run() and VideoThread::run() are almost the same. So can we just use the common AVThread::run() and just add some functions in run() to be implemeneted in AudioThread and VideoThread? Then the code will always keep the same logic.
--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/1301061-template-for-avthread-run?utm_campaign=plugin&utm_content=tracker%2F307703&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F307703&utm_medium=issues&utm_source=github).avthread not exit
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
detect whether the stream is seekable. if not, reload
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
First thanks for this,I have not using this lib,but it seems great,there is one thing that I could not find any formated document about this lib.
how about provide some document or article to document the api and some examples?
thanks
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
Trying to play a video stream coming from a server with my own RTSP implementation. After a few seconds of normal video play, the BlockingQueue in AVDemuxer becomes and remains empty
--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/1300732-rtsp-stream-queue-becomes-empty-after-some-seconds?utm_campaign=plugin&utm_content=tracker%2F307703&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F307703&utm_medium=issues&utm_source=github).they should be in build dir
the first time run qmake, QMAKE use seperator '', the run make will fail.
if run qmake again, QMAKE is right.
--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/1300924-qmake-in-makefile-is-wrong-if-use-win-mingw?utm_campaign=plugin&utm_content=tracker%2F307703&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F307703&utm_medium=issues&utm_source=github).In some case it's useful.
they should be in builddir/config.tests
ubuntu 11.10
make之后的错误如下
AudioDecoder.cpp:50:84: error: ‘avcodec_decode_audio4’ was not declared in this scope
AudioDecoder.cpp:60:42: error: ‘AVFrame’ has no member named ‘nb_samples’
AudioDecoder.cpp:109:10: error: ‘AV_SAMPLE_FMT_U8P’ was not declared in this scope
AudioDecoder.cpp:111:46: error: ‘AVFrame’ has no member named ‘extended_data’
AudioDecoder.cpp:112:38: error: ‘AVFrame’ has no member named ‘nb_samples’
AudioDecoder.cpp:119:10: error: ‘AV_SAMPLE_FMT_S16P’ was not declared in this scope
AudioDecoder.cpp:121:48: error: ‘AVFrame’ has no member named ‘extended_data’
AudioDecoder.cpp:122:38: error: ‘AVFrame’ has no member named ‘nb_samples’
AudioDecoder.cpp:129:10: error: ‘AV_SAMPLE_FMT_S32P’ was not declared in this scope
AudioDecoder.cpp:131:48: error: ‘AVFrame’ has no member named ‘extended_data’
AudioDecoder.cpp:132:38: error: ‘AVFrame’ has no member named ‘nb_samples’
AudioDecoder.cpp:139:10: error: ‘AV_SAMPLE_FMT_FLTP’ was not declared in this scope
AudioDecoder.cpp:141:42: error: ‘AVFrame’ has no member named ‘extended_data’
AudioDecoder.cpp:142:38: error: ‘AVFrame’ has no member named ‘nb_samples’
AudioDecoder.cpp:149:10: error: ‘AV_SAMPLE_FMT_DBLP’ was not declared in this scope
AudioDecoder.cpp:151:44: error: ‘AVFrame’ has no member named ‘extended_data’
AudioDecoder.cpp:152:38: error: ‘AVFrame’ has no member named ‘nb_samples’
是由于 avcodec_decode_audio4 不存在,原因是 avcodec 库中此时的接口是 avcodec_decode_audio3 。
以下是 libavcodec-dev 的信息
root@ubuntu:~/QtAV# apt-cache show libavcodec-dev
Package: libavcodec-dev
Priority: optional
Section: libdevel
Installed-Size: 8556
Maintainer: Ubuntu Core Developers [email protected]
Original-Maintainer: Debian multimedia packages maintainers [email protected]
Architecture: amd64
Source: libav
Version: 4:0.7.2-1ubuntu1
Depends: libavcodec53 (>= 4:0.7.2-1ubuntu1) | libavcodec-extra-53 (>= 4:0.7.2), libavcodec53 (<= 4:0.7.2-99) | libavcodec-extra-53 (<= 4:0.7.2.99), libavutil-dev (= 4:0.7.2-1ubuntu1)
Suggests: libfaad-dev, libgsm1-dev, libogg-dev, libschroedinger-dev, libspeex-dev, libtheora-dev (>> 0.0.0.alpha4), libvorbis-dev, libx11-dev, libxext-dev, zlib1g-dev, libraw1394-dev, libdc1394-22-dev
Filename: pool/main/liba/libav/libavcodec-dev_0.7.2-1ubuntu1_amd64.deb
Size: 3110070
MD5sum: 9653f9d3e2e777463d14c0771a261cc1
SHA1: 416f419f3b246c06acbc2f43a66fcb7ec86a956c
SHA256: 0b48a9114e5573411731e125e52edc46425ab770389521b22528974b57964ee2
Description-en: Development files for libavcodec
This is the codec library from Libav. It supports most existing
encoding formats (MPEG, DivX, MPEG4, AC3, DV...).
.
This package contains the header files and static libraries needed to
compile applications or shared objects that use libavcodec.
Homepage: http://libav.org/
Description-md5: 46ab6aef4fc6e2ec40849bd82216def1
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Origin: Ubuntu
Supported: 18m
Package: libavcodec-dev
Priority: optional
Section: libdevel
Installed-Size: 8556
Maintainer: Ubuntu Developers [email protected]
Original-Maintainer: Debian multimedia packages maintainers [email protected]
Architecture: amd64
Source: libav
Version: 4:0.7.6-0ubuntu0.11.10.3
Depends: libavcodec53 (>= 4:0.7.6-0ubuntu0.11.10.3) | libavcodec-extra-53 (>= 4:0.7.6), libavcodec53 (<= 4:0.7.6-99) | libavcodec-extra-53 (<= 4:0.7.6.99), libavutil-dev (= 4:0.7.6-0ubuntu0.11.10.3)
Suggests: libfaad-dev, libgsm1-dev, libogg-dev, libschroedinger-dev, libspeex-dev, libtheora-dev (>> 0.0.0.alpha4), libvorbis-dev, libx11-dev, libxext-dev, zlib1g-dev, libraw1394-dev, libdc1394-22-dev
Filename: pool/main/liba/libav/libavcodec-dev_0.7.6-0ubuntu0.11.10.3_amd64.deb
Size: 3122818
MD5sum: a3be93d9fb14885fc4d7ec4b75de0f04
SHA1: d36df2e41ab3058d4b02a16c175c600f5c638ec4
SHA256: 58fa47ee349435152ee85e9a2650ff0edbfc897be894c71d83a47e24d9f47012
Description-en: Development files for libavcodec
This is the codec library from Libav. It supports most existing
encoding formats (MPEG, DivX, MPEG4, AC3, DV...).
.
This package contains the header files and static libraries needed to
compile applications or shared objects that use libavcodec.
Homepage: http://libav.org/
Description-md5: 46ab6aef4fc6e2ec40849bd82216def1
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Origin: Ubuntu
Supported: 18m
编译后设置环境变量
root@ubuntu:/QtAV# export CPATH=/opt/libav/include/:$CPATH/QtAV# export LIBRARY_PATH=/opt/libav/lib/:$LIBRARY_PATH
root@ubuntu:
您的第二个变量中 (export LIBRARY_PATH=ffmpeg_path/include:portaudio_path/lib:$LIBRARY_PATH) 应该是ffmpeg_path/lib 写成了 ffmpeg_path/include了。
make
发现如下错误
AVDemuxer.cpp: In member function ‘qreal QtAV::AVDemuxer::frameRate() const’:
AVDemuxer.cpp:560:27: error: ‘AVStream’ has no member named ‘r_frame_rate’
AVDemuxer.cpp:560:61: error: ‘AVStream’ has no member named ‘r_frame_rate’
AVDemuxer.cpp: In member function ‘bool QtAV::AVDemuxer::findAVCodec()’:
AVDemuxer.cpp:689:46: error: ‘CODEC_ID_H264’ was not declared in this scope
修改宏 CODEC_ID_H264 到 AV_CODEC_ID_H264 ,宏声明发生了变化。
修改 r_frame_rate 到 avg_frame_rate。也是定义发生了变化导致的。
继续make 发现如下问题
编译的最后 错误如下
/root/QtAV/lib_linux_x64/libQtAV.so: undefined reference to av_seek_frame@LIBAVFORMAT_55' /root/QtAV/lib_linux_x64/libQtAV.so: undefined reference to
av_free@LIBAVUTIL_52'
/root/QtAV/lib_linux_x64/libQtAV.so: undefined reference to avcodec_open2@LIBAVCODEC_55' /root/QtAV/lib_linux_x64/libQtAV.so: undefined reference to
av_strerror@LIBAVUTIL_52'
/root/QtAV/lib_linux_x64/libQtAV.so: undefined reference to avformat_version@LIBAVFORMAT_55' /root/QtAV/lib_linux_x64/libQtAV.so: undefined reference to
avformat_close_input@LIBAVFORMAT_55'
/root/QtAV/lib_linux_x64/libQtAV.so: undefined reference to avcodec_decode_video2@LIBAVCODEC_55' /root/QtAV/lib_linux_x64/libQtAV.so: undefined reference to
av_free_packet@LIBAVCODEC_55'
/root/QtAV/lib_linux_x64/libQtAV.so: undefined reference to avformat_network_deinit@LIBAVFORMAT_55' /root/QtAV/lib_linux_x64/libQtAV.so: undefined reference to
avcodec_close@LIBAVCODEC_55'
/root/QtAV/lib_linux_x64/libQtAV.so: undefined reference to avcodec_version@LIBAVCODEC_55' /root/QtAV/lib_linux_x64/libQtAV.so: undefined reference to
avpicture_get_size@LIBAVCODEC_55'
/root/QtAV/lib_linux_x64/libQtAV.so: undefined reference to avformat_alloc_context@LIBAVFORMAT_55' /root/QtAV/lib_linux_x64/libQtAV.so: undefined reference to
avpicture_fill@LIBAVCODEC_55'
/root/QtAV/lib_linux_x64/libQtAV.so: undefined reference to av_dump_format@LIBAVFORMAT_55' /root/QtAV/lib_linux_x64/libQtAV.so: undefined reference to
avformat_network_init@LIBAVFORMAT_55'
/root/QtAV/lib_linux_x64/libQtAV.so: undefined reference to av_new_packet@LIBAVCODEC_55' /root/QtAV/lib_linux_x64/libQtAV.so: undefined reference to
avformat_find_stream_info@LIBAVFORMAT_55'
/root/QtAV/lib_linux_x64/libQtAV.so: undefined reference to avcodec_find_decoder@LIBAVCODEC_55' /root/QtAV/lib_linux_x64/libQtAV.so: undefined reference to
avformat_open_input@LIBAVFORMAT_55'
/root/QtAV/lib_linux_x64/libQtAV.so: undefined reference to av_register_all@LIBAVFORMAT_55' /root/QtAV/lib_linux_x64/libQtAV.so: undefined reference to
avcodec_alloc_frame@LIBAVCODEC_55'
/root/QtAV/lib_linux_x64/libQtAV.so: undefined reference to av_read_frame@LIBAVFORMAT_55' /root/QtAV/lib_linux_x64/libQtAV.so: undefined reference to
avutil_version@LIBAVUTIL_52'
/root/QtAV/lib_linux_x64/libQtAV.so: undefined reference to avcodec_flush_buffers@LIBAVCODEC_55' /root/QtAV/lib_linux_x64/libQtAV.so: undefined reference to
avcodec_decode_audio4@LIBAVCODEC_55'
导入环境变量 export LD_LIBRARY_PATH=/opt/libav/lib/:$LD_LIBRARY_PATH 后
make 通过
must be in initStatistics()
I need to use QtAV in my project and used the instructions given in this link (https://github.com/wang-bin/QtAV/wiki/Use-QtAV-In-Your-Projects). As suggested in 2nd step I just copied the "QtAV-master" folder to "myproject" folder and renamed it as "QtAV". In step 4, I used the one folder inside myproject as the debug folder,
BUILD_DIR=C:\Qt\Qt5.0.1\Tools\QtCreator\bin\myproject\myplayer-build-Desktop_Qt_5_0_1_MSVC2010_32bit-Debug
Now, I get the following error when running,
WARNING: Include file C:/Qt/Qt5.0.1/Tools/QtCreator/bin/myproject/myplayer/libQtAV.pro not found
But, I don't have a myplayer folder inside myproject, pls see the following screen capture.
Please kindly help.
cache size depends on fps
Audio: dca [DCA (DTS Coherent Acoustics)]
sample rate: 48000, channels: 7
[dca @ 02387560] Number of channels changed in DCA decoder (6 -> 7)
Makefile is in source dir if source dir is a subdir of working dir(build dir), even if use qmake -o
option
backword not work
--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/1300911-can-not-seek-vob-correctly?utm_campaign=plugin&utm_content=tracker%2F307703&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F307703&utm_medium=issues&utm_source=github).`
executing config test gl
In file included from G:\dev\QtAV\config.tests\gl\main.cpp:26:0:
d:\qt\qt5.0.2-mingw\tools\mingw\bin../lib/gcc/i686-w64-mingw32/4.7.2/../../../../i686-w64-mingw32/include/GL/gl.h:34:16: error: conflicting declaration 'typedef double GLdouble'
In file included from D:\Qt\Qt5.0.2-mingw\5.0.2\mingw47_32\include\QtOpenGL/qgl.h:47:0,
from G:\dev\QtAV\config.tests\gl\main.cpp:21:
D:\Qt\Qt5.0.2-mingw\5.0.2\mingw47_32\include/QtGui/qopengl.h:71:17: error: 'GLdouble' has a previous declaration as 'typedef GLfloat GLdouble'
makefile:381: recipe for target 'main.o' failed
mingw32-make: *** [main.o] Error 1
test gl FAILED
`
is it supported?
If simply set the parent, the renderers will not update their contents. Is there some flags or attributes to fix this?
Currently, every widget in videowall is a toplevel widget. It's better to use only on toplevel widget, and make renderers as it's children.
no current time
VideoRendererPrivate::scale_in_qt = false result in resizing decoded picture not by Qt, but by swscale, ipp etc. if use ipp, program crashes
check whether avthread is running when end. wait and exit when avthread finished(avthread.finished() signal=> demux thread exit?)
if seek happens, then stop waiting
will the thread get an epf packet again?
only for music. music can not call seek(0)
Only for Qt4, to emulate the cache(dstvar, set, srcvar) by writting qmake functions.
http://bbs.et8.net/bbs/showthread.php?t=915881
with ide visul studio 2012 Ultimate
Direct2DRenderer.cpp
1> EventFilter.cpp
1> GDIRenderer.cpp
1> moc_AudioThread.cpp
1> moc_AVClock.cpp
1> moc_AVDemuxer.cpp
1> moc_AVDemuxThread.cpp
1> moc_AVPlayer.cpp
1> moc_AVThread.cpp
1> Generating Code...
1> Compiling...
1> moc_Direct2DRenderer.cpp
1> moc_EventFilter.cpp
1> moc_GDIRenderer.cpp
1> moc_qtav.cpp
1> moc_VideoCapture.cpp
1> moc_VideoThread.cpp
1> moc_WidgetRenderer.cpp
1> GraphicsItemRenderer.cpp
1> ImageConverter.cpp
1> ImageConverterFF.cpp
1> ImageConverterIPP.cpp
1> ImageRenderer.cpp
1> main.cpp
1>D:\workspace\QtAV\QtAV_Global.h(23): error C2757: 'QtAV' : a symbol with this name already exists and therefore this name cannot be used as a namespace name
1>D:\workspace\QtAV\AVOutput.h(7): error C2757: 'QtAV' : a symbol with this name already exists and therefore this name cannot be used as a namespace name
1>D:\workspace\QtAV\VideoRenderer.h(26): error C2757: 'QtAV' : a symbol with this name already exists and therefore this name cannot be used as a namespace name
1>D:\workspace\QtAV\VideoRenderer.h(30): error C2504: 'AVOutput' : base class undefined
1>D:\workspace\QtAV\VideoRenderer.h(31): error C2065: 'dptr' : undeclared identifier
1>D:\workspace\QtAV\VideoRenderer.h(31): error C2228: left of '.pri' must have class/struct/union
1> type is ''unknown-type''
1>D:\workspace\QtAV\VideoRenderer.h(31): error C2059: syntax error : ')'
1>D:\workspace\QtAV\ImageRenderer.h(7): error C2757: 'QtAV' : a symbol with this name already exists and therefore this name cannot be used as a namespace name
1>D:\workspace\QtAV\ImageRenderer.h(11): error C2504: 'VideoRenderer' : base class undefined
1>D:\workspace\QtAV\ImageRenderer.h(12): error C2065: 'dptr' : undeclared identifier
1>D:\workspace\QtAV\ImageRenderer.h(12): error C2228: left of '.pri' must have class/struct/union
1> type is ''unknown-type''
1>D:\workspace\QtAV\ImageRenderer.h(12): error C2059: syntax error : ')'
1>d:\workspace\qtav\WidgetRenderer.h(7): error C2757: 'QtAV' : a symbol with this name already exists and therefore this name cannot be used as a namespace name
1>d:\workspace\qtav\WidgetRenderer.h(11): error C2504: 'ImageRenderer' : base class undefined
1>d:\workspace\qtav\WidgetRenderer.h(13): error C2065: 'dptr' : undeclared identifier
1>d:\workspace\qtav\WidgetRenderer.h(13): error C2228: left of '.pri' must have class/struct/union
1> type is ''unknown-type''
1>d:\workspace\qtav\WidgetRenderer.h(13): error C2059: syntax error : ')'
1>D:\workspace\QtAV\AVClock.h(19): error C2757: 'QtAV' : a symbol with this name already exists and therefore this name cannot be used as a namespace name
1>D:\workspace\QtAV\AVDemuxer.h(22): error C2757: 'QtAV' : a symbol with this name already exists and therefore this name cannot be used as a namespace name
1>d:\workspace\qtav\AVPlayer.h(7): error C2757: 'QtAV' : a symbol with this name already exists and therefore this name cannot be used as a namespace name
1>d:\workspace\qtav\AVPlayer.h(79): error C2146: syntax error : missing ';' before identifier 'demuxer'
1>d:\workspace\qtav\AVPlayer.h(79): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>d:\workspace\qtav\sharedoutput/widget.h(9): error C2757: 'QtAV' : a symbol with this name already exists and therefore this name cannot be used as a namespace name
1>d:\workspace\qtav\sharedoutput/widget.h(28): error C2039: 'WidgetRenderer' : is not a member of 'QtAV'
1> d:\workspace\qtav\qtav.h(7) : see declaration of 'QtAV'
1>d:\workspace\qtav\sharedoutput/widget.h(28): error C2143: syntax error : missing ';' before ''
1>d:\workspace\qtav\sharedoutput/widget.h(28): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>d:\workspace\qtav\sharedoutput/widget.h(29): error C2039: 'AVPlayer' : is not a member of 'QtAV'
1> d:\workspace\qtav\qtav.h(7) : see declaration of 'QtAV'
1>d:\workspace\qtav\sharedoutput/widget.h(29): error C2143: syntax error : missing ';' before ''
1>d:\workspace\qtav\sharedoutput/widget.h(29): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1> Packet.cpp
1> qtav.cpp
1> QtAV_Compat.cpp
1> QtAV_Global.cpp
1> VideoCapture.cpp
1> VideoDecoder.cpp
1> VideoRenderer.cpp
1> Generating Code...
1> Compiling...
1> VideoThread.cpp
1> vo.cpp
1> widget.cpp
1> WidgetRenderer.cpp
1> Generating Code...
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========
Without container etc.
Running on QT5 with VS2010. As suggested removed "gl" as well. Now I am getting this error. Pls advice. Thanks.
Error: dependent 'C:\QtAV-master\QtAV-build-Desktop_Qt_5_0_1_MSVC2010_32bit-Debug\lib_win32\QtAVd1.dll' does not exist.
null AudioOutput etc
we should draw the video after background updated if image is available.
cannot play mp3
currently the shortcut 'N' is not the exactly 1 frame
init audio device may take a lot of time, need another thread. on my ubuntu, it cost about 10 seconds
If external clock is used, video can sync to the clock correctly, but audio not.
after commit c168f0b
video will start delay and delay
--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/1300743-deal-with-the-case-audio-duration-less-than-video-s?utm_campaign=plugin&utm_content=tracker%2F307703&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F307703&utm_medium=issues&utm_source=github).e.g. audio without video, only audio thread is required. now will create both
Sir, many thanks for providing such a clean abstraction over libav.
In the simpleplayer example, was wondering how best to go about resizing the Renderer to reflect the size of the currently played video.
Also, I tried taking the GraphicsView example and extending it to multiple videos, but it results in failure in the VideoThread. Does this have something to do with time syncronization?
Please suggest a way to acheive the same, I would like to update the examples with these added functionality.
Thanks & Regards.
it seem's portaudio cause the crash. player moves to a new thread, then deleted in mainthread, then new it again. Pa_Initialize() failed
top level changes too frequent
no problem with building. but if run the player, win will say "Entry point not found". so strange
try swresample and avresample, or avfilter
sometimes it only update when resizing. but if we emit a singal in write() and commect to update, things go right.
compile failed.
https://github.com/2of1/d2d1headers
it's owned by AVPlayer. but not be deleted when player destroyed. should we let AVOutput be something like a shared ptr?
should we delete old output in AVPlayer::setAVOutput?
add a control bar, with progress slider, volume slider, play, stop, pause/continue, forward/backward, open, set, about buttons etc.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.