AVPlayer发送AVPlayerItemFailedToPlayToEndTimeNotification并留下约1分钟的播放时间

时间:2014-11-14 18:30:20

标签: avplayer

我正在尝试在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, - 如果是成功。

什么是c-reason字段?在哪里可以获得有关的更多信息。 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

0 个答案:

没有答案