我在Mac上尝试hls流媒体 . 对于某些内容,播放不会到达结束,AVPlayer在播放剩余1分钟左右发送AVPlayerItemFailedToPlayToEndTimeNotification信号 . 它总是在同一时间发生 .

AVPlayer获取播放列表,起始段= 100 . 它在18分钟的视频中播放约16分钟 . 然后它失败了AVPlayerItemFailedToPlayToEndTimeNotification .

这是AVPlayerItem错误日志

error log: #Version: 1.0
Software: AppleCoreMedia/1.0.0.13E28 (Macintosh; U; Intel Mac OS X 10_9_4; en_us)
#Date: 2014/11/14 12:32:17.017
#Fields: date time uri cs-guid s-ip status domain comment
2014/11/14 12:32:15.015 http://localhost:12000/stream/content.ts?id=192.168.1.107-bd1ec9ddb674b1c67dd4&bps=1200000&segid=100 B4A5AB49-1647-4A3B-9768-61F3F99B133E 127.0.0.1 -12318 "CoreMediaErrorDomain" "Segment exceeds specified bandwidth for variant"

在错误日志中,它抱怨16分钟前播放的段100 . 它看起来像它的旧错误信息 .

这是播放失败时的访问日志信息

Access log: #Version: 1.0
#Software: AppleCoreMedia/1.0.0.13E28 (Macintosh; U; Intel Mac OS X 10_9_4; en_us)
#Date: 2014/11/14 12:32:17.017
#Fields: date time uri cs-guid s-ip s-ip-changes sc-count c-duration-downloaded c-start-time c-duration-watched bytes c-observed-bitrate sc-indicated-bitrate c-stalls c-frames-dropped c-startup-time c-overdue c-reason c-observed-min-bitrate c-observed-max-bitrate c-observed-bitrate-sd s-playback-type sc-wwan-count c-switch-bitrate
2014/11/14 12:32:15.015 https://localhost:12100/stream/playlist.m3u8?id=192.168.1.107-bd1ec9ddb674b1c67dd4&bps=1200000 B4A5AB49-1647-4A3B-9768-61F3F99B133E 127.0.0.1 0 3 9.000 1.070 1.281 1831920 5991597.824 1369642 0 0 2.430 0 - 3063099.199 6966103.615 - VOD 0 -

我已经比较了播放失败时AVPlayerItem的访问日志与播放是否正常(播放暂停时转储状态),唯一值得注意的差异是c-reason字段,如果失败则为1,如果成功,则为1 .

What is c-reason field and where can I get more information on that . AVPlayerItemAccessLogEvent没有说什么 .

以下是失败和成功案例的AVPlayerItemAccessLogEvent字段的比较 . 第一个值是失败案例,第二个值是成功案例 .

uri = https://localhost:12100/stream/playlist.m3u8?id=192.168.1.107-bd1ec9ddb674b1c67dd4&bps=1200000
      https://localhost:12100/stream/playlist.m3u8?id=192.168.1.107-bd1ec9ddb674b1c67dd4&bps=1200000
cs-guid = 9B6DFB28-0AB5-4729-9744-5DD1C80AA974
          B4A5AB49-1647-4A3B-9768-61F3F99B133E
s-ip = 127.0.0.1
     = 127.0.0.1         
s-ip-changes = 0
             = 0                 
sc-count = 4
         = 3             
c-duration-downloaded = 12.000
                      = 9.000                                           
c-start-time = 1.070
             = 1.070
c-duration-watched = 3.948
                   = 1.281
bytes = 2368360
      = 1831920
c-observed-bitrate = 4311328.532
                   = 5991597.824                
sc-indicated-bitrate = 1369642
                    =1369642                         
c-stalls =0
         = 0        
c-frames-dropped = 0
                    = 0
c-startup-time = 2.574
                = 2.430
c-overdue = 0
          = 0
c-reason = 1
         = - 
c-observed-min-bitrate = 2987149.809
                     = 3063099.199
c-observed-max-bitrate = 6577841.971
                       = 6966103.615
c-observed-bitrate-sd = - -
s-playback-type = VOD VOD
sc-wwan-count = 0 0 
c-switch-bitrate = - -

我知道它的长期问题,但如果有人可以检查上面的差异让我知道为什么玩家失败 .

感谢您阅读这个长期的问题 .

问候,D