【发布时间】:2013-09-16 16:54:07
【问题描述】:
我一直在使用 Google Glass Mirror API,希望能够流式传输视频。
这是我试过的 Python 代码 sn-p:
def _insert_item_video_stream(self):
"""Insert a timeline item with streaming video."""
logging.info('Inserting timeline item with streaming video')
body = {
'notification': {'level': 'DEFAULT'},
'menuItems' : [{'action' : 'PLAY_VIDEO'},
{'payload' : 'https://eye-of-the-hawk.appspot.com/static/videos/waterfall.mp4'}],
}
self.mirror_service.timeline().insert(body=body).execute()
return 'A timeline item with streaming video has been inserted.'
但是,视频只是空白。任何想法都会非常有帮助!
【问题讨论】:
-
您的有效负载看起来不错,但我刚刚在我的网络浏览器中提取了视频 (eye-of-the-hawk.appspot.com/static/videos/waterfall.mp4),它显示为空白。你试过用其他视频做这个吗?正在使用什么编解码器? H.264 基线在 Glass 上效果最佳。
-
感谢您的观看,珍妮!根据您的评论,我能够转换为 H.264(eye-of-the-hawk.appspot.com/static/videos/waterfall2.mp4)。然后我必须修复其他东西才能正确“流式传输”。 :)
标签: python google-mirror-api google-glass