在tvml中播放视频时出现python错误(错误号32打破了管道)

时间:2016-12-21 09:47:27

标签: apple-tv tvml

我正在尝试从tvml脚本播放视频,但是获取python错误No.32打破了管道而无法播放视频。

脚本是:

<document>
   <stackTemplate>
      <banner>
         <title>Available Action Movies</title>
      </banner>
      <collectionList>
         <shelf>
            <section>
               .....
               .....
               <lockup videoURL="http://localhost:9001/media/video.mp4">
                  <img src="http://localhost:9001/images/movie-1.jpg" width="182" height="274" />
                  <title>Movie</title>
               </lockup>
            </section>
         </shelf>
      </collectionList>
   </stackTemplate>
</document>

获取错误:

  

127.0.0.1 - - [21 / Dec / 2016 14:48:39]&#34; GET /media/video.mp4 HTTP / 1.1&#34; 200 -

     

在处理来自(&#39; 127.0.0.1&#39;的请求期间发生异常,   55920)回溯(最近一次呼叫最后一次):文件   &#34; /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/SocketServer.py" ;,   第295行,在_handle_request_noblock中       self.process_request(request,client_address)File&#34; /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/SocketServer.py",   第321行,在process_request中       self.finish_request(request,client_address)File&#34; /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/SocketServer.py",   第334行,在finish_request中       self.RequestHandlerClass(request,client_address,self)File&#34; /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/SocketServer.py",   第657行, init       self.finish()File&#34; /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/SocketServer.py",   第716行,完成       self.wfile.close()File&#34; /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/socket.py",   第283行,近在咫尺       self.flush()File&#34; /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/socket.py",   第307行,同花顺       self._sock.sendall(view [write_offset:write_offset + buffer_size])错误:[Errno 32]管道损坏

1 个答案:

答案 0 :(得分:0)

当我阅读developer site上的文章时,似乎无法通过TVML应用程序(客户端服务器应用程序)在Apple TV上播放mp4或mov文件

  

Apple TV上的所有视频播放均基于HTTP直播和   FairPlay流媒体。请参阅关于HTTP直播和FairPlay   流媒体概述。对于HTTP Live Streaming创作规范,   请参阅Apple TV的HLS创作规范。

您可以使用AVPlayer在传统应用中播放相同的格式文件。

相关问题