[已解决]QVideoWidget只有声音没有画面
Tofloor
poster avatar
deepinf
deepin
2018-12-10 07:02
Author
本帖最后由 deepinf 于 2018-12-11 20:29 编辑

请求大神前来解答

小弟在商店安装Qtcreator,同时安装了sudo apt-get install qt-sdk

在学习音视频播放这一章的时候,发现添加multimedia模块后,找不到QSoundEffect头文件,网上查找解决办法于是sudo apt-get install qtmultimedia5-dev,之后能够使用multimedia中的类了,但是只能播放音频。如果使用QVideoWidget类则只有声音没有画面,如果使用QGraphicsVideoItem类则能正常显示画面也有声音。网上查了好久也没有找到解决办法。请求大神解惑。小弟感激不尽。

网上查到可能是解码器的问题,安装了gstreamer0.10-ffmpeg,不知道怎么qtcreator怎么找到它,如何给qtcreator配置gstreamer0.10-ffmpeg呢?
apt-cache search qtmultimedia5

qtmultimedia5-dbg - Qt 5 Multimedia library debugging symbols
qtmultimedia5-dev - APIs for multimedia functionality - development files
qtmultimedia5-doc - Qt 5 multimedia documentation
qtmultimedia5-doc-html - Qt 5 multimedia HTML documentation
qtmultimedia5-examples - Examples for Qt 5 Multimedia module



qtmultimedia5-dev提供了API而qtmultimedia5-dbg看似和多媒体库调试有关。但是qtmultimedia5-dbg : 依赖: libqt5multimedia5 (= 5.6.1-2) 但是 5.10.1-2 正要被安装

这该怎么办?
Reply Favorite View the author
All Replies
avatar
pikachuhy
deepin
2018-12-10 07:18
#1
跑官方Demo                  
Reply View the author
avatar
deepinf
deepin
2018-12-10 15:56
#2
商店安装的没有Demo,真的有人知道是怎么回事吗?,在在Windows系统下QvideoWidget可以显示画面,deepin下安装qtmultimedia5-dev后才能找到QVideoWidget但是只有声音没有画面。
Reply View the author
avatar
deepinf
deepin
2018-12-10 23:47
#3
要沉了,希望有人回答这个问题。
Reply View the author
avatar
deepinf
deepin
2018-12-10 23:48
#4
顶贴
顶贴+1
Reply View the author
avatar
海天鹰
deepin
2018-12-11 03:04
#5
这个坑我早趟过了~
有声音无视频:  
【 Linux】
* 报 va 相关错误  
参考:https://bugreports.qt.io/browse/QTBUG-23761  
解决:sudo apt-get remove gstreamer1.0-vaapi  

* 不报错
sudo apt-get install gst123  
下列【新】软件包将被安装:  
gst123 gstreamer1.0-pulseaudio gstreamer1.0-x  

【Windows】
* 安装 LAV Filters 解码解决。
Reply View the author
avatar
zccrs
deepin
2018-12-11 16:58
#6
demo装这个包:qtbase5-examples qtmultimedia5-examples
Reply View the author
avatar
deepinf
deepin
2018-12-12 02:08
#7
https://bbs.deepin.org/post/172205
这个坑我早趟过了~
有声音无视频:  
【 Linux】

太感谢你了,安装了gst123,同时查看了下,系统已经安装了gstreamer1.0-pulseaudio和gstreamer1.0-x
以及gstreamer1.0-vaapi
移除了gstreamer1.0-vaapi,终于正常了,可以显示画面了。再次感谢
Reply View the author
avatar
deepinf
deepin
2018-12-12 02:37
#8
https://bbs.deepin.org/post/172205
demo装这个包:qtbase5-examples qtmultimedia5-examples

谢谢你,demo包已经安装了,目录中能找得到,就是没有出现在qt的欢迎里面的示例里面,网上查找也没找到解决办法
Reply View the author
avatar
海天鹰
deepin
2018-12-12 03:01
#9
https://bbs.deepin.org/post/172205
太感谢你了,安装了gst123,同时查看了下,系统已经安装了gstreamer1.0-pulseaudio和gstreamer1.0-x
以及 ...

说好的赏金呢?
Reply View the author
avatar
deepinf
deepin
2018-12-12 04:20
#10
本帖最后由 deepinf 于 2018-12-11 20:29 编辑

大哥,对不住,我以为不关闭奖金别人回复就会一直扣,是我太小气了,我修改一下。怪我不太懂规则,没想到修改帖子后原先的奖励会不见。

回帖奖励100 @sonichy专属。
Reply View the author
avatar
海天鹰
deepin
2018-12-13 20:52
#11
https://bbs.deepin.org/post/172205
大哥,对不住,我以为不关闭奖金别人回复就会一直扣,是我太小气了,我修改一下。怪我不太懂规则, ...

发我QQ红包1元钱,不过分吧,包子都买不到。
Reply View the author