Closed yemin82 closed 6 months ago
提供下完整日志
0.27.0 (git b1028bf) - Multimedia Development Kit. Copyright (c) 2016-2024 WangBin(QtAV author) <wbsecg1 at gmail.com>
Build for: iOS80000/17.4.0 ARMv8 AArch64; AppleClang15.0.0 (clang-1500.3.9.4)GCC4.2.1; libc++170006; 08:50:06 May 20 2024
flutter: 0.27.0 (git b1028bf) - Multimedia Development Kit. Copyright (c) 2016-2024 WangBin(QtAV author) <wbsecg1 at gmail.com>
Build for: iOS80000/17.4.0 ARMv8 AArch64; AppleClang15.0.0 (clang-1500.3.9.4)GCC4.2.1; libc++170006; 08:50:06 May 20 2024
flutter: global option: d3d11.sync.cpu = 1
flutter: global option: log = debug
flutter: global option: ffmpeg.log = All
flutter: Unknown log level: All
flutter: FFmpeg/Libav runtime git-2024-05-11-0d95918-avbuild
flutter: Selected avutil runtime version: 59.17.100 (build: 59.17.100), license: LGPL version 2.1 or later
flutter: Selected avutil runtime configuration: --extra-version=avbuild --disable-doc --disable-debug --enable-shared --enable-runtime-cpudetect --disable-iamf --disable-programs --disable-vulkan --disable-avdevice --enable-libxml2 --disable-postproc --install_name_dir='@rpath' --enable-cross-compile --arch=arm64 --target-os=darwin --cc=clang --sysroot=/Applications/Xcode_15.2.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.2.sdk --enable-lto --enable-pic --extra-cflags='-I=/usr/include/libxml2 -arch arm64 -miphoneos-version-min=8.0' --extra-ldflags='-arch arm64 -miphoneos-version-min=8.0 -Wl,-dead_strip' --enable-small --disable-outdevs --disable-filters --disable-muxers --disable-encoders --disable-decoders --disable-demuxers --disable-protocols --enable-wolfssl --disable-avdevice --enable-decoder='*sub*,movtext,*web*,aac*,ac3*,eac3*,alac*,ape,ass,ccaption,cfhd,cook,dca,dnxhd,exr,truehd,*yuv*,flv,flac,gif,h26[3-4]*,hevc*,hap,mp[1-3]*,prores,*[mj]peg*,mlp,mpl2,nellymoser,opus,pcm*,qtrle,*png*,tiff,rawvideo,rv*,sami,srt,ssa,v210*,vc1*,vorbis,vp[6-9]*,wm*,wrapped_avframe' --enable-demuxer='*sub*,*ac3,*ac,*[mj]peg*,*web*,au,ape,ass,avi,concat,dnxhd,dts*,*dash*,*flv,gif,hls,h264,hevc,kux,matroska,mov,mp3,mxf,ogg,pcm*,rawvideo,rt*p,spdif,srt,vc1,v210*,wav,*pipe,image2' --enable-encoder='aac,gif,h26[3-4]*,av1*,hevc*,mjpeg*,*png,opus,pcm*,prores*,rawvideo,spdif,speedhq,*jpeg,*png,vp[8-9]*,wrapped_avframe' --enable-muxer='*jpeg,fifo,flv,gif,hls,h264,hevc,image2,mov,mp4,mpegts,matroska,null,pcm*,rawvideo,spdif,*pipe,*segment,webm,wav' --enable-filter='*null*,afade,*fifo,*format,*resample,aeval,atempo,pan,crop,eq*,framerate,hw*,scale,volume' --enable-protocol='cache,concat*,crypto*,data,fd,*file,ftp,h*,i*,pipe,rt*,s*,t*,u*'
flutter: global option: ffmpeg.configuration = --extra-version=avbuild --disable-doc --disable-debug --enable-shared --enable-runtime-cpudetect --disable-iamf --disable-programs --disable-vulkan --disable-avdevice --enable-libxml2 --disable-postproc --install_name_dir='@rpath' --enable-cross-compile --arch=arm64 --target-os=darwin --cc=clang --sysroot=/Applications/Xcode_15.2.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.2.sdk --enable-lto --enable-pic --extra-cflags='-I=/usr/include/libxml2 -arch arm64 -miphoneos-version-min=8.0' --extra-ldflags='-arch arm64 -miphoneos-version-min=8.0 -Wl,-dead_strip' --enable-small --disable-outdevs --disable-filters --disable-muxers --disable-encoders --disable-decoders --disable-demuxers --disable-protocols --enable-wolfssl --disable-avdevice --enable-decoder='*sub*,movtext,*web*,aac*,ac3*,eac3*,alac*,ape,ass,ccaption,cfhd,cook,dca,dnxhd,exr,truehd,*yuv*,flv,flac,gif,h26[3-4]*,hevc*,hap,mp[1-3]*,prores,*[mj]peg*,mlp,mpl2,nellymoser,opus,pcm*,qtrle,*png*,tiff,rawvideo,rv*,sami,srt,ssa,v210*,vc1*,vorbis,vp[6-9]*,wm*,wrapped_avframe' --enable-demuxer='*sub*,*ac3,*ac,*[mj]peg*,*web*,au,ape,ass,avi,concat,dnxhd,dts*,*dash*,*flv,gif,hls,h264,hevc,kux,matroska,mov,mp3,mxf,ogg,pcm*,rawvideo,rt*p,spdif,srt,vc1,v210*,wav,*pipe,image2' --enable-encoder='aac,gif,h26[3-4]*,av1*,hevc*,mjpeg*,*png,opus,pcm*,prores*,rawvideo,spdif,speedhq,*jpeg,*png,vp[8-9]*,wrapped_avframe' --enable-muxer='*jpeg,fifo,flv,gif,hls,h264,hevc,image2,mov,mp4,mpegts,matroska,null,pcm*,rawvideo,spdif,*pipe,*segment,webm,wav' --enable-filter='*null*,afade,*fifo,*format,*resample,aeval,atempo,pan,crop,eq*,framerate,hw*,scale,volume' --enable-protocol='cache,concat*,crypto*,data,fd,*file,ftp,h*,i*,pipe,rt*,s*,t*,u*'
flutter: global option: ffmpeg.version = 7
flutter: av_log_get_level0x1065cf400
Failed to change device orientation: Error Domain=UISceneErrorDomain Code=101 "None of the requested orientations are supported by the view controller. Requested: landscapeLeft, landscapeRight; Supported: portrait" UserInfo={NSLocalizedDescription=None of the requested orientations are supported by the view controller. Requested: landscapeLeft, landscapeRight; Supported: portrait}
flutter: default 0x10607f480 new FrameReader...
flutter: Registered audio backends: AudioQueue OpenAL null
flutter: default 0x106086990 new FrameReader...
flutter: Registered audio backends: AudioQueue OpenAL null
flutter: 0x106053e40 mdk::Player::Player()
flutter: player property: video.decoder = shader_resource=0
flutter: player property: avformat.strict = experimental
flutter: player property: avio.protocol_whitelist = file,rtmp,http,https,tls,rtp,tcp,udp,crypto,httpproxy,data,concatf,concat,subfile
flutter: player property: avformat.rtsp_transport = tcp
flutter: video decoders: "VT", "FFmpeg"
flutter: video decoders: "VT", "FFmpeg"
flutter: default FrameReader0x10607f480 state: 0=>0=>0, 0
flutter: default0x10607f480 virtual void mdk::FrameReader::stop(), current state: 0
flutter: default FrameReader0x10607f480 state: 0=>0=>0, 0
flutter: default0x10607f480 virtual void mdk::FrameReader::stop(), current state: 0
flutter: AudioQueueStart ERROR: 0
flutter: 0x109985400 MediaControl.prepare(0, ...) http://[2409:8087:4c0a:22:1::11]:6410/170000001115/UmaiCHAN111128BESTVSMGSMG/index.m3u8?AuthInfo=9kOOdBn7MFF%2F2bWjKgahUU6FFmRK8Hl0ytyd5e5kWGEwoDIwMxbrlyyVy9x6ZDKnldIYKOjBOUjRyoym5n7Kg0yIYstFTUfqtC14fzxhy5Y
flutter: default 0x10607f480 FrameReader.start(0, ...)
flutter: default 0x10607f480 FrameReader::update MediaStatus 0=>0X2
flutter: default FrameReader0x10607f480 state: 0=>0=>1, 0
flutter: default FrameReader0x10607f480 state: 0=>1=>1, 0
flutter: default FrameReader0x10607f480 request to pause 1, loaded: 0.
flutter: default FrameReader0x10607f480 state: 0=>1=>2, 0
flutter: default FrameReader0x10607f480 state requested: 2, current: 0
flutter: virtual void mdk::AudioBackendAudioQueue::pause(bool)138 ERROR>>> AudioQueuePause(queue_): -50
flutter:
flutter: start frame reader thread: 0x16b487000
flutter: Selected avformat runtime version: 61.3.103 (build: 61.3.103), license: LGPL version 2.1 or later
flutter: avformat_version0x10630f6e0
flutter: Trying MediaIO FFmpeg
flutter: 0x301d78300 open url: http://[2409:8087:4c0a:22:1::11]:6410/170000001115/UmaiCHAN111128BESTVSMGSMG/index.m3u8?AuthInfo=9kOOdBn7MFF%2F2bWjKgahUU6FFmRK8Hl0ytyd5e5kWGEwoDIwMxbrlyyVy9x6ZDKnldIYKOjBOUjRyoym5n7Kg0yIYstFTUfqtC14fzxhy5Y
flutter: FFmpeg/Libav runtime git-2024-05-11-0d95918-avbuild
flutter: 0x301d78300 url opened
flutter: Selected avcodec runtime version: 61.5.103 (build: 61.5.103), license: LGPL version 2.1 or later
flutter: avcodec_descriptor_next0x1063ab4bc
flutter: format adts is used for http://[2409:8087:4c0a:22:1::11]:6410/170000001115/UmaiCHAN111128BESTVSMGSMG/index.m3u8?AuthInfo=9kOOdBn7MFF%2F2bWjKgahUU6FFmRK8Hl0ytyd5e5kWGEwoDIwMxbrlyyVy9x6ZDKnldIYKOjBOUjRyoym5n7Kg0yIYstFTUfqtC14fzxhy5Y
flutter: default 0x10607f480 FrameReader::update MediaStatus 0X2=>0X2
flutter: 0x105f7a400 avio set class
flutter: before avformat_open_input. io: 0x301d78300(FFmpeg)/pb: 0x105f7a400, url: http://[2409:8087:4c0a:22:1::11]:6410/170000001115/UmaiCHAN111128BESTVSMGSMG/index.m3u8?AuthInfo=9kOOdBn7MFF%2F2bWjKgahUU6FFmRK8Hl0ytyd5e5kWGEwoDIwMxbrlyyVy9x6ZDKnldIYKOjBOUjRyoym5n7Kg0yIYstFTUfqtC14fzxhy5Y
flutter: [FFmpeg:?] mime type is not rfc8216 compliant
flutter: [FFmpeg:hls] Skip ('#EXT-X-VERSION:3')
flutter: [FFmpeg:hls] Skip ('#EXT-X-PROGRAM-DATE-TIME:2024-05-23T14:01:33Z')
flutter: [FFmpeg:hls] Skip ('#EXT-X-PROGRAM-DATE-TIME:2024-05-23T14:01:43Z')
flutter: [FFmpeg:hls] Skip ('#EXT-X-PROGRAM-DATE-TIME:2024-05-23T14:01:53Z')
flutter: [FFmpeg:hls] Skip ('#EXT-X-PROGRAM-DATE-TIME:2024-05-23T14:02:03Z')
flutter: [FFmpeg:hls] Skip ('#EXT-X-PROGRAM-DATE-TIME:2024-05-23T14:02:13Z')
flutter: [FFmpeg:hls] Skip ('#EXT-X-PROGRAM-DATE-TIME:2024-05-23T14:02:23Z')
flutter: [FFmpeg:hls] Opening 'http://[2409:8087:4c0a:22:1::43]:6610/170000001115/UmaiCHAN111128BESTVSMGSMG/1/202405/231400/20240521020555_24223.ts?zduration=10&zte_bandwidth=0&ts_min=1&prog_time=20240523140203&IASHttpSessionId=SLB397220240523140306707570&AuthInfo=9kOOdBn7MFF%2F2bWjKgahUU6FFmRK8Hl0ytyd5e5kWGEwoDIwMxbrlyyVy9x6ZDKnldIYKOjBOUjRyoym5n7Kg0yIYstFTUfqtC14fzxhy5Y&ztecid=UmaiCHAN111128BESTVSMGSMG&ispcode=34' for reading
flutter: [FFmpeg:hls] Opening 'http://[2409:8087:4c0a:22:1::43]:6610/170000001115/UmaiCHAN111128BESTVSMGSMG/1/202405/231400/20240521020555_24224.ts?zduration=10&zte_bandwidth=0&ts_min=1&prog_time=20240523140213&IASHttpSessionId=SLB397220240523140306707570&AuthInfo=9kOOdBn7MFF%2F2bWjKgahUU6FFmRK8Hl0ytyd5e5kWGEwoDIwMxbrlyyVy9x6ZDKnldIYKOjBOUjRyoym5n7Kg0yIYstFTUfqtC14fzxhy5Y&ztecid=UmaiCHAN111128BESTVSMGSMG&ispcode=34' for reading
flutter: after avformat_open_input. pb: 0x105f7a400, iformat: 0x10680fec8, context flags: 2097280, input format flags: 49664
flutter: unsupported avformat options: rtsp_transport=tcp
flutter: supports 204 ffmpeg sw pixel formats. unsupported: uyyvyy411 rgb8 x2rgb10be x2bgr10be p212be p212le p412be p412le gbrap14be gbrap14le
flutter: Format: hls, range: 51343485 +0ms, bitrate: 0, size: 0
Programs:
Program id 0
Metadata:
variant_bitrate: 0
Video:
track 0 stream#0, range: 51343485 +0ms, frames: 0
codec: hevc tag: 0X24 profile: 1 level: 120, yuv420p, bpc:8, bpp:12(8,8,8), channels:(1,1,1), map: 0 1 2 0, bitrate: 0, 1920x1080, fps: 25, bframes: 0, primaries: BT709, trc: BT709, matrix: BT709, range: Limited
extra data(97): 00 00 01 40 01 0C 01 FF FF 01 60 00 00 03 00 90 00 00 03 00 00 03 00 78 AC 0C 00 00 0F A0 00 01 86 A1 40 00 00 00 01 42 01 01 01 60 00 00 03 00 90 00 00 03 00 00 03 00 78 A0 03 C0 80 10 E5 96 B9 24 C9 AE 59 E0 2D 40 40 40 41 00 00 03 03 E8 00 00 61 A8 08 00 00 00 01 44 01 E0 76 B0 26 40 00
Metadata:
variant_bitrate: 0
Audio:
track 0 stream#1, range: 51343549 +0ms, frames: 0
codec: aac tag: 0XF profile: 1 level: -99, sample size: 0/0, block align: 0, frame_size: 1024, f32p stereo(2) @32000Hz, bitrate: 0
Metadata:
variant_bitrate: 0
flutter: 0x109985400 prepared callback is invoked
flutter: default 0x10607f480 FrameReader::update MediaStatus 0X2=>0X4
flutter: ***buffering progress 0%***
flutter: default 0x10607f480 FrameReader::update MediaStatus 0X4=>0X14
flutter: virtual void mdk::AudioBackendAudioQueue::pause(bool)138 ERROR>>> AudioQueuePause(queue_): -50
flutter:
flutter: ++++++++++++BUFFERING START++++++++++++
flutter:
flutter: 1 pkt duration: 0.032000, duration:63, dy_duration_delta=0=>32, live_eos_timeout=5000
flutter: 1 pkt duration: 0.032000, duration:63, dy_duration_delta=0=>32, live_eos_timeout=5000
flutter: default FrameReader0x10607f480 state: 0=>2=>1, 1
flutter: default FrameReader0x10607f480 update state: 0=>1
flutter: default FrameReader0x10607f480 state: 1=>1=>2, 1
flutter: default FrameReader0x10607f480 update state: 1=>2
flutter: starting decode loop thread mdk.adec1@0x16c0a3000
flutter: audio stream#1 starting decoding loop from decoder index 0...
flutter: creating audio decoder: auto...
flutter: opening audio decoder: FFmpeg...
flutter: opening ffmpeg audio decoder: aac
flutter: starting decode loop thread mdk.vdec0@0x16c12f000
flutter: video stream#0 starting decoding loop from decoder index 0...
flutter: creating video decoder: VT...
flutter: 0x1060a9448mdk::NativeVideoBufferPool::NativeVideoBufferPool()
flutter: Try to use IOSurface OpenGL(ES) interop: true
flutter: opening video decoder: VT...
flutter: codec 'hvc1' for VT
flutter: AVCodec.Audio[aac.] decoder: 1 Single threads
flutter: aac f32p, stereo @32000Hz
flutter: ***buffering progress 79%***
flutter: audio stream#1 sending 1 invalid AOT frame @51343.548622s. seeking: 0
flutter: 0x109985400 1st audio frame @51343.548622
flutter: 0x109985400 seek end audio frame @51343.548622 seek_pos_: -1, sync_ao_ 1
flutter: Selected avfilter runtime version: 10.2.101 (build: 10.2.101), license: LGPL version 2.1 or later
flutter: AudioRenderer format: f32, stereo @32000Hz, requested: f32p, stereo @32000Hz
flutter: AudioRenderer format changed and reinitialize
flutter: 0x106053e50 setRenderAPI(3, 0x0)
flutter: getVideoOutContext 0x0 => 0x30314cbe0. vo count: 1
flutter: 0x106053e50 setVideoSurfaceSize(1920x1080, 0x0)
flutter: setLoop(0), now 0/0
flutter: 0x109985400 virtual void mdk::MediaControlPush::setState(PlaybackState)@1062 requested state 2=>2, current state 2. status: 0X14
flutter: default FrameReader0x10607f480 request to pause 1, loaded: 4.
flutter: default FrameReader0x10607f480 state: 2=>2=>2, 0
flutter: 0x109985400-MediaControl::seek(pos: 60000, flag:0X402 +FromStart). now: 0
flutter: default 0x10607f480-FrameReader::seek(60000, 0X402)
flutter: default 0x10607f480 FrameReader::update MediaStatus 0X14=>0X94
flutter: 0x10607f480 default FrameReaderImpl::seekTo(60000, 0X402 #1)
flutter: 0x109985400 virtual void mdk::MediaControlPush::setState(PlaybackState)@1062 requested state 2=>1, current state 2. status: 0X94
flutter: seekTo(60000) found video stream#0 packet at -2 in [51343.484622, 51344.283622] s
flutter: seekTo(60000) found audio stream#1 packet at -2 in [51343.580622, 51344.444622] s
flutter: ***buffering progress 100%***
flutter: default 0x10607f480 FrameReader::update MediaStatus 0X94=>0X1A4
flutter: default FrameReader0x10607f480 request to pause 0, loaded: 4.
flutter: default FrameReader0x10607f480 state: 2=>2=>1, 0
flutter: default FrameReader0x10607f480 state requested: 1, current: 2
flutter: ++++++++++++BUFFERING END++++++++++++
flutter:
flutter: virtual int64_t mdk::PacketIOWrapper::seek(int64_t, SeekFlag)@596 seek target(from 51343485): 60000ms, flags: +FromStart. now: 51344.364622
flutter: default 0x10607f480 FrameReader::update MediaStatus 0X1A4=>0X1A4
flutter: Seek position 51403485 is out of media time range 51343485+927
flutter: Seek start. target time: 51344412000 avseek flags: 1
virtual bool mdk::AudioBackendAudioQueue::open()
flutter: av_seek_frame error with flag AVSEEK_FLAG_BACKWARD: Operation not permitted. try to seek without the flag
flutter: Error ret @515 /Users/runner/work/mdk-sdk/mdk-sdk/mdk/ffmpeg/plugin/FFmpegPacketIO.cpp: (0xffffffff) Operation not permitted
flutter: default 0x10607f480 FrameReader::update MediaStatus 0X1A4=>0X124
flutter: 81 ERROR>>> AudioQueueSetProperty(queue_, kAudioQueueProperty_TimePitchAlgorithm, &algorithm, sizeof(algorithm)): -66678PacketIO seek error #1
flutter: default FrameReader0x10607f480 #1 seekComplete -1
flutter:
flutter:
flutter: default 0x10607f480 FrameReader::update MediaStatus 0X124=>0X124
flutter: default FrameReader 0x10607f480 callbacks 0, seeking 0 flag 0, seekComplete#1 @-1
flutter: default FrameReader0x10607f480 state: 2=>1=>1, 1
flutter: default FrameReader0x10607f480 update state: 2=>1
flutter: Using audio backend: AudioQueue
flutter: 0x109985400 ao opened: 1, reopen: 1, bad ao: 0. valid: 0
flutter: 0x300250368 filter graph:
flutter: +-----------+
| src |default--[32000Hz fltp:stereo]--swr:default
| (abuffer) |
+-----------+
+---------------+
swr:default--[32000Hz flt:stereo]--default| dst |
| (abuffersink) |
+---------------+
+-------------+
src:default--[32000Hz fltp:stereo]--default| swr |default--[32000Hz flt:stereo]--dst:default
| (aresample) |
+-------------+
flutter: >>>>>>>>1st audio frame (after seek) rendered: 1, ao: 51343573, a: 51343548, delta: 25 +0.032000
flutter: audio stream#1 AOT frame is sent
flutter: ***buffering progress 0%***
flutter: default 0x10607f480 FrameReader::update MediaStatus 0X124=>0X114
flutter: ++++++++++++BUFFERING START++++++++++++
flutter:
flutter: VT hardware decode support: 1
flutter: NALU count: 3
flutter: 0: 3+33, VPS
flutter: 1: 39+47, SPS
flutter: 2: 89+8, PPS
flutter: <CMVideoFormatDescription 0x303df1080 [0x20e63feb0]> {
mediaType:'vide'
mediaSubType:'hvc1'
mediaSpecific: {
codecType: 'hvc1' dimensions: 1920 x 1080
}
extensions: {{
BitsPerComponent = 8;
CVFieldCount = 1;
CVImageBufferChromaLocationBottomField = Left;
CVImageBufferChromaLocationTopField = Left;
CVImageBufferColorPrimaries = "ITU_R_709_2";
CVImageBufferTransferFunction = "ITU_R_709_2";
CVImageBufferYCbCrMatrix = "ITU_R_709_2";
CVPixelAspectRatio = {
HorizontalSpacing = 1;
VerticalSpacing = 1;
};
FullRangeVideo = 0;
SampleDescriptionExtensionAtoms = {
hvcC = {length = 126, bytes = 0x01016000 00009000 00000000 78f000fc ... 4401e076 b0264000 };
};
}}
}
flutter: decode stored recovery packets: 0
flutter: video stream#0 is seeking #1... got flush pkt. flush decoder and drop frames until seek target 179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368.0000s...
flutter: 0x109985400 1st video frame to render @-1.000000s, sync time: 51343.580000
flutter: invalid video frame @-1.000000
flutter: video stream#0 1st packet@51344.404622 without key frame will be dropped!!!!!!!!!!!!!!!!!!!
flutter: video stream#0 1st packet@51344.444622 without key frame will be dropped!!!!!!!!!!!!!!!!!!!
flutter: [FFmpeg:http] Opening 'http://[2409:8087:4c0a:22:1::43]:6610/170000001115/UmaiCHAN111128BESTVSMGSMG/1/202405/231400/20240521020555_24225.ts?zduration=10&zte_bandwidth=0&ts_min=1&prog_time=20240523140223&IASHttpSessionId=SLB397220240523140306707570&AuthInfo=9kOOdBn7MFF%2F2bWjKgahUU6FFmRK8Hl0ytyd5e5kWGEwoDIwMxbrlyyVy9x6ZDKnldIYKOjBOUjRyoym5n7Kg0yIYstFTUfqtC14fzxhy5Y&ztecid=UmaiCHAN111128BESTVSMGSMG&ispcode=34' for reading
flutter: [FFmpeg:hls] Opening 'http://[2409:8087:4c0a:22:1::43]:6610/170000001115/UmaiCHAN111128BESTVSMGSMG/index.m3u8?AuthInfo=9kOOdBn7MFF%2F2bWjKgahUU6FFmRK8Hl0ytyd5e5kWGEwoDIwMxbrlyyVy9x6ZDKnldIYKOjBOUjRyoym5n7Kg0yIYstFTUfqtC14fzxhy5Y&IASHttpSessionId=SLB397220240523140306707570' for reading
flutter: [FFmpeg:hls] Skip ('#EXT-X-VERSION:3')
flutter: [FFmpeg:hls] Skip ('#EXT-X-PROGRAM-DATE-TIME:2024-05-23T14:01:33Z')
flutter: [FFmpeg:hls] Skip ('#EXT-X-PROGRAM-DATE-TIME:2024-05-23T14:01:43Z')
flutter: [FFmpeg:hls] Skip ('#EXT-X-PROGRAM-DATE-TIME:2024-05-23T14:01:53Z')
flutter: [FFmpeg:hls] Skip ('#EXT-X-PROGRAM-DATE-TIME:2024-05-23T14:02:03Z')
flutter: [FFmpeg:hls] Skip ('#EXT-X-PROGRAM-DATE-TIME:2024-05-23T14:02:13Z')
flutter: [FFmpeg:hls] Skip ('#EXT-X-PROGRAM-DATE-TIME:2024-05-23T14:02:23Z')
flutter: [FFmpeg:http] Opening 'http://[2409:8087:4c0a:22:1::43]:6610/170000001115/UmaiCHAN111128BESTVSMGSMG/index.m3u8?AuthInfo=9kOOdBn7MFF%2F2bWjKgahUU6FFmRK8Hl0ytyd5e5kWGEwoDIwMxbrlyyVy9x6ZDKnldIYKOjBOUjRyoym5n7Kg0yIYstFTUfqtC14fzxhy5Y&IASHttpSessionId=SLB397220240523140306707570' for reading
flutter: [FFmpeg:hls] Skip ('#EXT-X-VERSION:3')
flutter: [FFmpeg:hls] Skip ('#EXT-X-PROGRAM-DATE-TIME:2024-05-23T14:01:43Z')
flutter: [FFmpeg:hls] Skip ('#EXT-X-PROGRAM-DATE-TIME:2024-05-23T14:01:53Z')
flutter: [FFmpeg:hls] Skip ('#EXT-X-PROGRAM-DATE-TIME:2024-05-23T14:02:03Z')
flutter: [FFmpeg:hls] Skip ('#EXT-X-PROGRAM-DATE-TIME:2024-05-23T14:02:13Z')
flutter: [FFmpeg:hls] Skip ('#EXT-X-PROGRAM-DATE-TIME:2024-05-23T14:02:23Z')
flutter: [FFmpeg:hls] Skip ('#EXT-X-PROGRAM-DATE-TIME:2024-05-23T14:02:33Z')
flutter: [FFmpeg:http] Opening 'http://[2409:8087:4c0a:22:1::43]:6610/170000001115/UmaiCHAN111128BESTVSMGSMG/1/202405/231400/20240521020555_24226.ts?zduration=10&zte_bandwidth=0&ts_min=1&prog_time=20240523140233&IASHttpSessionId=SLB397220240523140306707570&AuthInfo=9kOOdBn7MFF%2F2bWjKgahUU6FFmRK8Hl0ytyd5e5kWGEwoDIwMxbrlyyVy9x6ZDKnldIYKOjBOUjRyoym5n7Kg0yIYstFTUfqtC14fzxhy5Y&ztecid=UmaiCHAN111128BESTVSMGSMG&ispcode=34' for reading
Release有问题,但是Debug正常 setGlobalOption("log", "debug"); setGlobalOption("ffmpeg.log", "All"); setLogHandler((p0, p1) { print(p1); }); 我是这样打印日志的,不知道是否完整
到这里卡了,这次position是负数
Failed to change device orientation: Error Domain=UISceneErrorDomain Code=101 "None of the requested orientations are supported by the view controller. Requested: landscapeLeft, landscapeRight; Supported: portrait" UserInfo={NSLocalizedDescription=None of the requested orientations are supported by the view controller. Requested: landscapeLeft, landscapeRight; Supported: portrait}
flutter: default 0x102642b20 new FrameReader...
flutter: Registered audio backends: AudioQueue OpenAL null
flutter: default 0x10263fee0 new FrameReader...
flutter: Registered audio backends: AudioQueue OpenAL null
flutter: 0x102619cc0 mdk::Player::Player()
flutter: player property: video.decoder = shader_resource=0
flutter: player property: avformat.strict = experimental
flutter: player property: avio.protocol_whitelist = file,rtmp,http,https,tls,rtp,tcp,udp,crypto,httpproxy,data,concatf,concat,subfile
flutter: player property: avformat.rtsp_transport = tcp
flutter: video decoders: "VT", "FFmpeg"
flutter: video decoders: "VT", "FFmpeg"
flutter: default FrameReader0x102642b20 state: 0=>0=>0, 0
flutter: default0x102642b20 virtual void mdk::FrameReader::stop(), current state: 0
flutter: default FrameReader0x102642b20 state: 0=>0=>0, 0
flutter: default0x102642b20 virtual void mdk::FrameReader::stop(), current state: 0
flutter: AudioQueueStart ERROR: 0
flutter: 0x109044c00 MediaControl.prepare(0, ...) http://[2409:8087:4c0a:22:1::11]:6410/170000001115/UmaiCHAN111128BESTVSMGSMG/index.m3u8?AuthInfo=9kOOdBn7MFF%2F2bWjKgahUU6FFmRK8Hl0ytyd5e5kWGEwoDIwMxbrlyyVy9x6ZDKnldIYKOjBOUjRyoym5n7Kg0yIYstFTUfqtC14fzxhy5Y
flutter: default 0x102642b20 FrameReader.start(0, ...)
flutter: default 0x102642b20 FrameReader::update MediaStatus 0=>0X2
flutter: default FrameReader0x102642b20 state: 0=>0=>1, 0
flutter: default FrameReader0x102642b20 state: 0=>1=>1, 0
flutter: default FrameReader0x102642b20 request to pause 1, loaded: 0.
flutter: default FrameReader0x102642b20 state: 0=>1=>2, 0
flutter: default FrameReader0x102642b20 state requested: 2, current: 0
flutter: virtual void mdk::AudioBackendAudioQueue::pause(bool)138 ERROR>>> AudioQueuePause(queue_): -50
flutter:
flutter: start frame reader thread: 0x16db6f000
flutter: Trying MediaIO FFmpeg
flutter: 0x301d78a80 open url: http://[2409:8087:4c0a:22:1::11]:6410/170000001115/UmaiCHAN111128BESTVSMGSMG/index.m3u8?AuthInfo=9kOOdBn7MFF%2F2bWjKgahUU6FFmRK8Hl0ytyd5e5kWGEwoDIwMxbrlyyVy9x6ZDKnldIYKOjBOUjRyoym5n7Kg0yIYstFTUfqtC14fzxhy5Y
flutter: 0x301d78a80 url opened
flutter: format adts is used for http://[2409:8087:4c0a:22:1::11]:6410/170000001115/UmaiCHAN111128BESTVSMGSMG/index.m3u8?AuthInfo=9kOOdBn7MFF%2F2bWjKgahUU6FFmRK8Hl0ytyd5e5kWGEwoDIwMxbrlyyVy9x6ZDKnldIYKOjBOUjRyoym5n7Kg0yIYstFTUfqtC14fzxhy5Y
flutter: default 0x102642b20 FrameReader::update MediaStatus 0X2=>0X2
flutter: 0x10358d590 avio set class
flutter: before avformat_open_input. io: 0x301d78a80(FFmpeg)/pb: 0x10358d590, url: http://[2409:8087:4c0a:22:1::11]:6410/170000001115/UmaiCHAN111128BESTVSMGSMG/index.m3u8?AuthInfo=9kOOdBn7MFF%2F2bWjKgahUU6FFmRK8Hl0ytyd5e5kWGEwoDIwMxbrlyyVy9x6ZDKnldIYKOjBOUjRyoym5n7Kg0yIYstFTUfqtC14fzxhy5Y
flutter: [FFmpeg:?] mime type is not rfc8216 compliant
flutter: [FFmpeg:hls] Skip ('#EXT-X-VERSION:3')
flutter: [FFmpeg:hls] Skip ('#EXT-X-PROGRAM-DATE-TIME:2024-05-23T14:14:33Z')
flutter: [FFmpeg:hls] Skip ('#EXT-X-PROGRAM-DATE-TIME:2024-05-23T14:14:43Z')
flutter: [FFmpeg:hls] Skip ('#EXT-X-PROGRAM-DATE-TIME:2024-05-23T14:14:53Z')
flutter: [FFmpeg:hls] Skip ('#EXT-X-PROGRAM-DATE-TIME:2024-05-23T14:15:03Z')
flutter: [FFmpeg:hls] Skip ('#EXT-X-PROGRAM-DATE-TIME:2024-05-23T14:15:13Z')
flutter: [FFmpeg:hls] Skip ('#EXT-X-PROGRAM-DATE-TIME:2024-05-23T14:15:23Z')
flutter: [FFmpeg:hls] Opening 'http://[2409:8087:4c0a:22:1::28]:6610/170000001115/UmaiCHAN111128BESTVSMGSMG/1/202405/231400/20240521020555_24301.ts?zduration=10&zte_bandwidth=0&ts_min=1&prog_time=20240523141503&IASHttpSessionId=SLB399820240523141606630287&AuthInfo=9kOOdBn7MFF%2F2bWjKgahUU6FFmRK8Hl0ytyd5e5kWGEwoDIwMxbrlyyVy9x6ZDKnldIYKOjBOUjRyoym5n7Kg0yIYstFTUfqtC14fzxhy5Y&ztecid=UmaiCHAN111128BESTVSMGSMG&ispcode=34' for reading
flutter: [FFmpeg:hls] Opening 'http://[2409:8087:4c0a:22:1::28]:6610/170000001115/UmaiCHAN111128BESTVSMGSMG/1/202405/231400/20240521020555_24302.ts?zduration=10&zte_bandwidth=0&ts_min=1&prog_time=20240523141513&IASHttpSessionId=SLB399820240523141606630287&AuthInfo=9kOOdBn7MFF%2F2bWjKgahUU6FFmRK8Hl0ytyd5e5kWGEwoDIwMxbrlyyVy9x6ZDKnldIYKOjBOUjRyoym5n7Kg0yIYstFTUfqtC14fzxhy5Y&ztecid=UmaiCHAN111128BESTVSMGSMG&ispcode=34' for reading
flutter: after avformat_open_input. pb: 0x10358d590, iformat: 0x103ef3ec8, context flags: 2097280, input format flags: 49664
flutter: unsupported avformat options: rtsp_transport=tcp
flutter: Format: hls, range: 52123485 +0ms, bitrate: 0, size: 0
Programs:
Program id 0
Metadata:
variant_bitrate: 0
Video:
track 0 stream#0, range: 52123485 +0ms, frames: 0
codec: hevc tag: 0X24 profile: 1 level: 120, yuv420p, bpc:8, bpp:12(8,8,8), channels:(1,1,1), map: 0 1 2 0, bitrate: 0, 1920x1080, fps: 25, bframes: 0, primaries: BT709, trc: BT709, matrix: BT709, range: Limited
extra data(97): 00 00 01 40 01 0C 01 FF FF 01 60 00 00 03 00 90 00 00 03 00 00 03 00 78 AC 0C 00 00 0F A0 00 01 86 A1 40 00 00 00 01 42 01 01 01 60 00 00 03 00 90 00 00 03 00 00 03 00 78 A0 03 C0 80 10 E5 96 B9 24 C9 AE 59 E0 2D 40 40 40 41 00 00 03 03 E8 00 00 61 A8 08 00 00 00 01 44 01 E0 76 B0 26 40 00
Metadata:
variant_bitrate: 0
Audio:
track 0 stream#1, range: 52123549 +0ms, frames: 0
codec: aac tag: 0XF profile: 1 level: -99, sample size: 0/0, block align: 0, frame_size: 1024, f32p stereo(2) @32000Hz, bitrate: 0
Metadata:
variant_bitrate: 0
flutter: 0x109044c00 prepared callback is invoked
flutter: default 0x102642b20 FrameReader::update MediaStatus 0X2=>0X4
flutter: ***buffering progress 0%***
flutter: default 0x102642b20 FrameReader::update MediaStatus 0X4=>0X14
flutter: virtual void mdk::AudioBackendAudioQueue::pause(bool)138 ERROR>>> AudioQueuePause(queue_): -50
flutter:
flutter: ++++++++++++BUFFERING START++++++++++++
flutter:
flutter: 1 pkt duration: 0.032000, duration:63, dy_duration_delta=0=>32, live_eos_timeout=5000
flutter: 1 pkt duration: 0.032000, duration:63, dy_duration_delta=0=>32, live_eos_timeout=5000
flutter: default FrameReader0x102642b20 state: 0=>2=>1, 1
flutter: default FrameReader0x102642b20 update state: 0=>1
flutter: default FrameReader0x102642b20 state: 1=>1=>2, 1
flutter: default FrameReader0x102642b20 update state: 1=>2
flutter: starting decode loop thread mdk.adec1@0x16dc87000
flutter: 0x102619cd0 setRenderAPI(3, 0x0)
flutter: getVideoOutContext 0x0 => 0x30310d2f0. vo count: 1
flutter: 0x102619cd0 setVideoSurfaceSize(1920x1080, 0x0)
flutter: audio stream#1 starting decoding loop from decoder index 0...
flutter: creating audio decoder: auto...
flutter: opening audio decoder: FFmpeg...
flutter: starting decode loop thread mdk.vdec0@0x16dd9f000setLoop(0), now 0/0
flutter: 0x109044c00 virtual void mdk::MediaControlPush::setState(PlaybackState)@1062 requested state 2=>2, current state 2. status: 0X14
flutter: virtual void mdk::AudioBackendAudioQueue::pause(bool)opening ffmpeg audio decoder: aac
flutter: 138 ERROR>>> AudioQueuePause(queue_): -50
flutter:
flutter: default FrameReader0x102642b20 request to pause 1, loaded: 4.
flutter: default FrameReader0x102642b20 state: 2=>2=>2, 0
flutter: 0x109044c00-MediaControl::seek(pos: 60000, flag:0X402 +FromStart). now: 0
flutter: default 0x102642b20-FrameReader::seek(60000, 0X402)
flutter: default 0x102642b20 FrameReader::update MediaStatus 0X14=>0X94
flutter:
flutter: 0x102642b20 default FrameReaderImpl::seekTo(60000, 0X402 #1)
flutter: 0x109044c00 virtual void mdk::MediaControlPush::setState(PlaybackState)@1062 requested state 2=>1, current state 2. status: 0X94
flutter: AudioQueueStart ERROR: 0
flutter: default FrameReader0x102642b20 request to pause 0, loaded: 4.
flutter: default FrameReader0x102642b20 state: 2=>2=>1, 0
flutter: default FrameReader0x102642b20 state requested: 1, current: 2
flutter: seekTo(60000) found video stream#0 packet at -2 in [52123.484622, 52124.323622] s
flutter: AVCodec.Audio[aac.] decoder: 1 Single threads
flutter: aac f32p, stereo @32000Hz
flutter: video stream#0 starting decoding loop from decoder index 0...
flutter: creating video decoder: VT...
flutter: 0x10250e508mdk::NativeVideoBufferPool::NativeVideoBufferPool()
flutter: Try to use IOSurface OpenGL(ES) interop: true
flutter: opening video decoder: VT...
flutter: codec 'hvc1' for VT
flutter: VT hardware decode support: 1
flutter: NALU count: 3
flutter: 0: 3+33, VPS
flutter: 1: 39+47, SPS
flutter: 2: 89+8, PPS
flutter: ***buffering progress 83%***
flutter: <CMVideoFormatDescription 0x303d4e040 [0x20e63feb0]> {
mediaType:'vide'
mediaSubType:'hvc1'
mediaSpecific: {
codecType: 'hvc1' dimensions: 1920 x 1080
}
extensions: {{
BitsPerComponent = 8;
CVFieldCount = 1;
CVImageBufferChromaLocationBottomField = Left;
CVImageBufferChromaLocationTopField = Left;
CVImageBufferColorPrimaries = "ITU_R_709_2";
CVImageBufferTransferFunction = "ITU_R_709_2";
CVImageBufferYCbCrMatrix = "ITU_R_709_2";
CVPixelAspectRatio = {
HorizontalSpacing = 1;
VerticalSpacing = 1;
};
FullRangeVideo = 0;
SampleDescriptionExtensionAtoms = {
hvcC = {length = 126, bytes = 0x01016000 00009000 00000000 78f000fc ... 4401e076 b0264000 };
};
}}
}
flutter: seekTo(60000) found audio stream#1 packet at -2 in [52123.548622, 52124.444622] s
flutter: audio stream#1 sending 1 invalid AOT frame @52123.548622s. seeking: 0
flutter: 0x109044c00 1st audio frame @52123.548622
flutter: 0x109044c00 seek end audio frame @52123.548622 seek_pos_: 60000, sync_ao_ 1
flutter: AudioRenderer format: f32, stereo @32000Hz, requested: f32p, stereo @32000Hz
flutter: AudioRenderer format changed and reinitialize
flutter: ***buffering progress 100%***
flutter: default 0x102642b20 FrameReader::update MediaStatus 0X94=>0X1A4
flutter: AudioQueueStart ERROR: 0
flutter: ++++++++++++BUFFERING END++++++++++++
flutter:
flutter: virtual int64_t mdk::PacketIOWrapper::seek(int64_t, SeekFlag)@596 seek target(from 52123485): 60000ms, flags: +FromStart. now: 52124.404622
flutter: default 0x102642b20 FrameReader::update MediaStatus 0X1A4=>0X1A4
flutter: Seek position 52183485 is out of media time range 52123485+991
flutter: Seek start. target time: 52124476000 avseek flags: 1
flutter: av_seek_frame error with flag AVSEEK_FLAG_BACKWARD: Operation not permitted. try to seek without the flag
flutter: Error ret @515 /Users/runner/work/mdk-sdk/mdk-sdk/mdk/ffmpeg/plugin/FFmpegPacketIO.cpp: (0xffffffff) Operation not permitted
flutter: default 0x102642b20 FrameReader::update MediaStatus 0X1A4=>0X124
flutter: PacketIO seek error #1
flutter: default FrameReader0x102642b20 #1 seekComplete -1
flutter: default 0x102642b20 FrameReader::update MediaStatus 0X124=>0X124
flutter: default FrameReader 0x102642b20 callbacks 0, seeking 0 flag 0, seekComplete#1 @-1
flutter: default FrameReader0x102642b20 state: 2=>1=>1, 1
flutter: default FrameReader0x102642b20 update state: 2=>1
flutter: decode stored recovery packets: 0
flutter: ***buffering progress 0%***
flutter: default 0x102642b20 FrameReader::update MediaStatus 0X124=>0X114
flutter: Using audio backend: AudioQueue
flutter: ++++++++++++BUFFERING START++++++++++++
flutter:
flutter: video stream#0 is seeking #1... got flush pkt. flush decoder and drop frames until seek target 179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368.0000s...
flutter: 0x109044c00 1st video frame to render @-1.000000s, sync time: 0.009000
flutter: invalid video frame @-1.000000
flutter: video stream#0 1st packet@52124.444622 without key frame will be dropped!!!!!!!!!!!!!!!!!!!
flutter: 0x109044c00 ao opened: 1, reopen: 1, bad ao: 0. valid: 0
flutter: 0x300238408 filter graph:
flutter: +-----------+
| src |default--[32000Hz fltp:stereo]--swr:default
| (abuffer) |
+-----------+
+---------------+
swr:default--[32000Hz flt:stereo]--default| dst |
| (abuffersink) |
+---------------+
+-------------+
src:default--[32000Hz fltp:stereo]--default| swr |default--[32000Hz flt:stereo]--dst:default
| (aresample) |
+-------------+
flutter: [FFmpeg:http] Opening 'http://[2409:8087:4c0a:22:1::28]:6610/170000001115/UmaiCHAN111128BESTVSMGSMG/1/202405/231400/20240521020555_24303.ts?zduration=10&zte_bandwidth=0&ts_min=1&prog_time=20240523141523&IASHttpSessionId=SLB399820240523141606630287&AuthInfo=9kOOdBn7MFF%2F2bWjKgahUU6FFmRK8Hl0ytyd5e5kWGEwoDIwMxbrlyyVy9x6ZDKnldIYKOjBOUjRyoym5n7Kg0yIYstFTUfqtC14fzxhy5Y&ztecid=UmaiCHAN111128BESTVSMGSMG&ispcode=34' for reading
flutter: [FFmpeg:hls] Opening 'http://[2409:8087:4c0a:22:1::28]:6610/170000001115/UmaiCHAN111128BESTVSMGSMG/index.m3u8?AuthInfo=9kOOdBn7MFF%2F2bWjKgahUU6FFmRK8Hl0ytyd5e5kWGEwoDIwMxbrlyyVy9x6ZDKnldIYKOjBOUjRyoym5n7Kg0yIYstFTUfqtC14fzxhy5Y&IASHttpSessionId=SLB399820240523141606630287' for reading
flutter: [FFmpeg:hls] Skip ('#EXT-X-VERSION:3')
flutter: [FFmpeg:hls] Skip ('#EXT-X-PROGRAM-DATE-TIME:2024-05-23T14:14:43Z')
flutter: [FFmpeg:hls] Skip ('#EXT-X-PROGRAM-DATE-TIME:2024-05-23T14:14:53Z')
flutter: [FFmpeg:hls] Skip ('#EXT-X-PROGRAM-DATE-TIME:2024-05-23T14:15:03Z')
flutter: [FFmpeg:hls] Skip ('#EXT-X-PROGRAM-DATE-TIME:2024-05-23T14:15:13Z')
flutter: [FFmpeg:hls] Skip ('#EXT-X-PROGRAM-DATE-TIME:2024-05-23T14:15:23Z')
flutter: [FFmpeg:hls] Skip ('#EXT-X-PROGRAM-DATE-TIME:2024-05-23T14:15:33Z')
flutter: [FFmpeg:http] Opening 'http://[2409:8087:4c0a:22:1::28]:6610/170000001115/UmaiCHAN111128BESTVSMGSMG/1/202405/231400/20240521020555_24304.ts?zduration=10&zte_bandwidth=0&ts_min=1&prog_time=20240523141533&IASHttpSessionId=SLB399820240523141606630287&AuthInfo=9kOOdBn7MFF%2F2bWjKgahUU6FFmRK8Hl0ytyd5e5kWGEwoDIwMxbrlyyVy9x6ZDKnldIYKOjBOUjRyoym5n7Kg0yIYstFTUfqtC14fzxhy5Y&ztecid=UmaiCHAN111128BESTVSMGSMG&ispcode=34' for reading
找到原因了,是我调用seek跳过片头,导致卡住了(不知道什么Debug模式没问题),不过还是有个bug,就是时长,显示28:00:54,直播应该显示0才对
实际还不是28小时,格式化有问题,我把这个duration打印出来了 flutter: +++duration2--2562047788:00:54.775616
2562047788小时。。
debug模式duration正常
是不是要用#EXT-X-ENDLIST来判断下是否是直播
是只有seek才会卡住?你在 https://github.com/wang-bin/fvp/blob/master/lib/src/video_player_mdk.dart#L237 分别加下面两种看看有没有效果
player.setBufferRange(min: 0, max: 600000);
player.setBufferRange(min: 1000, max: 600000);
1.按你的方案解决了缓冲太少问题 if (_lowLatency > 0) { // +nobuffer: the 1st key-frame packet is dropped. -nobuffer: high latency player.setProperty('avformat.fflags', '+nobuffer'); player.setProperty('avformat.fpsprobesize', '0'); if (_lowLatency > 1) { player.setBufferRange(min: 0, max: 1000, drop: true); } else { player.setBufferRange(min: 0, max: 0); } } else { player.setBufferRange(min: 0, max: 120000); }
2.直播seek确实有问题,其实这个问题不是seek问题,而且duration获取数据不准确导致的,debug获取正确duration为0(直播),seek估计无效了,但是release模式duration是天文数字,这个时候seek就卡住了,希望可以解决release模式下获取duration不准确问题
1.按你的方案解决了缓冲太少问题
setBufferRange的min设为1000也试下,默认是这个值
2.直播seek确实有问题,其实这个问题不是seek问题,而且duration获取数据不准确导致的,debug获取正确duration为0(直播),seek估计无效了,但是release模式duration是天文数字,这个时候seek就卡住了,希望可以解决release模式下获取duration不准确问题
直播没发seek,只有已缓冲的部分可以seek过去。duration我看下怎么处理,mac上测了下是个接近0的值,实际应该是个动态增长的值
_controller.addListener(() {
var value = _controller.value;
print('value: $value');
if (value.isCompleted) {
print('value.isCompleted');
}
setState(() {});
});
输出
flutter: value: VideoPlayerValue(duration: 0:00:00.057000, size: Instance of 'Size', position: 0:00:19.899000, caption: Caption(number: 0, start: 0:00:00.000000, end: 0:00:00.000000, text: ), captionOffset: 0:00:00.000000, buffered: [DurationRange(start: 0:00:00.019899, end: 0:00:23.659000)], isInitialized: true, isPlaying: true, isLooping: false, isBuffering: false, volume: 1.0, playbackSpeed: 1.0, errorDescription: null, isCompleted: false),
flutter: value: VideoPlayerValue(duration: 0:00:00.057000, size: Instance of 'Size', position: 0:00:19.899000, caption: Caption(number: 0, start: 0:00:00.000000, end: 0:00:00.000000, text: ), captionOffset: 0:00:00.000000, buffered: [DurationRange(start: 0:00:00.020402, end: 0:00:24.162000)], isInitialized: true, isPlaying: true, isLooping: false, isBuffering: false, volume: 1.0, playbackSpeed: 1.0, errorDescription: null, isCompleted: false),
flutter: value: VideoPlayerValue(duration: 0:00:00.057000, size: Instance of 'Size', position: 0:00:20.402000, caption: Caption(number: 0, start: 0:00:00.000000, end: 0:00:00.000000, text: ), captionOffset: 0:00:00.000000, buffered: [DurationRange(start: 0:00:00.020402, end: 0:00:24.162000)], isInitialized: true, isPlaying: true, isLooping: false, isBuffering: false, volume: 1.0, playbackSpeed: 1.0, errorDescription: null, isCompleted: false),
flutter: value: VideoPlayerValue(duration: 0:00:00.057000, size: Instance of 'Size', position: 0:00:20.402000, caption: Caption(number: 0, start: 0:00:00.000000, end: 0:00:00.000000, text: ), captionOffset: 0:00:00.000000, buffered: [DurationRange(start: 0:00:00.020898, end: 0:00:24.617000)], isInitialized: true, isPlaying: true, isLooping: false, isBuffering: false, volume: 1.0, playbackSpeed: 1.0, errorDescription: null, isCompleted: false),
flutter: value: VideoPlayerValue(duration: 0:00:00.057000, size: Instance of 'Size', position: 0:00:20.898000, caption: Caption(number: 0, start: 0:00:00.000000, end: 0:00:00.000000, text: ), captionOffset: 0:00:00.000000, buffered: [DurationRange(start: 0:00:00.020898, end: 0:00:24.617000)], isInitialized: true, isPlaying: true, isLooping: false, isBuffering: false, volume: 1.0, playbackSpeed: 1.0, errorDescription: null, isCompleted: false),
flutter: value: VideoPlayerValue(duration: 0:00:00.057000, size: Instance of 'Size', position: 0:00:20.898000, caption: Caption(number: 0, start: 0:00:00.000000, end: 0:00:00.000000, text: ), captionOffset: 0:00:00.000000, buffered: [DurationRange(start: 0:00:00.021404, end: 0:00:25.123000)], isInitialized: true, isPlaying: true, isLooping: false, isBuffering: false, volume: 1.0, playbackSpeed: 1.0, errorDescription: null, isCompleted: false),
flutter: value: VideoPlayerValue(duration: 0:00:00.057000, size: Instance of 'Size', position: 0:00:21.404000, caption: Caption(number: 0, start: 0:00:00.000000, end: 0:00:00.000000, text: ), captionOffset: 0:00:00.000000, buffered: [DurationRange(start: 0:00:00.021404, end: 0:00:25.123000)], isInitialized: true, isPlaying: true, isLooping: false, isBuffering: false, volume: 1.0, playbackSpeed: 1.0, errorDescription: null, isCompleted: false),
flutter: value: VideoPlayerValue(duration: 0:00:00.057000, size: Instance of 'Size', position: 0:00:21.404000, caption: Caption(number: 0, start: 0:00:00.000000, end: 0:00:00.000000, text: ), captionOffset: 0:00:00.000000, buffered: [DurationRange(start: 0:00:00.021901, end: 0:00:25.700000)], isInitialized: true, isPlaying: true, isLooping: false, isBuffering: false, volume: 1.0, playbackSpeed: 1.0, errorDescription: null, isCompleted: false),
flutter: value: VideoPlayerValue(duration: 0:00:00.057000, size: Instance of 'Size', position: 0:00:21.901000, caption: Caption(number: 0, start: 0:00:00.000000, end: 0:00:00.000000, text: ), captionOffset: 0:00:00.000000, buffered: [DurationRange(start: 0:00:00.021901, end: 0:00:25.700000)], isInitialized: true, isPlaying: true, isLooping: false, isBuffering: false, volume: 1.0, playbackSpeed: 1.0, errorDescription: null, isCompleted: false),
min如果设置成0,就没有缓冲提示了,value.isBuffering一直false, 所以我最终min设置了2000 max设置大一点缓冲就多一点, 不过这个只是解决缓冲提示,缓冲速度问题,并解决不了直播duration不正确的问题,debug没问题,只有release才有问题 你要真机release才可以出现这个问题
直播duration是接近0的值才是对的吧,这样可以判定是否直播了,其它播放器也是接近0
调整min我是想知道对卡住有没有影响. debug的duration 是多少?
调整min对卡住没效果,应该是直播seek失败了吧,debug的duration是对的0:00:00.057000,就是这个值,release是2562047788:00:54.775616
flutter: Format: hls, range: 51343485 +0ms, bitrate: 0, size: 0
我看日志里市场都是 0ms,不知为啥 fluttre 里的不是0。https://github.com/wang-bin/fvp/blob/v0.18.0/lib/src/video_player_mdk.dart#L53 这行我把0改成了一个大的值
duration 是个负数。你拉下master的代码,我把<=0的duration设成double.maxFinite.toInt()了,你用这个值判断。另外你更新下依赖看看seek还会不会卡住
pod cache clean mdk
find . -name Podfile.lock -delete
rm -rf {mac,i}os/Pods
if (info.video != null) { final vc = info.video![0].codec; size = Size(vc.width.toDouble(), (vc.height.toDouble() / vc.par).roundToDouble()); if (info.video![0].rotation % 180 == 90) { size = Size(size.height, size.width); } } print("++++++++info---${info.duration}"); 我在这里打印了duration, 同一个直播,反复去测试,一会++++++++info----9223372036854776 一会++++++++info---41 如果他是一个小于1000的正常的数值,seek就是正常的 如果他是9223372036854776,那么seek就会卡,而且这个时候是负数的不是duration,而是position有时候会是负数 以上测试已经重新pod,我没懂为什么要吧duration==0的时候你改改成最大值。。。而且就是现在mdk传过来9223372036854776(这个就是最大值吧)才出问题,小于1000的是没有问题的
print("++++++++info---${info.duration}"); streamCtl.add(VideoEvent( eventType: VideoEventType.initialized, duration: Duration( milliseconds: info.duration < 0 || info.duration == double.maxFinite.toInt() ? 0 : info .duration) // FIXME: live stream info.duraiton == 0 and result a seekTo(0) in play() , size: size));
以上代码解决了duration不正确,及seek问题,已经反复测试了几十个直播
if (info.video != null) { final vc = info.video![0].codec; size = Size(vc.width.toDouble(), (vc.height.toDouble() / vc.par).roundToDouble()); if (info.video![0].rotation % 180 == 90) { size = Size(size.height, size.width); } } print("++++++++info---${info.duration}"); 我在这里打印了duration, 同一个直播,反复去测试,一会++++++++info----9223372036854776 一会++++++++info---41 如果他是一个小于1000的正常的数值,seek就是正常的 如果他是9223372036854776,那么seek就会卡,而且这个时候是负数的不是duration,而是position有时候会是负数 以上测试已经重新pod,我没懂为什么要吧duration==0的时候你改改成最大值。。。而且就是现在mdk传过来9223372036854776(这个就是最大值吧)才出问题,小于1000的是没有问题的
我记得以前测的时候duration设0,然后setLooping(true),开始播放后video_player会立刻seek到0,然后死循环了,估计是video_player那边判断position大于duration了就自动给你seek回去,我这边没法控制,所以干脆设double.maxFinite.toInt()。现在测了下发现没这个问题了
你那边为啥期望duration是0呢?如果是double.maxFinite.toInt() 你也可在app代码里处理下
最新代码修复了直播duration问题,之前出现接近于0但非0是因为直播流的mediaInfo.duration是从0开始一直在增长的,为当前已下载的时长。视频刚加载完成在native代码的回调里是0,但是native调用dart代码会通过消息机制,dart代码执行的时候已经过了一段时间了,native里已经读了一部分数据,所以initialized状态的时候duration > 0。现在用户代码里直播的判断方式是 duration.inMicroseconds == double.maxFinite.toInt()
另外最新的依赖修复了另一个播放卡住bug
发现2个问题 1.直播视频Debug模式正常播放,Release模式时长Duration显示28:00:54,可以正常看见第一帧画面但无法播放。偶尔Position还会是负数。 IOS17.4,iPad Air5/iPhone SE2 fvp: ^0.18.0 mdk 0.27.0 使用默认registerWith();
http://[2409:8087:4c0a:22:1::11]:6410/170000001115/UmaiCHAN111128BESTVSMGSMG/index.m3u8?AuthInfo=9kOOdBn7MFF%2F2bWjKgahUU6FFmRK8Hl0ytyd5e5kWGEwoDIwMxbrlyyVy9x6ZDKnldIYKOjBOUjRyoym5n7Kg0yIYstFTUfqtC14fzxhy5Y
2.缓冲一直保持比当前Position多几秒,可以提高下载速度么? VideoPlayerController.value.buffered 缓冲太慢,就多几秒