用Qt播放* .avi文件 [英] Playing *.avi files with Qt
问题描述
我正在尝试使用以下代码播放* .avi文件(〜900MB):
I am trying to play *.avi file (~900MB) with this code:
QMediaPlayer* player = new QMediaPlayer(this);
player->setMedia(QUrl::fromLocalFile("mes1.avi"));
player->setVideoOutput(ui->videoWidget);
player->play();
其中 ui-> videoWidget
是 QVideoWidget
,并且每次播放时,我都会收到此错误代码(在应用程序输出"控制台中)
where ui->videoWidget
is QVideoWidget
and every time I play it I am getting this error code (in Application Output console)
由于google无法提供帮助,这是我唯一的选择...
Since google doesn't help, this is my only choice...
DirectShowPlayerService::doRender: Unresolved error code 0x80040266 (IDispatch error #102)
我已经安装了K-Lite编解码器包12.2.6.
I have installed K-Lite Codec Pack 12.2.6.
我的应用程序是32位的,但由于K-Lite包含32位(源).
My application is 32bit, but it shouldn't be a problem since K-Lite include 32bit (source).
推荐答案
使用vlc-qt,您会发现在所有平台上播放各种视频非常容易,甚至XP也早已被qt抛弃了.时间之前.
Use vlc-qt, and you will find it is so easy to play all sorts of video on all platforms, even XP, which has been abandoned by qt long time ago.
这篇关于用Qt播放* .avi文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!