admin管理员组文章数量:1570217
使用python模块ffpyplayer,如何查看帧或让img对象在屏幕上显示或显示视频图像/帧?,在我跟随的教程中,它看起来很简单,它读取帧并播放oudio,但(不显示)任何视频图像或帧到屏幕,只有添加(print img,t)才会将帧信息打印到屏幕上,而不会在屏幕上显示视频图像。在
我正在跟随来自:https://pypi.python/pypi/ffpyplayer,这里:http://matham.github.io/ffpyplayer/player.html的教程,并搜索了google,但是唯一相关的结果指向了相同的信息,我对编程和python有点陌生,所以可能我遗漏了一些看起来很简单但我自己无法理解的东西。在
我使用的是:Windows7 64位,python 2.7.11 32位。在
如有任何帮助,我们将不胜感激。在from ffpyplayer.player import MediaPlayer
vid = 'test_video.flv'
player = MediaPlayer(vid)
val = ''
while val != 'eof':
frame, val = player.get_frame()
if val != 'eof' and frame is not None:
img, t = frame
print img, t #This prints the image object
# display img #This does nothing!
版权声明:本文标题:python视频格式转换ff_python模块ffpyplayer在屏幕上显示或显示视频帧 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:https://www.elefans.com/dongtai/1727666891a1124714.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论