通过 HTTP Live Streaming 进行精确清理
我正在为我的 iPhone 应用程序使用 HTTP Streaming(按照 Apple 的要求)。然而,视频擦除明显不精确。每当我寻找视频中的某个时间时,它就会跳到最近片段的开始时间。 MPMoviePlayerController 和 AVPlayer 都会发生这种情况(使用eekToTime:容差为 0)。
其他人也遇到过这个问题吗?有人找到了一种通过 HTTP Live Streaming 进行精确清理的方法吗?如有必要,我愿意降低水平。 Youtube 应用程序具有精确的清理功能,但我不相信它使用 HTTP Live Streaming。谁能证实/否认?
更新: 我使用的是 mediafilesegmenter 和默认设置(10 秒/块)。我的主人 .m3u8 看起来像
#EXTM3U
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=957267
http://[...].m3u8?file_urlkey=[...]
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=258157
http://[...].m3u8?file_urlkey=[...]
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=53220
http://[...].m3u8?file_urlkey=[...]
个人 .m3u8s 看起来像
#EXTM3U
#EXT-X-ALLOW-CACHE:YES
#EXT-X-TARGETDURATION:10
#EXTINF:9.9988149305,
http://[...].ts?bytes=0-1195491
#EXTINF:9.9988149305,
http://[...].ts?bytes=1195492-2390983
#EXTINF:9.9988149305,
http://[...].ts?bytes=2390984-3586475
#EXTINF:9.9988149305,
http://[...].ts?bytes=3586476-4781967
#EXTINF:9.9988149305,
http://[...].ts?bytes=4781968-5977459
#EXTINF:0.345925347493,
http://[...].ts?bytes=5977460-6018819
#EXT-X-ENDLIST
谢谢!
I'm using HTTP Streaming for my iPhone app (as required by Apple). However, video scrubbing is noticeably imprecise. Whenever I seek to a time in the video, it jumps to the start time of the nearest segment. This occurs with both MPMoviePlayerController and AVPlayer (using seekToTime: with a tolerance of 0).
Have others encountered this issue as well? Did anyone find a way to get precise scrubbing with HTTP Live Streaming? I'm willing to go low-level if necessary. The Youtube app has precise scrubbing but I don't believe it uses HTTP Live Streaming. Can anyone confirm/deny?
Update:
I'm using mediafilesegmenter with the default settings (10 sec / chunk). My master .m3u8 looks like
#EXTM3U
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=957267
http://[...].m3u8?file_urlkey=[...]
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=258157
http://[...].m3u8?file_urlkey=[...]
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=53220
http://[...].m3u8?file_urlkey=[...]
The individual .m3u8s look like
#EXTM3U
#EXT-X-ALLOW-CACHE:YES
#EXT-X-TARGETDURATION:10
#EXTINF:9.9988149305,
http://[...].ts?bytes=0-1195491
#EXTINF:9.9988149305,
http://[...].ts?bytes=1195492-2390983
#EXTINF:9.9988149305,
http://[...].ts?bytes=2390984-3586475
#EXTINF:9.9988149305,
http://[...].ts?bytes=3586476-4781967
#EXTINF:9.9988149305,
http://[...].ts?bytes=4781968-5977459
#EXTINF:0.345925347493,
http://[...].ts?bytes=5977460-6018819
#EXT-X-ENDLIST
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我们正在使用 HTTP Live Streaming,并且清理工作非常好。您使用什么来解码/分割视频?因为我猜这更多是播放列表文件(m3u8)的问题,而不是实现本身的问题。
We're using HTTP Live Streaming and scrubbling work pretty nice. What did you use to decode/segment your videos? Because I guess this is more a problem of the playlist file (the m3u8) rather than the implementation itself.
使用 HTTP Live Streaming 不可能在片段中间进行查找——我在 WWDC 上向 Apple 代表证实了这一点。
但他们表示,在iOS5中,搜索精度将会得到提高。
Seeking in the middle of segments is not possible with HTTP Live Streaming -- I confirmed with an Apple rep at WWDC.
But they said that seeking precision will be improved in iOS5.