我通过使用python -m SimpleHTTPServer
调用服务器来将文件夹中的文件共享到其他设备。音频/视频流使用SimpleHTTPServer失败
我只是想流视频/音频(标准MP4 & MP3,无论是在20MB)到另一台计算机使用此&它WORKS(但在终端抛出的错误(下上市))。
不知何故,视频/音频失败(除了非常小的MP3文件)与iPhone/iPad的Safari玩。它绝对与媒体文件无关,因为我在iPhone中使用Apache成功传输它们。
任何想法为什么会发生?
Exception happened during processing of request from ('192.168.1.2', 51775)
Traceback (most recent call last):
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/SocketServer.py", line 284, in _handle_request_noblock
self.process_request(request, client_address)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/SocketServer.py", line 310, in process_request
self.finish_request(request, client_address)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/SocketServer.py", line 323, in finish_request
self.RequestHandlerClass(request, client_address, self)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/SocketServer.py", line 641, in __init__
self.finish()
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/SocketServer.py", line 694, in finish
self.wfile.flush()
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/socket.py", line 303, in flush
self._sock.sendall(view[write_offset:write_offset+buffer_size])
error: [Errno 32] Broken pipe
查看这些[alternatives](http://stackoverflow.com/questions/12905426/faster-alternative-to-pythons-simplehttpserver)到Python的SimpleHTTPServer模块。 – mtadd