1
import os 
File = open('Path/video_file.webm','rb')
Size = os.path.getsize('Path/video_file.webm')
Data = File.read(Size)

如何使用 python 播放“数据”中的内容而不是从文件中播放视频?请帮我。我卡住了。提前非常感谢。

4

1 回答 1

0

Use StringIO

You can create a file from text using StringIO.StringIO(string) Then play it as you would normally

Docs: http://docs.python.org/2/library/stringio.html

于 2014-06-30T16:20:14.323 回答