VOD-视频点播快速频繁切换视频,有一定的概率会导致视频无法播放,看日志首帧渲染后就不播放了,怎么处理?版本:pod 'AliPlayerSDK_iOS', '5.5.5.0' 日志:2023-06-05 11:16:12.895409+0800 TL[7756:7817107] D/AliFrameWork [29864989] [PlayerNotifier] :NotifyPosition() :43213 2023-06-05 11:16:12.896354+0800 TL[7756:7817106] D/AliFrameWork [29864989] [AVPBase] :API_OUT:currentPositionCallback 43213 2023-06-05 11:16:12.897031+0800 TL[7756:7817106] D/AliFrameWork [29864989] [AVPBase] :API_OUT:bufferPositionCallback 48568 2023-06-05 11:16:12.958447+0800 TL[7756:7817107] D/AliFrameWork [29864989] [MeidaPlayerUtil] :mReadLoopIndex is 33.072002 2023-06-05 11:16:12.959120+0800 TL[7756:7817107] D/AliFrameWork [29864989] [MeidaPlayerUtil] :mReadAgainIndex is 0.000000 2023-06-05 11:16:12.959761+0800 TL[7756:7817107] D/AliFrameWork [29864989] [MeidaPlayerUtil] :mReadGotIndex is 82.680000 2023-06-05 11:16:12.960511+0800 TL[7756:7817107] D/AliFrameWork [29864989] [MeidaPlayerUtil] :mReadTimeOutIndex is 0.000000 2023-06-05 11:16:12.961194+0800 TL[7756:7817107] D/AliFrameWork [29864989] [MeidaPlayerUtil] :mCurrentDownloadSpeed is 0.000000 kbps 2023-06-05 11:16:12.961762+0800 TL[7756:7817107] D/AliFrameWork [29864989] [MeidaPlayerUtil] :mCurrentVideoBitrate is 453.016388 kbps 2023-06-05 11:16:12.962358+0800 TL[7756:7817107] D/AliFrameWork [29864989] [MeidaPlayerUtil] :mCurrentAudioBitrate is 61.794064 kbps 2023-06-05 11:16:13.071608+0800 TL[7756:7817112] D/AliFrameWork [29864989] [HLSStream] :tryOpenSegment: https://outin-5650ac1ca73711ec8a7900163e12ac16.oss-cn-shenzhen.aliyuncs.com/bb36a360fba171ed9e9c7621a7ac0102/7dc790ac92c64007a23fb65f0728bb2a-8a78d98262241e7120b3d0c36128ea7f-fd-00006.ts?Expires=1685938546&OSSAccessKeyId=LTAI4FocoL6tuCdYhuvug6Ee&Signature=jA85i9uG6b2Iqpuig0uadTUrOuQ%3D(-9223372036854775808,-9223372036854775808)(0,0), duration is 10000 2023-06-05 11:16:13.072578+0800 TL[7756:7817112] D/AliFrameWork [29864989] [CachedSource2] :https://outin-5650ac1ca73711ec8a7900163e12ac16.oss-cn-shenzhen.aliyuncs.com/bb36a360fba171ed9e9c7621a7ac0102/7dc790ac92c64007a23fb65f0728bb2a-8a78d98262241e7120b3d0c36128ea7f-fd-00006.ts?Expires=1685938546&OSSAccessKeyId=LTAI4FocoL6tuCdYhuvug6Ee&Signature=jA85i9uG6b2Iqpuig0uadTUrOuQ%3D cache disabled by CacheManager 2023-06-05 11:16:13.074166+0800 TL[7756:7817112] D/AliFrameWork [29864989] [CURLConnection2] :set low_speed_limit to 1 2023-06-05 11:16:13.075405+0800 TL[7756:7817112] D/AliFrameWork [29864989] [CURLConnection2] :set low_speed_time to 15000(ms) 2023-06-05 11:16:13.076247+0800 TL[7756:7817112] D/AliFrameWork [29864989] [CURLConnection2] :set connect_time to 15000(ms) 2023-06-05 11:16:13.077148+0800 TL[7756:7817112] D/AliFrameWork [29864989] [CurlDataSource2] :start connect 0 2023-06-05 11:16:13.087028+0800 TL[7756:7817091] D/AliFrameWork [29864989] [CURLConnection2] :== Info: STATE: INIT => CONNECT handle 0x11d83aa00; line 1879 (connection #-5000) 2023-06-05 11:16:13.088084+0800 TL[7756:7817091] D/AliFrameWork [29864989] [CURLConnection2] :== Info: Found bundle for host: 0x12d97bc10 [serially] 2023-06-05 11:16:13.089039+0800 TL[7756:7817091]
根据日志显示,首帧渲染后视频无法播放,可能是由于快速频繁切换视频导致播放器资源未能及时释放,建议您尝试以下解决方案:
确保在切换视频时,先停止当前视频的播放,再播放下一个视频,避免资源冲突。
尝试使用播放器的缓存功能,将视频缓存到本地,以减轻服务器负担,提高播放速度。
建议不使用AVPCacheConfig边播边缓存,目前我们不推荐使用,建议使用文档: https://help.aliyun.com/document_detail/124716.html "性能->本地缓存"中的全局本地缓存。start应该是在收到prepareDone的时候调用的。此回答整理自钉群“阿里云-VOD-视频点播-技术交流(进群先看公告)”
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。