wang-bin / fvp

Flutter video player plugin for all desktop+mobile platforms. download prebuilt examples from github actions. https://pub.dev/packages/fvp
BSD 3-Clause "New" or "Revised" License
197 stars 31 forks source link

Video freezes after seeking to the future #45

Closed GideonKock closed 10 months ago

GideonKock commented 1 year ago

This should work to have the last frame in a stream:

_controller.seekTo(Duration(days: 30));

The problem is that the video freezes when using fvp.

wang-bin commented 1 year ago

I've tested a local video file, no freeze, the last frame is displayed. can you show me your log?

GideonKock commented 1 year ago

I use a stream (networkUrl) from a camera. I don't get debug information using the following initState:

  @override
  void initState() {
    super.initState();
    _controller = VideoPlayerController.networkUrl(Uri.https('127.0.0.1:55756',
        '/Acs/Streaming/Video/Live/Mp4/?camera=18081_f01a4296-7683-4247-9c27-4e540d0dac7d&quality=medium&audio=0'))
      ..initialize().then((_) {
        _controller.play();
        _controller.addListener(() {
          if (_controller.value.hasError) {
            print("VideoPlayer Error: ${_controller.value.errorDescription}");
          }
        });
        setState(() {});
      });
  }
wang-bin commented 1 year ago

lives streams do not support seeking

GideonKock commented 1 year ago

Ok. Is there another way to reduce the delays of a livestream? There is a delay of a few seconds compared to the media_kit package.

GideonKock commented 1 year ago

Using the normal video_player (with Chewi) it is possible: https://stackoverflow.com/questions/62530978/how-to-correctly-catch-up-to-the-latest-position-in-a-live-stream-using-video-pl

wang-bin commented 1 year ago

try the latest code

registerWith(options: {
    'lowLatency': 1, // optional for network streams. 2: may drop earliest frames if more than 1s is cached
    });
wang-bin commented 1 year ago

Using the normal video_player (with Chewi) it is possible: https://stackoverflow.com/questions/62530978/how-to-correctly-catch-up-to-the-latest-position-in-a-live-stream-using-video-pl

not implemented here

GideonKock commented 1 year ago

Thanks. I tried your proposal, but it doesn't seem to have an effect. Another option is to temporarily set the speed to 1.25 to get closer to the latest frame. I tried this, and it's a small improvement, though it's not a great solution.

wang-bin commented 1 year ago

I need your log

Add

import 'package:logging/logging.dart';
import 'package:intl/intl.dart';

add the following lines before registerWith()

  Logger.root.level = Level.ALL;
  final df = DateFormat("HH:mm:ss.SSS");
  Logger.root.onRecord.listen((record) {
    print('${record.loggerName}.${record.level.name}: ${df.format(record.time)}: ${record.message}');
  });

and

