pyqt phonon videoplayer是一个黑色方块

时间:2011-11-02 18:30:50

标签: python qt pyqt phonon

我想在我的GUI中有一个快速播放器。以下是我构建它的方法:

   videoPlayer = phonon.Phonon.VideoPlayer()
   url = QtCore.QUrl('/home/sslade/waterfalls.mov')
   mediaSource = phonon.Phonon.MediaSource(url)
   videoPlayer.play(mediaSource)
   infoLayout.addWidget(videoPlayer)

'infoLayout'上的所有其他小部件都很好,但是videoPlayer显示为黑色矩形,甚至不是快速时间的宽高比。

如果源是.png文件而不是.mov文件,则它可以正常工作。但Quicktime列在我的avilableMimeTypes中,所以我觉得我很好。看看:

application/annodex
application/x-annodex
audio/annodex
audio/x-annodex
video/annodex
video/x-annodex
video/msvideo
video/x-msvideo
audio/x-aiff
audio/aiff
audio/x-pn-aiff
audio/x-flac
audio/flac
audio/x-realaudio
audio/basic
audio/x-basic
audio/x-pn-au
audio/x-tta
audio/tta
audio/x-mod
audio/mod
audio/it
audio/x-it
audio/x-stm
audio/x-s3m
audio/s3m
application/playerpro
application/adrift
audio/med
audio/x-amf
audio/x-xm
audio/xm
application/ogg
application/x-ogg
application/x-ogm
application/x-ogm-audio
application/x-ogm-video
audio/ogg
audio/x-ogg
video/ogg
video/x-ogg
audio/x-pn-realaudio
audio/x-pn-realaudio-plugin
audio/x-real-audio
application/vnd.rn-realmedia
image/png
image/x-png
video/mng
video/x-mng
video/x-flic
video/quicktime
video/x-quicktime
audio/x-m4a
application/x-quicktimeplayer
video/mp4
audio/mp4
audio/x-8svx
audio/8svx
audio/x-16sv
audio/168sv
image/x-ilbm
image/ilbm
video/x-anim
video/anim
video/x-flv
video/flv
application/x-flash-video
video/mkv
video/x-matroska
video/x-ms-asf
video/x-ms-wmv
audio/x-ms-wma
application/vnd.ms-asf
application/x-mplayer2
video/x-ms-asf-plugin
video/x-ms-wvx
video/x-ms-wax
audio/x-wav
audio/wav
audio/x-pn-wav
audio/x-pn-windows-acm
audio/musepack
audio/x-musepack
audio/x-wavpack
audio/x-flac
audio/flac
audio/x-vorbis+ogg
application/ogg

有人有什么想法吗?谢谢你的帮助!

0 个答案:

没有答案