Closed yemin82 closed 6 months ago
应该是插入ts广告引起的, 大多插入ts广告结果是 内容视频卡住,播放广告声音; 这个刚好相反,广告视频卡住,播放内容声音;
看错误是持续解码出错。测ts的时候碰到过,原因还不清楚,你试试ffmpeg的videotoolbox解码,就是把代码里的VT替换成videotoolbox,之前测的时候没出现报错
'ios': ['videotoolbox', 'FFmpeg'],
'ios': [ 'FFmpeg'],
都可以,这个解码器可以自动切下一个,如果不能那么这个设置成一个数组放多个解码器
如果可以自动切就完美了
目前VT解码出错自己会重试,不会切换到下一个。你先暂时用 registerWith()配置 ['videotoolbox', 'FFmpeg']
吧,我看看我这边这处理比较好
你意思是videotoolbox也会解码出错,最后切到ffmpeg?VT这边我可以调整下重试次数
你意思是videotoolbox也会解码出错,最后切到ffmpeg?VT这边我可以调整下重试次数
对,就是这个意思,不然设置这个数组的意思是什么
调整重试次数应该用处不大吧,如果错了,试再多次也一样吧,我发的那段log就是重试好多次,我只是取最下面的一段发出来
这个问题应该是插入ts广告后,音视频同步问题吧,插入的广告导致时间轴都错乱了
调整重试次数应该用处不大吧,如果错了,试再多次也一样吧,我发的那段log就是重试好多次,我只是取最下面的一段发出来
ffmpeg、vlc也有重试,只不过VT重试我没限制次数,正常情况下重试一次就能解码。
这个问题应该是插入ts广告后,音视频同步问题吧,插入的广告导致时间轴都错乱了
解码和同步没关系
能否把ts广告切片下载下来让我测下
你更新下pod依赖,最新包里VT重试一次失败就会切换到其他解码器
pod cache clean mdk
find . -name Podfile.lock -delete
rm -rf {mac,i}os/Pods
解决了,可以自动切下一个解码器了
flutter: fvp.FINE: 08:57:05.884: 22039949 player4388487088 onEvent: decoder.video - VT - 0 flutter: mdk.INFO: 08:57:05.885: null output image buffer @178.400000: 0x0, status: -12909 flutter: mdk.INFO: 08:57:05.885: VT error: -12909 flutter: mdk.INFO: 08:57:05.885: VT session restart flutter: mdk.INFO: 08:57:05.885: null output image buffer @178.520000: 0x0, status: -12909 flutter: mdk.INFO: 08:57:05.885: VT error: -12909 flutter: mdk.INFO: 08:57:05.889: codec 'avc1' for VT flutter: mdk.INFO: 08:57:05.889: VT hardware decode support: 1 flutter: mdk.INFO: 08:57:05.889: NALU count: 2 flutter: mdk.INFO: 08:57:05.889: 0: 3+26, SPS flutter: mdk.INFO: 08:57:05.889: 1: 32+4, PPS flutter: mdk.INFO: 08:57:05.889: <CMVideoFormatDescription 0x300eda5b0 [0x20e63feb0]> { mediaType:'vide' mediaSubType:'avc1' mediaSpecific: { codecType: 'avc1' dimensions: 720 x 540 } extensions: {{ CVFieldCount = 1; CVImageBufferChromaLocationBottomField = Left; CVImageBufferChromaLocationTopField = Left; CVPixelAspectRatio = { HorizontalSpacing = 1; VerticalSpacing = 1; }; FullRangeVideo = 0; SampleDescriptionExtensionAtoms = { avcC = {length = 45, bytes = 0x0164001e ffe1001a 6764001e acd940b4 ... 68ef8fcb fdf8f800 }; }; }} } flutter: fvp.FINE: 08:57:05.897: 22039949 player4388487088 onEvent: decoder.video - VT - 0 flutter: mdk.INFO: 08:57:05.898: null output image buffer @178.480000: 0x0, status: -12909 flutter: mdk.INFO: 08:57:05.898: VT error: -12909 flutter: mdk.INFO: 08:57:05.899: VT session restart flutter: mdk.INFO: 08:57:05.899: null output image buffer @178.600000: 0x0, status: -12909 flutter: mdk.INFO: 08:57:05.899: VT error: -12909 flutter: mdk.INFO: 08:57:05.903: codec 'avc1' for VT flutter: mdk.INFO: 08:57:05.903: VT hardware decode support: 1 flutter: mdk.INFO: 08:57:05.903: NALU count: 2 flutter: mdk.INFO: 08:57:05.903: 0: 3+26, SPS flutter: mdk.INFO: 08:57:05.903: 1: 32+4, PPS flutter: mdk.INFO: 08:57:05.903: <CMVideoFormatDescription 0x300ef49f0 [0x20e63feb0]> { mediaType:'vide' mediaSubType:'avc1' mediaSpecific: { codecType: 'avc1' dimensions: 720 x 540 } extensions: {{ CVFieldCount = 1; CVImageBufferChromaLocationBottomField = Left; CVImageBufferChromaLocationTopField = Left; CVPixelAspectRatio = { HorizontalSpacing = 1; VerticalSpacing = 1; }; FullRangeVideo = 0; SampleDescriptionExtensionAtoms = { avcC = {length = 45, bytes = 0x0164001e ffe1001a 6764001e acd940b4 ... 68ef8fcb fdf8f800 }; }; }} } flutter: fvp.FINE: 08:57:05.911: 22039949 player4388487088 onEvent: decoder.video - VT - 0 flutter: mdk.INFO: 08:57:05.913: null output image buffer @178.560000: 0x0, status: -12909 flutter: mdk.INFO: 08:57:05.913: VT error: -12909 flutter: mdk.INFO: 08:57:05.913: VT session restart flutter: mdk.INFO: 08:57:05.916: codec 'avc1' for VT flutter: mdk.INFO: 08:57:05.916: VT hardware decode support: 1 flutter: mdk.INFO: 08:57:05.916: NALU count: 2 flutter: mdk.INFO: 08:57:05.916: 0: 3+26, SPS flutter: mdk.INFO: 08:57:05.916: 1: 32+4, PPS flutter: mdk.INFO: 08:57:05.916: <CMVideoFormatDescription 0x300eda5b0 [0x20e63feb0]> { mediaType:'vide' mediaSubType:'avc1' mediaSpecific: { codecType: 'avc1' dimensions: 720 x 540 } extensions: {{ CVFieldCount = 1; CVImageBufferChromaLocationBottomField = Left; CVImageBufferChromaLocationTopField = Left; CVPixelAspectRatio = { HorizontalSpacing = 1; VerticalSpacing = 1; }; FullRangeVideo = 0; SampleDescriptionExtensionAtoms = { avcC = {length = 45, bytes = 0x0164001e ffe1001a 6764001e acd940b4 ... 68ef8fcb fdf8f800 }; }; }} } flutter: fvp.FINE: 08:57:05.925: 22039949 player4388487088 onEvent: decoder.video - VT - 0 flutter: mdk.INFO: 08:57:05.927: null output image buffer @178.640000: 0x0, status: -12909 flutter: mdk.INFO: 08:57:05.927: VT error: -12909 flutter: mdk.INFO: 08:57:05.928: VT session restart flutter: mdk.INFO: 08:57:05.928: null output image buffer @178.760000: 0x0, status: -12909 flutter: mdk.INFO: 08:57:05.928: VT error: -12909 flutter: mdk.INFO: 08:57:05.937: codec 'avc1' for VT flutter: mdk.INFO: 08:57:05.937: VT hardware decode support: 1 flutter: mdk.INFO: 08:57:05.937: NALU count: 2 flutter: mdk.INFO: 08:57:05.937: 0: 3+26, SPS flutter: mdk.INFO: 08:57:05.937: 1: 32+4, PPS flutter: mdk.INFO: 08:57:05.937: <CMVideoFormatDescription 0x300ed8f60 [0x20e63feb0]> { mediaType:'vide' mediaSubType:'avc1' mediaSpecific: { codecType: 'avc1' dimensions: 720 x 540 } extensions: {{ CVFieldCount = 1; CVImageBufferChromaLocationBottomField = Left; CVImageBufferChromaLocationTopField = Left; CVPixelAspectRatio = { HorizontalSpacing = 1; VerticalSpacing = 1; }; FullRangeVideo = 0; SampleDescriptionExtensionAtoms = { avcC = {length = 45, bytes = 0x0164001e ffe1001a 6764001e acd940b4 ... 68ef8fcb fdf8f800 }; }; }} } flutter: fvp.FINE: 08:57:05.943: 22039949 player4388487088 onEvent: decoder.video - VT - 0 flutter: mdk.INFO: 08:57:05.946: buffering progress 0% flutter: mdk.INFO: 08:57:05.946: null output image buffer @178.680000: 0x0, status: -12909 flutter: mdk.INFO: 08:57:05.946: VT error: -12909 flutter: mdk.INFO: 08:57:05.947: default 0x1059477d0 FrameReader::update MediaStatus 0X124=>0X114 flutter: fvp.FINE: 08:57:05.978: 22039949 player4388487088 onMediaStatus: MediaStatus(+loaded+prepared+buffered) => MediaStatus(+loaded+prepared+buffering) flutter: mdk.INFO: 08:57:05.978: ++++++++++++BUFFERING START++++++++++++ flutter: mdk.INFO: 08:57:05.978: flutter: fvp.FINE: 08:57:05.978: 22039949 player4388487088 onEvent: reader.buffering - - 0 flutter: mdk.INFO: 08:57:05.990: buffering progress 48% flutter: fvp.FINE: 08:57:05.991: 22039949 player4388487088 onEvent: reader.buffering - - 48 flutter: mdk.INFO: 08:57:05.991: buffering progress 60% flutter: fvp.FINE: 08:57:05.991: 22039949 player4388487088 onEvent: reader.buffering - - 60 flutter: mdk.INFO: 08:57:05.992: [FFmpeg:https] Opening 'https://askzycdn.com/20240524/PH5AIMt4/2000kb/hls/ycY7em07.ts' for reading flutter: mdk.INFO: 08:57:06.003: buffering progress 100% flutter: mdk.INFO: 08:57:06.003: default 0x1059477d0 FrameReader::update MediaStatus 0X114=>0X124 flutter: fvp.FINE: 08:57:06.019: 22039949 player4388487088 onMediaStatus: MediaStatus(+loaded+prepared+buffering) => MediaStatus(+loaded+prepared+buffered) flutter: mdk.INFO: 08:57:06.019: ++++++++++++BUFFERING END++++++++++++ flutter: mdk.INFO: 08:57:06.020: flutter: fvp.FINE: 08:57:06.020: 22039949 player4388487088 onEvent: reader.buffering - - 100 flutter: mdk.INFO: 08:57:06.020: VT session restart flutter: mdk.INFO: 08:57:06.025: codec 'avc1' for VT flutter: mdk.INFO: 08:57:06.025: VT hardware decode support: 1 flutter: mdk.INFO: 08:57:06.025: NALU count: 2 flutter: mdk.INFO: 08:57:06.025: 0: 3+26, SPS flutter: mdk.INFO: 08:57:06.025: 1: 32+4, PPS flutter: mdk.INFO: 08:57:06.025: <CMVideoFormatDescription 0x300ea6c10 [0x20e63feb0]> { mediaType:'vide' mediaSubType:'avc1' mediaSpecific: { codecType: 'avc1' dimensions: 720 x 540 } extensions: {{ CVFieldCount = 1; CVImageBufferChromaLocationBottomField = Left; CVImageBufferChromaLocationTopField = Left; CVPixelAspectRatio = { HorizontalSpacing = 1; VerticalSpacing = 1; }; FullRangeVideo = 0; SampleDescriptionExtensionAtoms = { avcC = {length = 45, bytes = 0x0164001e ffe1001a 6764001e acd940b4 ... 68ef8fcb fdf8f800 }; }; }} } flutter: fvp.FINE: 08:57:06.035: 22039949 player4388487088 onEvent: decoder.video - VT - 0 flutter: mdk.INFO: 08:57:06.036: null output image buffer @178.720000: 0x0, status: -12909 flutter: mdk.INFO: 08:57:06.036: VT error: -12909 flutter: mdk.INFO: 08:57:06.037: VT session restart flutter: mdk.INFO: 08:57:06.037: null output image buffer @178.840000: 0x0, status: -12909 flutter: mdk.INFO: 08:57:06.037: VT error: -12909 flutter: mdk.INFO: 08:57:06.041: codec 'avc1' for VT flutter: mdk.INFO: 08:57:06.044: VT hardware decode support: 1 flutter: mdk.INFO: 08:57:06.044: NALU count: 2 flutter: mdk.INFO: 08:57:06.044: 0: 3+26, SPS flutter: mdk.INFO: 08:57:06.044: 1: 32+4, PPS flutter: mdk.INFO: 08:57:06.044: <CMVideoFormatDescription 0x300eb1050 [0x20e63feb0]> { mediaType:'vide' mediaSubType:'avc1' mediaSpecific: { codecType: 'avc1' dimensions: 720 x 540 } extensions: {{ CVFieldCount = 1; CVImageBufferChromaLocationBottomField = Left; CVImageBufferChromaLocationTopField = Left; CVPixelAspectRatio = { HorizontalSpacing = 1; VerticalSpacing = 1; }; FullRangeVideo = 0; SampleDescriptionExtensionAtoms = { avcC = {length = 45, bytes = 0x0164001e ffe1001a 6764001e acd940b4 ... 68ef8fcb fdf8f800 }; }; }} } flutter: fvp.FINE: 08:57:06.050: 22039949 player4388487088 onEvent: decoder.video - VT - 0 flutter: mdk.INFO: 08:57:06.052: null output image buffer @178.800000: 0x0, status: -12909 flutter: mdk.INFO: 08:57:06.052: VT error: -12909 flutter: mdk.INFO: 08:57:06.053: VT session restart flutter: mdk.INFO: 08:57:06.053: null output image buffer @178.920000: 0x0, status: -12909 flutter: mdk.INFO: 08:57:06.053: VT error: -12909 flutter: mdk.INFO: 08:57:06.060: codec 'avc1' for VT flutter: mdk.INFO: 08:57:06.060: VT hardware decode support: 1 flutter: mdk.INFO: 08:57:06.060: NALU count: 2 flutter: mdk.INFO: 08:57:06.060: 0: 3+26, SPS flutter: mdk.INFO: 08:57:06.060: 1: 32+4, PPS flutter: mdk.INFO: 08:57:06.060: <CMVideoFormatDescription 0x300e91230 [0x20e63feb0]> { mediaType:'vide' mediaSubType:'avc1' mediaSpecific: { codecType: 'avc1' dimensions: 720 x 540 } extensions: {{ CVFieldCount = 1; CVImageBufferChromaLocationBottomField = Left; CVImageBufferChromaLocationTopField = Left; CVPixelAspectRatio = { HorizontalSpacing = 1; VerticalSpacing = 1; }; FullRangeVideo = 0; SampleDescriptionExtensionAtoms = { avcC = {length = 45, bytes = 0x0164001e ffe1001a 6764001e acd940b4 ... 68ef8fcb fdf8f800 }; }; }} } flutter: fvp.FINE: 08:57:06.065: 22039949 player4388487088 onEvent: decoder.video - VT - 0 flutter: mdk.INFO: 08:57:06.066: null output image buffer @178.880000: 0x0, status: -12909 flutter: mdk.INFO: 08:57:06.066: VT error: -12909 flutter: mdk.INFO: 08:57:06.067: VT session restart flutter: mdk.INFO: 08:57:06.067: null output image buffer @179.000000: 0x0, status: -12909 flutter: mdk.INFO: 08:57:06.067: VT error: -12909 flutter: mdk.INFO: 08:57:06.071: codec 'avc1' for VT flutter: mdk.INFO: 08:57:06.071: VT hardware decode support: 1 flutter: mdk.INFO: 08:57:06.071: NALU count: 2 flutter: mdk.INFO: 08:57:06.071: 0: 3+26, SPS flutter: mdk.INFO: 08:57:06.071: 1: 32+4, PPS flutter: mdk.INFO: 08:57:06.071: <CMVideoFormatDescription 0x300e92af0 [0x20e63feb0]> { mediaType:'vide' mediaSubType:'avc1' mediaSpecific: { codecType: 'avc1' dimensions: 720 x 540 } extensions: {{ CVFieldCount = 1; CVImageBufferChromaLocationBottomField = Left; CVImageBufferChromaLocationTopField = Left; CVPixelAspectRatio = { HorizontalSpacing = 1; VerticalSpacing = 1; }; FullRangeVideo = 0; SampleDescriptionExtensionAtoms = { avcC = {length = 45, bytes = 0x0164001e ffe1001a 6764001e acd940b4 ... 68ef8fcb fdf8f800 }; }; }} } flutter: fvp.FINE: 08:57:06.079: 22039949 player4388487088 onEvent: decoder.video - VT - 0 flutter: mdk.INFO: 08:57:06.081: null output image buffer @178.960000: 0x0, status: -12909 flutter: mdk.INFO: 08:57:06.081: VT error: -12909 flutter: mdk.INFO: 08:57:06.082: VT session restart flutter: mdk.INFO: 08:57:06.082: null output image buffer @179.080000: 0x0, status: -12909 flutter: mdk.INFO: 08:57:06.082: VT error: -12909