我通過使用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