Past log here
GideonKock commented 1 year ago
Restarted application in 685ms.
flutter: mdk.INFO: 15:34:12.837: 0.22.1 (git 324fb6b) - Multimedia Development Kit. Copyright (c) 2016-2023 WangBin(QtAV author) <wbsecg1 at gmail.com>
Build for: Windows0x0600/10.0.22621 x86_64; MSVC1935; vcruntime14.35.32215.0/msvcp140.dll; 15:36:26 Oct 23 2023
flutter: fvp.FINE: 15:34:13.017: 51126564 player1144020574912 create(https://..@127.0.0.1:55756/Acs/Streaming/Video/Live/Mp4/%3Fcamera=18081_f01a4296-7683-4247-9c27-4e540d0dac7d&quality=medium&audio=0)

flutter: mdk.INFO: 15:34:13.153: default0000010A5D2C5360 new FrameReader...
flutter: mdk.INFO: 15:34:13.153: Registered audio backends: XAudio2 DSound null
flutter: mdk.INFO: 15:34:13.153: default0000010A5D2C3DD0 new FrameReader...
flutter: mdk.INFO: 15:34:13.153: Registered audio backends: XAudio2 DSound null
flutter: mdk.INFO: 15:34:13.153: 0000010A5CE40FC0__cdecl mdk::abi::Player::Player(void)
flutter: mdk.INFO: 15:34:13.153: player property: keep_open = 1
flutter: mdk.INFO: 15:34:13.153: player property: avio.protocol_whitelist = file,rtmp,http,https,tls,rtp,tcp,udp,crypto,httpproxy,data,concatf,concat,subfile
flutter: mdk.INFO: 15:34:13.153: video decoders: "MFT:d3d=11", "D3D11", "CUDA", "FFmpeg"
flutter: mdk.INFO: 15:34:13.153: video decoders: "MFT:d3d=11", "D3D11", "CUDA", "FFmpeg"
flutter: mdk.INFO: 15:34:13.153: default FrameReader0000010A5D2C5360 state: 0=>0=>0, 0
flutter: mdk.INFO: 15:34:13.153: default0000010A5D2C5360 void __cdecl mdk::abi::FrameReader::stop(void), current state: 0
flutter: mdk.INFO: 15:34:13.153: default FrameReader0000010A5D2C5360 state: 0=>0=>0, 0
flutter: mdk.INFO: 15:34:13.153: default0000010A5D2C5360 void __cdecl mdk::abi::FrameReader::stop(void), current state: 0
flutter: mdk.INFO: 15:34:13.153: 0000010A7644DA40 MediaControl.prepare(0, ...) https://...@127.0.0.1:55756/Acs/Streaming/Video/Live/Mp4/%3Fcamera=18081_f01a4296-7683-4247-9c27-4e540d0dac7d&quality=medium&audio=0
flutter: mdk.INFO: 15:34:13.153: default 0000010A5D2C5360 FrameReader.start(0, ...)
flutter: mdk.INFO: 15:34:13.153: default 0000010A5D2C5360 FrameReader::update MediaStatus 0=>0X2
flutter: fvp.FINE: 15:34:13.154: 671104668 player1144020574912 onMediaStatus: MediaStatus(noMedia) => MediaStatus(+loading)
flutter: mdk.INFO: 15:34:13.155: default FrameReader0000010A5D2C5360 state: 0=>0=>1, 0
flutter: mdk.INFO: 15:34:13.155: default FrameReader0000010A5D2C5360 state: 0=>1=>1, 0
flutter: mdk.INFO: 15:34:13.155: start frame reader thread: 29956
flutter: mdk.INFO: 15:34:13.155: Trying MediaIO FFmpeg for protocol "https"
flutter: mdk.INFO: 15:34:13.155: 0000010A66BEF6A0 open url: https://..@127.0.0.1:55756/Acs/Streaming/Video/Live/Mp4/%3Fcamera=18081_f01a4296-7683-4247-9c27-4e540d0dac7d&quality=medium&audio=0
flutter: mdk.INFO: 15:34:13.376: 0000010A66BEF6A0 url opened
flutter: mdk.INFO: 15:34:13.377: default 0000010A5D2C5360 FrameReader::update MediaStatus 0X2=>0X2
flutter: mdk.INFO: 15:34:13.377: before avformat_open_input. io: 0000010A66BEF6A0(FFmpeg/pb: 0000010A71815FC0, url: https://..@127.0.0.1:55756/Acs/Streaming/Video/Live/Mp4/%3Fcamera=18081_f01a4296-7683-4247-9c27-4e540d0dac7d&quality=medium&audio=0
flutter: mdk.INFO: 15:34:13.718: after avformat_open_input. pb: 0000010A71815FC0, iformat: 00007FFC8B3BAE90 context flags: 2097280, input format flags: 67141640
flutter: mdk.INFO: 15:34:15.045: Format: mov,mp4,m4a,3gp,3g2,mj2, range: 0 +1398ms, bitrate: 0, size: 0
Metadata:
  major_brand: isom
  minor_version: 1
  compatible_brands: isomiso5dash
Streams: 1
 Video:
  stream#0, range: 0 +1398ms, frames: 0
  codec: h264 tag: 'avc1' profile: 66 level: 41, yuv420p, bpc:8, bpp:12(8,8,8), channels:(1,1,1), map: 0 1 2 0, bitrate: 2735040, 1280x800, fps: 15, bframes: 0, primaries: BT709, trc: BT709, matrix: BT709, range: Full
  extra data(34): 01 42 00 29 FF E1 00 13 67 42 00 29 E2 90 0A 00 CB 60 2D C0 40 40 69 07 89 11 50 01 00 04 68 CE 3C 80
  Metadata:
   language: eng
   handler_name: VideoHandler
   vendor_id: [0][0][0][0]
flutter: mdk.INFO: 15:34:15.046: default FrameReader0000010A5D2C5360 request to pause 1, loaded: 0.
flutter: mdk.INFO: 15:34:15.046: default FrameReader0000010A5D2C5360 state: 0=>1=>2, 0
flutter: mdk.INFO: 15:34:15.046: default FrameReader0000010A5D2C5360 state requested: 2, current: 0
flutter: mdk.INFO: 15:34:15.046: 0000010A7644DA40 prepared callback is invoked
flutter: mdk.INFO: 15:34:15.056: default 0000010A5D2C5360 FrameReader::update MediaStatus 0X2=>0X4
flutter: fvp.FINE: 15:34:15.056: 671104668 player1144020574912 onMediaStatus: MediaStatus(+loading) => MediaStatus(+loaded)
flutter: mdk.INFO: 15:34:15.057: ***buffering progress 0%***
flutter: mdk.INFO: 15:34:15.057: default 0000010A5D2C5360 FrameReader::update MediaStatus 0X4=>0X14
flutter: fvp.FINE: 15:34:15.057: 671104668 player1144020574912 onMediaStatus: MediaStatus(+loaded) => MediaStatus(+loaded+buffering)
flutter: mdk.INFO: 15:34:15.057: ++++++++++++BUFFERING START++++++++++++
flutter: mdk.INFO: 15:34:15.057:
flutter: fvp.FINE: 15:34:15.058: 671104668 player1144020574912 onEvent: reader.buffering 0
flutter: mdk.INFO: 15:34:15.058: default FrameReader0000010A5D2C5360 state: 0=>2=>1, 1
flutter: mdk.INFO: 15:34:15.058: default FrameReader0000010A5D2C5360 update state: 0=>1
flutter: fvp.FINE: 15:34:15.059: 671104668 player1144020574912 onPlaybackStateChanged: PlaybackState.stopped => PlaybackState.playing
flutter: mdk.INFO: 15:34:15.059: default FrameReader0000010A5D2C5360 state: 1=>1=>2, 1
flutter: mdk.INFO: 15:34:15.059: default FrameReader0000010A5D2C5360 update state: 1=>2
flutter: fvp.FINE: 15:34:15.059: 671104668 player1144020574912 onPlaybackStateChanged: PlaybackState.playing => PlaybackState.paused
flutter: mdk.INFO: 15:34:15.059: starting decode loop thread mdk.vdec0@33344
flutter: fvp.FINE: 15:34:15.060: 671104668 player1144020574912 onEvent: thread.video 1
flutter: mdk.INFO: 15:34:15.060: video stream#0 starting decoding loop from decoder index 0...
flutter: mdk.INFO: 15:34:15.060: creating video decoder: MFT:d3d=11...
flutter: mdk.INFO: 15:34:15.060: opening video decoder: MFT...
flutter: mdk.INFO: 15:34:15.061: try to convert extra data to annexb
flutter: mdk.INFO: 15:34:15.061: sps count: 1
flutter: mdk.INFO: 15:34:15.061: pps count: 1
flutter: mdk.INFO: 15:34:15.061: nal field length: 4, annexb extradata size: 31
flutter: mdk.INFO: 15:34:15.061: uninit com required for MFT: true
flutter: mdk.INFO: 15:34:15.061: 4MFT flags: 81
flutter: mdk.INFO: 15:34:15.062: 1 MFT class activates found
flutter: mdk.INFO: 15:34:15.062: IMFActivate[0] attributes:
flutter: mdk.INFO: 15:34:15.062: 6 attributes: MFT_FRIENDLY_NAME_Attribute=Microsoft H264 Video Decoder MFT, MFT_INPUT_TYPES_Attributes=(64)[{MFMediaType_Video,MFVideoFormat_H264},{MFMediaType_Video,MFVideoFormat_H264_ES}], MFT_TRANSFORM_CLSID_Attribute=CLSID_MSH264DecoderMFT, MFT_OUTPUT_TYPES_Attributes=(160)[{MFMediaType_Video,MFVideoFormat_NV12},{MFMediaType_Video,MFVideoFormat_YV12},{MFMediaType_Video,MFVideoFormat_IYUV},{MFMediaType_Video,MFVideoFormat_I420},{MFMediaType_Video,MFVideoFormat_YUY2}], MF_TRANSFORM_FLAGS_Attribute=1, MF_TRANSFORM_CATEGORY_Attribute=MFT_CATEGORY_VIDEO_DECODER,
flutter: mdk.INFO: 15:34:15.062: Activating IMFActivate: Microsoft H264 Video Decoder MFT
flutter: mdk.INFO: 15:34:15.062: max supported size: 7680x4320
flutter: mdk.INFO: 15:34:15.064: dxgi adapter 0: vendor 8086, device 4680, revision c, Intel(R) UHD Graphics 770
flutter: mdk.INFO: 15:34:15.075: set d3d11 device. Feature level: 0XB000, create flags: 0
flutter: mdk.INFO: 15:34:15.076: d3d11: 0000010A73BB10B0, dxgi adapter vendor 8086, device 4680, revision c, Intel(R) UHD Graphics 770. UMA
flutter: mdk.INFO: 15:34:15.076: set d3d11 device. Feature level: 0XB000, create flags: 0
flutter: mdk.INFO: 15:34:15.076: d3d11: 0000010A73BB10B0, dxgi adapter vendor 8086, device 4680, revision c, Intel(R) UHD Graphics 770. UMA
flutter: mdk.INFO: 15:34:15.081: setLoop(0), now 0/0
flutter: mdk.INFO: 15:34:15.081: 0000010A7644DA40 void __cdecl mdk::abi::MediaControlPush::setState(enum mdk::abi::State)@1007 requested state 2=>2, current state 2. status: 0X14
flutter: mdk.INFO: 15:34:15.081: default FrameReader0000010A5D2C5360 request to pause 1, loaded: 4.
flutter: mdk.INFO: 15:34:15.081: default FrameReader0000010A5D2C5360 state: 2=>2=>2, 0
flutter: mdk.INFO: 15:34:15.081: 0000010A7644DA40 void __cdecl mdk::abi::MediaControlPush::setState(enum mdk::abi::State)@1007 requested state 2=>1, current state 2. status: 0X14
flutter: mdk.INFO: 15:34:15.081: default FrameReader0000010A5D2C5360 request to pause 0, loaded: 4.
flutter: mdk.INFO: 15:34:15.081: default FrameReader0000010A5D2C5360 state: 2=>2=>1, 0
flutter: mdk.INFO: 15:34:15.081: default FrameReader0000010A5D2C5360 state requested: 1, current: 2
flutter: mdk.INFO: 15:34:15.105: d3d11.1 device feature level: 0xc100, requested: 0xc200.
flutter: mdk.INFO: 15:34:15.106: 0000010A66CA1C30->mdk::abi::D3D11NativeBufferPool::D3D11NativeBufferPool
flutter: mdk.INFO: 15:34:15.106: Selected MFT attributes:
flutter: mdk.INFO: 15:34:15.106: 12 attributes: MF_SA_D3D11_AWARE=1, CODECAPI_AVDecVideoThumbnailGenerationMode=0, CODECAPI_AVDecVideoMaxCodedWidth=7680, CODECAPI_AVDecVideoMaxCodedHeight=4320, CODECAPI_AVDecNumWorkerThreads=24, CODECAPI_AVLowLatencyMode=1, MFT_DECODER_QUALITY_MANAGEMENT_CUSTOM_CONTROL=0, {ac2c1838-1eb9-4933-85a3-cd62d1b9ec1b}=0, MFT_DECODER_QUALITY_MANAGEMENT_RECOVERY_WITHOUT_ARTIFACTS=1, MF_SA_D3D_AWARE=1, MFT_DECODER_EXPOSE_OUTPUT_TYPES_IN_NATIVE_ORDER=0, CODECAPI_AVDecVideoAcceleration_H264=1,
flutter: mdk.INFO: 15:34:15.106: stream cout: in=1, out=1
flutter: mdk.INFO: 15:34:15.106: mdk::abi::MFTCodec::selectInputType
flutter: mdk.INFO: 15:34:15.106: 2 attributes: MF_MT_MAJOR_TYPE=MFMediaType_Video, MF_MT_SUBTYPE=MFVideoFormat_H264,
flutter: mdk.INFO: 15:34:15.106: 2 attributes: MF_MT_MAJOR_TYPE=MFMediaType_Video, MF_MT_SUBTYPE=MFVideoFormat_H264_ES,
flutter: mdk.INFO: 15:34:15.106: selected IMFMediaType index: 0
flutter: mdk.INFO: 15:34:15.106: SetInputType:
flutter: mdk.INFO: 15:34:15.106: 5 attributes: MF_MT_FRAME_SIZE=5497558139680 (1280x800), MF_MT_AVG_BITRATE=2735040, MF_MT_MAJOR_TYPE=MFMediaType_Video, MF_MT_INTERLACE_MODE=7, MF_MT_SUBTYPE=MFVideoFormat_H264,
flutter: mdk.INFO: 15:34:15.106: used input type:
flutter: mdk.INFO: 15:34:15.106: 10 attributes: MF_MT_FRAME_SIZE=5497558139680 (1280x800), MF_MT_AVG_BITRATE=2735040, MF_MT_COMPRESSED=1, MF_MT_MAJOR_TYPE=MFMediaType_Video, MF_MT_DEFAULT_STRIDE=0, MF_MT_AVG_BIT_ERROR_RATE=0, MF_MT_FIXED_SIZE_SAMPLES=0, MF_MT_ALL_SAMPLES_INDEPENDENT=0, MF_MT_INTERLACE_MODE=7, MF_MT_SUBTYPE=MFVideoFormat_H264,
flutter: mdk.INFO: 15:34:15.106: mdk::abi::MFTCodec::selectOutputType0
flutter: mdk.INFO: 15:34:15.106: 12 attributes: MF_MT_FRAME_SIZE=5497558139680 (1280x800), MF_MT_AVG_BITRATE=2735040, MF_MT_MAJOR_TYPE=MFMediaType_Video, MF_MT_DEFAULT_STRIDE=1280, MF_MT_FIXED_SIZE_SAMPLES=1, MF_MT_VIDEO_ROTATION=0, MF_MT_FRAME_RATE=128849018881001 (30000:1001), MF_MT_PIXEL_ASPECT_RATIO=4294967297 (1:1), MF_MT_ALL_SAMPLES_INDEPENDENT=1, MF_MT_SAMPLE_SIZE=1536000, MF_MT_INTERLACE_MODE=7, MF_MT_SUBTYPE=MFVideoFormat_NV12,
flutter: mdk.INFO: 15:34:15.106: 12 attributes: MF_MT_FRAME_SIZE=5497558139680 (1280x800), MF_MT_AVG_BITRATE=2735040, MF_MT_MAJOR_TYPE=MFMediaType_Video, MF_MT_DEFAULT_STRIDE=1280, MF_MT_FIXED_SIZE_SAMPLES=1, MF_MT_VIDEO_ROTATION=0, MF_MT_FRAME_RATE=128849018881001 (30000:1001), MF_MT_PIXEL_ASPECT_RATIO=4294967297 (1:1), MF_MT_ALL_SAMPLES_INDEPENDENT=1, MF_MT_SAMPLE_SIZE=1536000, MF_MT_INTERLACE_MODE=7, MF_MT_SUBTYPE=MFVideoFormat_YV12,
flutter: mdk.INFO: 15:34:15.107: 12 attributes: MF_MT_FRAME_SIZE=5497558139680 (1280x800), MF_MT_AVG_BITRATE=2735040, MF_MT_MAJOR_TYPE=MFMediaType_Video, MF_MT_DEFAULT_STRIDE=1280, MF_MT_FIXED_SIZE_SAMPLES=1, MF_MT_VIDEO_ROTATION=0, MF_MT_FRAME_RATE=128849018881001 (30000:1001), MF_MT_PIXEL_ASPECT_RATIO=4294967297 (1:1), MF_MT_ALL_SAMPLES_INDEPENDENT=1, MF_MT_SAMPLE_SIZE=1536000, MF_MT_INTERLACE_MODE=7, MF_MT_SUBTYPE=MFVideoFormat_IYUV,
flutter: mdk.INFO: 15:34:15.107: 12 attributes: MF_MT_FRAME_SIZE=5497558139680 (1280x800), MF_MT_AVG_BITRATE=2735040, MF_MT_MAJOR_TYPE=MFMediaType_Video, MF_MT_DEFAULT_STRIDE=1280, MF_MT_FIXED_SIZE_SAMPLES=1, MF_MT_VIDEO_ROTATION=0, MF_MT_FRAME_RATE=128849018881001 (30000:1001), MF_MT_PIXEL_ASPECT_RATIO=4294967297 (1:1), MF_MT_ALL_SAMPLES_INDEPENDENT=1, MF_MT_SAMPLE_SIZE=1536000, MF_MT_INTERLACE_MODE=7, MF_MT_SUBTYPE=MFVideoFormat_I420,
flutter: mdk.INFO: 15:34:15.107: 12 attributes: MF_MT_FRAME_SIZE=5497558139680 (1280x800), MF_MT_AVG_BITRATE=2735040, MF_MT_MAJOR_TYPE=MFMediaType_Video, MF_MT_DEFAULT_STRIDE=2560, MF_MT_FIXED_SIZE_SAMPLES=1, MF_MT_VIDEO_ROTATION=0, MF_MT_FRAME_RATE=128849018881001 (30000:1001), MF_MT_PIXEL_ASPECT_RATIO=4294967297 (1:1), MF_MT_ALL_SAMPLES_INDEPENDENT=1, MF_MT_SAMPLE_SIZE=2048000, MF_MT_INTERLACE_MODE=7, MF_MT_SUBTYPE=MFVideoFormat_YUY2,
flutter: mdk.INFO: 15:34:15.107: selected IMFMediaType index: 0
flutter: mdk.INFO: 15:34:15.107: SetOutputType:
flutter: mdk.INFO: 15:34:15.107: 12 attributes: MF_MT_FRAME_SIZE=5497558139680 (1280x800), MF_MT_AVG_BITRATE=2735040, MF_MT_MAJOR_TYPE=MFMediaType_Video, MF_MT_DEFAULT_STRIDE=1280, MF_MT_FIXED_SIZE_SAMPLES=1, MF_MT_VIDEO_ROTATION=0, MF_MT_FRAME_RATE=128849018881001 (30000:1001), MF_MT_PIXEL_ASPECT_RATIO=4294967297 (1:1), MF_MT_ALL_SAMPLES_INDEPENDENT=1, MF_MT_SAMPLE_SIZE=1536000, MF_MT_INTERLACE_MODE=7, MF_MT_SUBTYPE=MFVideoFormat_NV12,
flutter: mdk.INFO: 15:34:15.107: used output type:
flutter: mdk.INFO: 15:34:15.108: 0000010A73F8E410 14 attributes: MF_MT_FRAME_SIZE=5497558139680 (1280x800), MF_MT_AVG_BITRATE=2735040, MF_MT_COMPRESSED=0, MF_MT_MAJOR_TYPE=MFMediaType_Video, MF_MT_DEFAULT_STRIDE=1280, MF_MT_AVG_BIT_ERROR_RATE=0, MF_MT_FIXED_SIZE_SAMPLES=1, MF_MT_VIDEO_ROTATION=0, MF_MT_FRAME_RATE=128849018881001 (30000:1001), MF_MT_PIXEL_ASPECT_RATIO=4294967297 (1:1), MF_MT_ALL_SAMPLES_INDEPENDENT=1, MF_MT_SAMPLE_SIZE=1536000, MF_MT_INTERLACE_MODE=7, MF_MT_SUBTYPE=MFVideoFormat_NV12,
flutter: mdk.INFO: 15:34:15.108: input stream info: dwFlags=7, cbSize=4096, cbAlignment=0, hnsMaxLatency=0, cbMaxLookahead=0
flutter: mdk.INFO: 15:34:15.108: output stream info: dwFlags=263, cbSize=2048000, cbAlignment=0
flutter: mdk.INFO: 15:34:15.108: onOutputTypeChanged: 14 attributes: MF_MT_FRAME_SIZE=5497558139680 (1280x800), MF_MT_AVG_BITRATE=2735040, MF_MT_COMPRESSED=0, MF_MT_MAJOR_TYPE=MFMediaType_Video, MF_MT_DEFAULT_STRIDE=1280, MF_MT_AVG_BIT_ERROR_RATE=0, MF_MT_FIXED_SIZE_SAMPLES=1, MF_MT_VIDEO_ROTATION=0, MF_MT_FRAME_RATE=128849018881001 (30000:1001), MF_MT_PIXEL_ASPECT_RATIO=4294967297 (1:1), MF_MT_ALL_SAMPLES_INDEPENDENT=1, MF_MT_SAMPLE_SIZE=1536000, MF_MT_INTERLACE_MODE=7, MF_MT_SUBTYPE=MFVideoFormat_NV12,
flutter: mdk.INFO: 15:34:15.108: output format: nv12, bpc:8, bpp:12(8,16), channels:(1,2), map: 0 1 2 0
flutter: mdk.INFO: 15:34:15.108: output size: 1280x800, stride: 1280x800
flutter: mdk.INFO: 15:34:15.108: MFT decoder is ready
flutter: fvp.FINE: 15:34:15.108: 671104668 player1144020574912 onEvent: decoder.video 0
flutter: mdk.INFO: 15:34:15.108: decode stored recovery packets: 0
flutter: mdk.INFO: 15:34:15.108: ***buffering progress 100%***
flutter: mdk.INFO: 15:34:15.108: default 0000010A5D2C5360 FrameReader::update MediaStatus 0X14=>0X124
flutter: fvp.FINE: 15:34:15.108: 671104668 player1144020574912 onMediaStatus: MediaStatus(+loaded+buffering) => MediaStatus(+loaded+prepared+buffered)
flutter: mdk.INFO: 15:34:15.109: ++++++++++++BUFFERING END++++++++++++
flutter: mdk.INFO: 15:34:15.109:
flutter: fvp.FINE: 15:34:15.109: 671104668 player1144020574912 onEvent: reader.buffering 100
flutter: mdk.INFO: 15:34:15.110: MFT_PROCESS_OUTPUT_STATUS_NEW_STREAMS
flutter: mdk.INFO: 15:34:15.110: MF_E_TRANSFORM_STREAM_CHANGE
flutter: mdk.INFO: 15:34:15.111: mdk::abi::MFTCodec::selectOutputType0
flutter: mdk.INFO: 15:34:15.111: 19 attributes: MF_MT_FRAME_SIZE=5497558139680 (1280x800), MF_MT_AVG_BITRATE=2735040, MF_MT_YUV_MATRIX=1, MF_MT_MAJOR_TYPE=MFMediaType_Video, MF_MT_TRANSFER_FUNCTION=5, MF_MT_DEFAULT_STRIDE=1280, MF_MT_GEOMETRIC_APERTURE=(16) 0 0 0 0 0 0 0 0 0 5 0 0 20 3 0 0, MF_MT_PAN_SCAN_APERTURE=(16) 0 0 0 0 0 0 0 0 0 5 0 0 20 3 0 0, MF_MT_FIXED_SIZE_SAMPLES=1, MF_MT_VIDEO_NOMINAL_RANGE=1, MF_MT_VIDEO_ROTATION=0, MF_MT_FRAME_RATE=128849018881001 (30000:1001), MF_MT_PIXEL_ASPECT_RATIO=4294967297 (1:1), MF_MT_ALL_SAMPLES_INDEPENDENT=1, MF_MT_MINIMUM_DISPLAY_APERTURE=(16) 0 0 0 0 0 0 0 0 0 5 0 0 20 3 0 0, MF_MT_SAMPLE_SIZE=1536000, MF_MT_VIDEO_PRIMARIES=2, MF_MT_INTERLACE_MODE=7, MF_MT_SUBTYPE=MFVideoFormat_NV12,
flutter: mdk.INFO: 15:34:15.111: 19 attributes: MF_MT_FRAME_SIZE=5497558139680 (1280x800), MF_MT_AVG_BITRATE=2735040, MF_MT_YUV_MATRIX=1, MF_MT_MAJOR_TYPE=MFMediaType_Video, MF_MT_TRANSFER_FUNCTION=5, MF_MT_DEFAULT_STRIDE=1280, MF_MT_GEOMETRIC_APERTURE=(16) 0 0 0 0 0 0 0 0 0 5 0 0 20 3 0 0, MF_MT_PAN_SCAN_APERTURE=(16) 0 0 0 0 0 0 0 0 0 5 0 0 20 3 0 0, MF_MT_FIXED_SIZE_SAMPLES=1, MF_MT_VIDEO_NOMINAL_RANGE=1, MF_MT_VIDEO_ROTATION=0, MF_MT_FRAME_RATE=128849018881001 (30000:1001), MF_MT_PIXEL_ASPECT_RATIO=4294967297 (1:1), MF_MT_ALL_SAMPLES_INDEPENDENT=1, MF_MT_MINIMUM_DISPLAY_APERTURE=(16) 0 0 0 0 0 0 0 0 0 5 0 0 20 3 0 0, MF_MT_SAMPLE_SIZE=1536000, MF_MT_VIDEO_PRIMARIES=2, MF_MT_INTERLACE_MODE=7, MF_MT_SUBTYPE=MFVideoFormat_YV12,
flutter: mdk.INFO: 15:34:15.112: 19 attributes: MF_MT_FRAME_SIZE=5497558139680 (1280x800), MF_MT_AVG_BITRATE=2735040, MF_MT_YUV_MATRIX=1, MF_MT_MAJOR_TYPE=MFMediaType_Video, MF_MT_TRANSFER_FUNCTION=5, MF_MT_DEFAULT_STRIDE=1280, MF_MT_GEOMETRIC_APERTURE=(16) 0 0 0 0 0 0 0 0 0 5 0 0 20 3 0 0, MF_MT_PAN_SCAN_APERTURE=(16) 0 0 0 0 0 0 0 0 0 5 0 0 20 3 0 0, MF_MT_FIXED_SIZE_SAMPLES=1, MF_MT_VIDEO_NOMINAL_RANGE=1, MF_MT_VIDEO_ROTATION=0, MF_MT_FRAME_RATE=128849018881001 (30000:1001), MF_MT_PIXEL_ASPECT_RATIO=4294967297 (1:1), MF_MT_ALL_SAMPLES_INDEPENDENT=1, MF_MT_MINIMUM_DISPLAY_APERTURE=(16) 0 0 0 0 0 0 0 0 0 5 0 0 20 3 0 0, MF_MT_SAMPLE_SIZE=1536000, MF_MT_VIDEO_PRIMARIES=2, MF_MT_INTERLACE_MODE=7, MF_MT_SUBTYPE=MFVideoFormat_IYUV,
flutter: mdk.INFO: 15:34:15.112: 19 attributes: MF_MT_FRAME_SIZE=5497558139680 (1280x800), MF_MT_AVG_BITRATE=2735040, MF_MT_YUV_MATRIX=1, MF_MT_MAJOR_TYPE=MFMediaType_Video, MF_MT_TRANSFER_FUNCTION=5, MF_MT_DEFAULT_STRIDE=1280, MF_MT_GEOMETRIC_APERTURE=(16) 0 0 0 0 0 0 0 0 0 5 0 0 20 3 0 0, MF_MT_PAN_SCAN_APERTURE=(16) 0 0 0 0 0 0 0 0 0 5 0 0 20 3 0 0, MF_MT_FIXED_SIZE_SAMPLES=1, MF_MT_VIDEO_NOMINAL_RANGE=1, MF_MT_VIDEO_ROTATION=0, MF_MT_FRAME_RATE=128849018881001 (30000:1001), MF_MT_PIXEL_ASPECT_RATIO=4294967297 (1:1), MF_MT_ALL_SAMPLES_INDEPENDENT=1, MF_MT_MINIMUM_DISPLAY_APERTURE=(16) 0 0 0 0 0 0 0 0 0 5 0 0 20 3 0 0, MF_MT_SAMPLE_SIZE=1536000, MF_MT_VIDEO_PRIMARIES=2, MF_MT_INTERLACE_MODE=7, MF_MT_SUBTYPE=MFVideoFormat_I420,
flutter: mdk.INFO: 15:34:15.113: 19 attributes: MF_MT_FRAME_SIZE=5497558139680 (1280x800), MF_MT_AVG_BITRATE=2735040, MF_MT_YUV_MATRIX=1, MF_MT_MAJOR_TYPE=MFMediaType_Video, MF_MT_TRANSFER_FUNCTION=5, MF_MT_DEFAULT_STRIDE=2560, MF_MT_GEOMETRIC_APERTURE=(16) 0 0 0 0 0 0 0 0 0 5 0 0 20 3 0 0, MF_MT_PAN_SCAN_APERTURE=(16) 0 0 0 0 0 0 0 0 0 5 0 0 20 3 0 0, MF_MT_FIXED_SIZE_SAMPLES=1, MF_MT_VIDEO_NOMINAL_RANGE=1, MF_MT_VIDEO_ROTATION=0, MF_MT_FRAME_RATE=128849018881001 (30000:1001), MF_MT_PIXEL_ASPECT_RATIO=4294967297 (1:1), MF_MT_ALL_SAMPLES_INDEPENDENT=1, MF_MT_MINIMUM_DISPLAY_APERTURE=(16) 0 0 0 0 0 0 0 0 0 5 0 0 20 3 0 0, MF_MT_SAMPLE_SIZE=2048000, MF_MT_VIDEO_PRIMARIES=2, MF_MT_INTERLACE_MODE=7, MF_MT_SUBTYPE=MFVideoFormat_YUY2,
flutter: mdk.INFO: 15:34:15.113: selected IMFMediaType index: 0
flutter: mdk.INFO: 15:34:15.113: SetOutputType:
flutter: mdk.INFO: 15:34:15.113: 19 attributes: MF_MT_FRAME_SIZE=5497558139680 (1280x800), MF_MT_AVG_BITRATE=2735040, MF_MT_YUV_MATRIX=1, MF_MT_MAJOR_TYPE=MFMediaType_Video, MF_MT_TRANSFER_FUNCTION=5, MF_MT_DEFAULT_STRIDE=1280, MF_MT_GEOMETRIC_APERTURE=(16) 0 0 0 0 0 0 0 0 0 5 0 0 20 3 0 0, MF_MT_PAN_SCAN_APERTURE=(16) 0 0 0 0 0 0 0 0 0 5 0 0 20 3 0 0, MF_MT_FIXED_SIZE_SAMPLES=1, MF_MT_VIDEO_NOMINAL_RANGE=1, MF_MT_VIDEO_ROTATION=0, MF_MT_FRAME_RATE=128849018881001 (30000:1001), MF_MT_PIXEL_ASPECT_RATIO=4294967297 (1:1), MF_MT_ALL_SAMPLES_INDEPENDENT=1, MF_MT_MINIMUM_DISPLAY_APERTURE=(16) 0 0 0 0 0 0 0 0 0 5 0 0 20 3 0 0, MF_MT_SAMPLE_SIZE=1536000, MF_MT_VIDEO_PRIMARIES=2, MF_MT_INTERLACE_MODE=7, MF_MT_SUBTYPE=MFVideoFormat_NV12,
flutter: mdk.INFO: 15:34:15.114: used output type:
flutter: mdk.INFO: 15:34:15.114: 0000010A71C0C9F0 21 attributes: MF_MT_FRAME_SIZE=5497558139680 (1280x800), MF_MT_AVG_BITRATE=2735040, MF_MT_COMPRESSED=0, MF_MT_YUV_MATRIX=1, MF_MT_MAJOR_TYPE=MFMediaType_Video, MF_MT_TRANSFER_FUNCTION=5, MF_MT_DEFAULT_STRIDE=1280, MF_MT_GEOMETRIC_APERTURE=(16) 0 0 0 0 0 0 0 0 0 5 0 0 20 3 0 0, MF_MT_PAN_SCAN_APERTURE=(16) 0 0 0 0 0 0 0 0 0 5 0 0 20 3 0 0, MF_MT_AVG_BIT_ERROR_RATE=0, MF_MT_FIXED_SIZE_SAMPLES=1, MF_MT_VIDEO_NOMINAL_RANGE=1, MF_MT_VIDEO_ROTATION=0, MF_MT_FRAME_RATE=128849018881001 (30000:1001), MF_MT_PIXEL_ASPECT_RATIO=4294967297 (1:1), MF_MT_ALL_SAMPLES_INDEPENDENT=1, MF_MT_MINIMUM_DISPLAY_APERTURE=(16) 0 0 0 0 0 0 0 0 0 5 0 0 20 3 0 0, MF_MT_SAMPLE_SIZE=1536000, MF_MT_VIDEO_PRIMARIES=2, MF_MT_INTERLACE_MODE=7, MF_MT_SUBTYPE=MFVideoFormat_NV12,
flutter: mdk.INFO: 15:34:15.115: output stream info: dwFlags=263, cbSize=2048000, cbAlignment=0
flutter: mdk.INFO: 15:34:15.115: onOutputTypeChanged: 21 attributes: MF_MT_FRAME_SIZE=5497558139680 (1280x800), MF_MT_AVG_BITRATE=2735040, MF_MT_COMPRESSED=0, MF_MT_YUV_MATRIX=1, MF_MT_MAJOR_TYPE=MFMediaType_Video, MF_MT_TRANSFER_FUNCTION=5, MF_MT_DEFAULT_STRIDE=1280, MF_MT_GEOMETRIC_APERTURE=(16) 0 0 0 0 0 0 0 0 0 5 0 0 20 3 0 0, MF_MT_PAN_SCAN_APERTURE=(16) 0 0 0 0 0 0 0 0 0 5 0 0 20 3 0 0, MF_MT_AVG_BIT_ERROR_RATE=0, MF_MT_FIXED_SIZE_SAMPLES=1, MF_MT_VIDEO_NOMINAL_RANGE=1, MF_MT_VIDEO_ROTATION=0, MF_MT_FRAME_RATE=128849018881001 (30000:1001), MF_MT_PIXEL_ASPECT_RATIO=4294967297 (1:1), MF_MT_ALL_SAMPLES_INDEPENDENT=1, MF_MT_MINIMUM_DISPLAY_APERTURE=(16) 0 0 0 0 0 0 0 0 0 5 0 0 20 3 0 0, MF_MT_SAMPLE_SIZE=1536000, MF_MT_VIDEO_PRIMARIES=2, MF_MT_INTERLACE_MODE=7, MF_MT_SUBTYPE=MFVideoFormat_NV12,
flutter: mdk.INFO: 15:34:15.115: output format: nv12, bpc:8, bpp:12(8,16), channels:(1,2), map: 0 1 2 0
flutter: mdk.INFO: 15:34:15.115: output size: 1280x800, stride: 1280x800
flutter: mdk.INFO: 15:34:15.115: video area: (0, 0), 1280x800
flutter: mdk.INFO: 15:34:15.117: video stream#0 sending 1 invalid AOT frame @0.000000s. seeking: 0
flutter: mdk.INFO: 15:34:15.117: 0000010A7644DA40 1st video frame to render @0.000000s, sync time: 0.008000
flutter: mdk.INFO: 15:34:15.117: VideoRenderer clear buffered frames
flutter: mdk.INFO: 15:34:15.118: 0-track seek end video frame @0.000000 seek_pos_: -1
flutter: mdk.INFO: 15:34:15.118: VideoRenderer WxH=1280.000000x800.000000 1280.000000x800.000000, frame: 1280x800
flutter: mdk.INFO: 15:34:15.118: update transform 2d. scale: (1.000000, 1.000000), orientation: 0
flutter: mdk.INFO: 15:34:15.118: m: mat<4, 4>(
flutter: mdk.INFO: 15:34:15.120: 1  0  0  0
flutter: mdk.INFO: 15:34:15.120: 0  1  0  0
flutter: mdk.INFO: 15:34:15.121: 0  0  1  0
flutter: mdk.INFO: 15:34:15.121: 0  0  0  1
flutter: mdk.INFO: 15:34:15.121: )
flutter: mdk.INFO: 15:34:15.121: D3D11::Texture::ensureOnDevice from input.  Feature level: 0XC100, create flags: 0X800
flutter: mdk.INFO: 15:34:15.121: d3d11: 0000010A7618B7D0, dxgi adapter vendor 8086, device 4680, revision c, Intel(R) UHD Graphics 770. UMA
flutter: mdk.INFO: 15:34:15.121: input D3D11_TEXTURE2D_DESC.Width: 1280, Height: 800, MipLevels: 1, ArraySize: 1, Format: DXGI_FORMAT_NV12(103), SampleDesc{1, 0}, Usage: 0, BindFlags: 0, CPUAccessFlags: 0, MiscFlags: 2. desired bindFlags: 8, miscFlags: 0same device: 0. create a shared texture for input to copy input texture
flutter: mdk.INFO: 15:34:15.121: unknown, bpc:0, bpp:0(), channels:(), map: 0 0 0 0 => mapped nv12, bpc:8, bpp:12(8,16), channels:(1,2), map: 0 1 2 0
flutter: mdk.INFO: 15:34:15.121: dxgi format 0: DXGI_FORMAT_R8_UNORM
flutter: mdk.INFO: 15:34:15.121: dxgi format 1: DXGI_FORMAT_R8G8_UNORM
flutter: mdk.INFO: 15:34:15.121: d3d sync by fence
flutter: mdk.INFO: 15:34:15.121: default FrameReader0000010A5D2C5360 state: 2=>1=>1, 1
flutter: mdk.INFO: 15:34:15.121: default FrameReader0000010A5D2C5360 update state: 2=>1
flutter: fvp.FINE: 15:34:15.121: 671104668 player1144020574912 onPlaybackStateChanged: PlaybackState.paused => PlaybackState.playing
flutter: mdk.INFO: 15:34:15.121: frame color: BT709 BT709 BT709 Full. gamma: 2.200000, signal peak: 1.000000
flutter: mdk.INFO: 15:34:15.121:  -
flutter: mdk.INFO: 15:34:15.121: output color: BT709 UNSPECIFIED RGB Full. gamma: 2.200000, signal peak: 1.000000
flutter: mdk.INFO: 15:34:15.121: rgb primaries matrix: mat<3, 3>(
flutter: mdk.INFO: 15:34:15.121: 1  0  0
flutter: mdk.INFO: 15:34:15.121: 0  1  0
flutter: mdk.INFO: 15:34:15.121: 0  0  1
flutter: mdk.INFO: 15:34:15.121: )
flutter: mdk.INFO: 15:34:15.121: color transform: mat<4, 4>(
flutter: mdk.INFO: 15:34:15.121: 1  0  1.5748  -0.7874
flutter: mdk.INFO: 15:34:15.121: 1  -0.187324  -0.468124  0.327724
flutter: mdk.INFO: 15:34:15.122: 1  1.8556  0  -0.9278
flutter: mdk.INFO: 15:34:15.122: 0  0  0  1
flutter: mdk.INFO: 15:34:15.122: )
flutter: mdk.INFO: 15:34:15.122: EQ: mat<4, 4>(
flutter: mdk.INFO: 15:34:15.122: 1  0  0  0
flutter: mdk.INFO: 15:34:15.122: 0  1  0  0
flutter: mdk.INFO: 15:34:15.122: 0  0  1  0
flutter: mdk.INFO: 15:34:15.122: 0  0  0  1
flutter: mdk.INFO: 15:34:15.122: )
flutter: fvp.FINE: 15:34:15.122: 671104668 player1144020574912 onEvent: render.video 0
flutter: mdk.INFO: 15:34:15.122: video stream#0 AOT frame is sent
flutter: mdk.INFO: 15:34:15.177: 0 pkt duration: 0.066667,  duration:1464, dy_duration_delta=0=>66, live_eos_timeout=5000
flutter: mdk.INFO: 15:34:15.177: 0 pkt duration: 0.066667,  duration:1464, dy_duration_delta=0=>66, live_eos_timeout=5000
wang-bin commented 1 year ago

You must use github master branch code to test lowLatency option

GideonKock commented 1 year ago

Sorry, it wasn't updated. But it worked! Many thanks!

wang-bin commented 1 year ago

Do you apply any non-default options when using media-kit? If not, the result should be similar because we use ffmpeg to parse network streams.

wang-bin commented 1 year ago

I will make a new release this week. Then you can use the package from pub.dev

GideonKock commented 1 year ago

Do you apply any non-default options when using media-kit? If not, the result should be similar because we use ffmpeg to parse network streams.

No, I didn't. Didn't know the option. Can't test it because the new versions of media_kit can't handle self signed certificates