澳门银河网上官方赌场_老品牌值得信赖

ITKeyword,专注技术干货聚合推荐

注册 | 登录

解决python - Audio/Video streaming fails using SimpleHTTPServer

itPublisher 分享于

2021腾讯云限时秒杀,爆款1核2G云服务器298元/3年!(领取2860元代金券),
地址https://cloud.tencent.com/act/cps/redirect?redirect=1062

2021阿里云最低价产品入口+领取代金券(老用户3折起),
入口地址https://www.aliyun.com/minisite/goods

推荐:流媒体的初研以前我也听说,好像kvm底层实现不太支持j2me来做streaming video/audio,但我不知道那人为什么这么说。

以前我也听说,好像kvm底层实现不太支持j2me来做streaming video/audio,但我不知道那人为什么这么说。 那么现在国外有一个人提出下面这种思路,并且号称在Nokia

I
  files in a folder to other devices by invoking a server using python -m SimpleHTTPServer.

I just tried to stream videos/audio (standard mp4 & mp3, both under 20MB) to another computer using this & it WORKS (but by throwing the errors (listed down) in the terminal).

Somehow, the video/audio fails (except very small mp3 files) to play with Safari in iPhone/iPad. It is definitely not related to the media files, as I streamed them successfully using Apache in iPhone.

Any idea why it happens?

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
python ios streaming simplehttpserver
edited Aug 4 '13 at 8:36 asked Aug 3 '13 at 17:28 Jikku Jose 5,826 6 14 34

closed as off-topic by zsong, tiago, user568109, Sindre Sorhus, Bart Aug 3 '13 at 20:52

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it." – zsong, tiago, user568109, Sindre Sorhus, Bart
If this question can be reworded to fit the rules in the help center, please edit the question.

1   Check out these alternatives to Python's SimpleHTTPServer module. –  mtadd Aug 3 '13 at 19:17

 | 

1 Answers
1

解决方法

As sugested either use python alternatives, Faster alternative to Python's SimpleHTTPServer or use full blown web serwer altogether. Quick google suggests that Mac supports both Nignx and Apache2.


answered Aug 3 '13 at 20:05 jb. 9,653 8 57 99 2   Thanks for the links to the alternatives but the marked answer that suggested http-server (for node.js) didn't seem to stream video files. But, twistd (for Python) as explained in another answer does it pretty well! –  Jikku Jose Aug 4 '13 at 5:29      @JikkuJose how can I start twisted in terminal? Also correct link of twisted is here. –  S.M.Mousavi Jul 7 '16 at 17:42

 | 

Not the answer you're looking for? Browse other questions tagged python ios streaming simplehttpserver or ask your own question.


相关阅读排行


相关内容推荐

最新文章

×

×

请激活账号

为了能正常使用评论、编辑功能及以后陆续为用户提供的其他产品,请激活账号。

您的注册邮箱: 修改

重新发送激活邮件 进入我的邮箱

如果您没有收到激活邮件,请注意检查垃圾箱。

澳门银河网上官方赌场