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

Playback Issue on Windows 7 with Online and HLS Streaming #179

Open mohammadinfo opened 1 week ago

mohammadinfo commented 1 week ago

When I play the file offline on Windows 7, it works fine and plays. Here’s the log:

``` FINE: 2024-11-13 16:43:03.727599: registerVideoPlayerPlatformsWith: null FINEST: 2024-11-13 16:43:17.877619: Added li--text widget t for P tag LI tag tag FINEST: 2024-11-13 16:43:24.117628: Added p--column widget tag r P tag FINE: 2024-11-13 16:43:33.857642: Built body successfuly. t FINEST: 2024-11-13 16:43:47.097660: Added root--text widget idth=0) for LI tag tag FINE: 2024-11-13 16:43:50.307665: Built body successfuly. t FINE: 2024-11-13 16:44:19.747706: XAudio2_9.dll 000F8B9710 new FrameReader... ll = 1 xperimFINEST: 2024-11-13 16:44:19.757706: no video renderer yer property: avio.reconnect_delay_max = 7 ate: , hhdrequested: 0 e)@1077 requested state 0=>0, current state 0. status: 0 FINE: 2024-11-13 16:44:19.757706: default FrameReader000000000F8B9710 request to pause 1, loaded: 0. FINE: 2024-11-13 16:44:19.757706: Selected avutil runtime version: 59.46.100 (build: 59.46.100), license: LGPL version 2.1 or later le-shared --enable-runtime-cpudetect --disable-iamf --enable-libvpl --disable-ptx-compression --enable-mediafoundation --disable-postproc --toolchain=msvc --windres=llvm-windres --extra-windresflags='--target=x86_64-pc-windows-msvc -I/c/Program\ Files/Microsoft\ Visual\ Studio/2022/Enterprise/VC/Tools/MSVC/14.41.34120/include -I/c/Program\ Files/Microsoft\ Visual\ Studio/2022/Enterprise/VC/Tools/MSVC/14.41.34120/ATLMFC/include -I/c/Program\ Files/Microsoft\ Visual\ Studio/2022/Enterprise/VC/Auxiliary/VS/include -I/c/Program\ Files\ \(x86\)/Windows\ Kits/10/include/10.0.22621.0/ucrt -I/c/Program\ Files\ \(x86\)/Windows\ Kits/10/include/10.0.22621.0/um -I/c/Program\ Files\ \(x86\)/Windows\ Kits/10/include/10.0.22621.0/shared -I/c/Program\ Files\ \(x86\)/Windows\ Kits/10/include/10.0.22621.0/winrt -I/c/Program\ Files\ \(x86\)/Windows\ Kits/10/include/10.0.22621.0/cppwinrt -I/c/Program\ Files\ \(x86\)/Windows\ Kits/NETFXSDK/4.8/include/um' --enable-pic --extra-cflags='-I/d/a/avbuild/avbuild/tools/Vulkan-Headers/include -MD -Zi -FS -guard:cf -I/d/a/avbuild/avbuild/tools/dep/include -D_WIN32_WINNT=0x0600' --extra-ldflags='-NODEFAULTLIB:libcmt -DEBUG -guard:cf -OPT:REF -SUBSYSTEM:CONSOLE' --enable-small --disable-outdevs --disable-filters --disable-muxers --disable-encoders --disable-decoders --disable-demuxers --disable-protocols --disable-filter=scale_cuda --enable-decoder='*sub*,movtext,*web*,aac*,ac3*,eac3*,alac*,ape,ass,av1*,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,ffv*' --enable-demuxer='*sub*,*ac3,*ac,*avs*,*[mj]peg*,*vc*,*web*,au,ape,ass,av[1i],concat,dnxhd,dts*,*dash*,*flv,gif,hls,h264,kux,matroska,mov,mp3,mxf,obu,ogg,pcm*,rawvideo,rt*p,spdif,srt,v210*,wav,*pipe,image2,mlv,nsv,nut' --enable-encoder='*_at,aac,gif,h26[3-4]*,av1*,hevc*,mjpeg*,*png,opus,pcm*,prores*,rawvideo,spdif,speedhq,*jpeg,*png,vp[8-9]*,wrapped_avframe,ff*,*nvenc,*qsv,*v4l2m2m,*vaapi,vorbis,*yuv*' --enable-muxer='*jpeg,fifo,flv,gif,hls,h264,hevc,image2,mov,mp4,mpegts,matroska,null,pcm*,rawvideo,spdif,*pipe,*segment,webm,wav,dash,nu*,og*' --enable-filter='*null*,afade,*fifo,*format,*resample,aeval,atempo,pan,crop,eq*,framerate,hw*,scale,volume,yadif*,allrgb,allyuv,*bars,color,test*,*key,draw*,*_qsv,*_vaapi,*v4l2*' --enable-protocol='cache,concat*,crypto*,data,fd,*file,ftp,h*,i*,pipe,rt*,s*,t*,u*' FINE: 2024-11-13 16:44:19.757706: try to load av module(avutil): C:\Users\Vesam\Desktop\namavar_windows7\ffmpeg-7.dll 2.1 or later FINE: 2024-11-13 16:44:19.757706: 000000000B0F5510 open url: mem://400687168+67909063 FINE: 2024-11-13 16:44:19.757706: 000000000B0F5510 url opened FINE: 2024-11-13 16:44:19.757706: Selected avcodec runtime version: 61.24.100 (build: 61.24.100), license: LGPL version 2.1 or later FINE: 2024-11-13 16:44:19.757706: avcodec_descriptor_next000007FEE60FB9C0 FINE: 2024-11-13 16:44:19.797706: default 000000000F8B9710 FrameReader::update MediaStatus 0X2=>0X2 FINE: 2024-11-13 16:44:19.797706: before avformat_open_input. io: 000000000B0F5510(Mem)/pb: 000000000EEC1DC0, url: mem://400687168+67909063 FINE: 2024-11-13 16:44:19.807706: FFmpeg/Libav runtime git-2024-11-07-2eb9c35-avbuild FINE: 2024-11-13 16:44:19.887706: [FFmpeg:mov,mp4,m4a,3gp,3g2,mj2] Protocol name not provided, cannot determine if input is local or a network protocol, buffers and access patterns cannot be configured optimally without knowing the protocol FINE: 2024-11-13 16:44:19.897706: after avformat_open_input. pb: 000000000EEC1DC0, iformat: 000007FEE6846820, context flags: 2097280, input format flags: 67141640 FINE: 2024-11-13 16:44:19.917706: unsupported avformat options: rtsp_transport=tcp reconnect=1 reconnect_delay_max=7 INFO: 2024-11-13 16:44:19.917706: 000000000F8B9710 ***buffering progress 0%*** MINFO: 2024-11-13 16:44:19.917706: ++++++++++++BUFFERING START++++++++++++ supported: uyyvyy411 rgb8 x2rgb10be x2bgr10be gbrap14beFINE: 2024-11-13 16:44:19.947706: 00000000F8B9710 creating video decoFINE: 2024-11-13 16:44:19.917706: 16657583 player186921600 onEvent: reader.buffering - - 0 3 16:44:19.947706: default 000000000F8B9710 FrameReader::update MediaStatus 0X14=>0X124 ndex 0... RANSFORM_CLSID_Attribute=CLSID_MSH264DecoderMFT, MFT_INPUT_TYPES_Attributes=(64)[{MFMediaType_Video,MFVideoFormat_H264},{MFMediaType_Video,MFVideoFormat_H264_ES}], 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}], MFT_FRIENDLY_NAME_Attribute=Microsoft H264 Video Decoder MFT, MF_TRANSFORM_FLAGS_Attribute=1, FINE: 2024-11-13 16:44:19.917706: default FrameReader000000000F8B9710 update state: 1=>2 FINE: 2024-11-13 16:44FINE: 2024-11-13 16:44:19.957706: sps count: 1 lter runtime version: 10.6.101 (build: 10.6.101), license: LGPL version 2.1 or later p41 encoder: HandBrake 1.3.3 2020061300 Streams: 2 Video: stream#0, range: 0 +1080967ms, frames: 32429 codec: h264 tag: 'avc1' profile: 77 level: 40, yuv420p, bpc:8, bpp:12(8,8,8), channels:(1,1,1), map: 0 1 2 0, bitrate: 333054, 1920x1080, fps: 30, bframes: 2, primaries: BT709, trc: BT709, matrix: BT709, range: Limited extra data(45): 01 4D 40 28 FF E1 00 1D 67 4D 40 28 EC A0 3C 01 13 F2 E0 2D 40 40 40 50 00 00 03 00 10 00 2B F2 00 F1 83 19 60 01 00 05 68 EA E3 CB 20 Metadata: creation_time: 2021-06-11T21:32:16.000000Z language: und handler_name: VideoHandler vendor_id: [0][0][0][0] Audio: stream#1, range: 0 +1080981ms, frames: 50672 codec: aac tag: 'mp4a' profile: 1 level: -99, sample size: 0/16, block align: 0, frame_size: 1024, f32p stereo(2) @48000Hz, bitrate: 160462 extra data(5): 11 90 56 E5 00 Metadata: creation_time: 2021-06-11T21:32:16.000000Z language: eng handler_name: Stereo vendor_id: [0][0][0][0] FINE: 2024-11-13 16:44:19.977706: (hr = D3D11CreateDevice(adapter.Get(), adapter ? D3D_DRIVER_TYPE_UNKNOWN : D3D_DRIVER_TYPE_HARDWARE , nullptr, flags, pFls, nFls , ( 7 ), &dev, nullptr, nullptr)) ERROR@254 D3D::CreateDevice11: (0X80070057) The parameter is incorrect. FINE: 2024-11-13 16:44:19.977706: Using audio backend: DirectSound FINE: 2024-11-13 16:44:20.017706: 000000000F6ED7B0 ao opened: 1, reopen: 1, bad ao: 0. valid: 0 FINE: 2024-11-13 16:44:20.147707: 000000000B4C27A0 setRenderAPI(4, 0000000000000000) FINE: 2024-11-13 16:44:20.147707: getVideoOutContext 0000000000000000 => 000000000ADFBBC0. vo count: 1 FINE: 2024-11-13 16:44:20.157707: 000000000B4C27A0 setVideoSurfaceSize(1920x1080, 0000000000000000) FINE: 2024-11-13 16:44:20.157707: set d3d11 device. Feature level: 0XA000, create flags: 0 FINE: 2024-11-13 16:44:20.157707: d3d11: 000000000F8D3C48, dxgi adapter vendor 8086, device 2a42, revision 7, Mobile Intel(R) 45 Express Chipset Family (Microsoft Corporation - WDDM 1.1). FINE: 2024-11-13 16:44:20.157707: set d3d11 device. Feature level: 0XA000, create flags: 0 FINE: 2024-11-13 16:44:20.157707: d3d11: 000000000F8D3C48, dxgi adapter vendor 8086, device 2a42, revision 7, Mobile Intel(R) 45 Express Chipset Family (Microsoft Corporation - WDDM 1.1). FINE: 2024-11-13 16:44:20.157707: 000000000B4C2790 player.setPlaybackRate(1.000000) d: 1, current: 2 enum mdk::abi::State)@1077 requested state 2=>1, current state 2. status: 0X124 FINE: 2024-11-13 16:44:20.219708: insert CSD meReader000000000F8B9710 state: 2=>1=>1, 1 FMediaType_Video, MF_MT_SUBTYPE=MFVideoFormat_NV12, MF_MT_FRAME_SIZE=8246337209400 (1920x1080), MF_MT_FRAME_RATE=128849018881001 (30000:1001), MF_MT_PIXEL_ASPECT_RATIO=4294967297 (1:1), MF_MT_INTERLACE_MODE=7, MF_MT_AVG_BITRATE=333054, MF_MT_DEFAULT_STRIDE=1920, MF_MT_ALL_SAMPLES_INDEPENDENT=1, MF_MT_FIXED_SIZE_SAMPLES=1, MF_MT_SAMPLE_SIZE=3110400, MF_MT_COMPRESSED=0, MF_MT_AVG_BIT_ERROR_RATE=0, FINE: 2024-11-13 16:44:20.235709: MF_E_TRANSFORM_STREAM_CHANGE. status: 0x100 Video, MF_MT_SUBTYPE=MFVideoFormat_NV12, MF_MT_FRAME_SIZE=8246337209408 (1920x1088), MF_MT_FRAME_RATE=128849018881001 (30000:1001), MF_MT_GEOMETRIC_APERTURE=(16) 0 0 0 0 0 0 0 0 80 7 0 0 38 4 0 0, MF_MT_MINIMUM_DISPLAY_APERTURE=(16) 0 0 0 0 0 0 0 0 80 7 0 0 38 4 0 0, MF_MT_PAN_SCAN_APERTURE=(16) 0 0 0 0 0 0 0 0 80 7 0 0 38 4 0 0, MF_MT_PIXEL_ASPECT_RATIO=4294967297 (1:1), MF_MT_VIDEO_PRIMARIES=2, MF_MT_INTERLACE_MODE=7, MF_MT_VIDEO_NOMINAL_RANGE=2, MF_MT_TRANSFER_FUNCTION=5, MF_MT_YUV_MATRIX=1, MF_MT_AVG_BITRATE=333054, MF_MT_DEFAULT_STRIDE=1920, MF_MT_ALL_SAMPLES_INDEPENDENT=1, MF_MT_FIXED_SIZE_SAMPLES=1, MF_MT_SAMPLE_SIZE=3133440, FINE: 2024-11-13 16:44:20.235709: 18 attributes: MF_MT_MAJOR_TYPE=MFMediaType_Video, MF_MT_SUBTYPE=MFVideoFormat_NV12, MF_MT_FRAME_SIZE=8246337209408 (1920x1088), MF_MT_FRAME_RATE=128849018881001 (30000:1001), MF_MT_GEOMETRIC_APERTURE=(16) 0 0 0 0 0 0 0 0 80 7 0 0 38 4 0 0, MF_MT_MINIMUM_DISPLAY_APERTURE=(16) 0 0 0 0 0 0 0 0 80 7 0 0 38 4 0 0, MF_MT_PAN_SCAN_APERTURE=(16) 0 0 0 0 0 0 0 0 80 7 0 0 38 4 0 0, MF_MT_PIXEL_ASPECT_RATIO=4294967297 (1:1), MF_MT_VIDEO_PRIMARIES=2, MF_MT_INTERLACE_MODE=7, MF_MT_VIDEO_NOMINAL_RANGE=2, MF_MT_TRANSFER_FUNCTION=5, MF_MT_YUV_MATRIX=1, MF_MT_AVG_BITRATE=333054, MF_MT_DEFAULT_STRIDE=1920, MF_MT_ALL_SAMPLES_INDEPENDENT=1, MF_MT_FIXED_SIZE_SAMPLES=1, MF_MT_SAMPLE_SIZE=3133440, FINE: 2024-11-13 16:44:20.245710: video area: (0, 0) 1920x1080 e: 1920x1088 channels:(1,2), map: 0 1 2 0 MF_MT_SUBTYPE=MFVideoFormat_NV12, MF_MT_FRAME_SIZE=8246337209408 (1920x1088), MF_MT_FRAME_RATE=128849018881001 (30000:1001), MF_MT_GEOMETRIC_APERTURE=(16) 0 0 0 0 0 0 0 0 80 7 0 0 38 4 0 0, MF_MT_MINIMUM_DISPLAY_APERTURE=(16) 0 0 0 0 0 0 0 0 80 7 0 0 38 4 0 0, MF_MT_PAN_SCAN_APERTURE=(16) 0 0 0 0 0 0 0 0 80 7 0 0 38 4 0 0, MF_MT_PIXEL_ASPECT_RATIO=4294967297 (1:1), MF_MT_VIDEO_PRIMARIES=2, MF_MT_INTERLACE_MODE=7, MF_MT_VIDEO_NOMINAL_RANGE=2, MF_MT_TRANSFER_FUNCTION=5, MF_MT_YUV_MATRIX=1, MF_MT_AVG_BITRATE=333054, MF_MT_DEFAULT_STRIDE=1920, MF_MT_ALL_SAMPLES_INDEPENDENT=1, MF_MT_FIXED_SIZE_SAMPLES=1, MF_MT_SAMPLE_SIZE=3133440, MF_MT_COMPRESSED=0, MF_MT_AVG_BIT_ERROR_RATE=0, FINE: 2024-11-13 16:44:20.389711: s->Init(tex) ERROR@382 D3D::EnsureResourceSync: (0X80004002) No such interface supported supported eter is incorrect. FINE: 2024-11-13 16:44:20.409711: 16657583 player186921600 onEvent: video - size - 0 1 , sync time: 0.186000 920x1080FINE: 2024-11-13 16:44:20.409711: 0 0 1 0 texture size: 1920x1088, vpp out size: 1920x1080 FINE: 2024-11-13 16:44:20.419711: ctx_.As(&ctx4_) ERROR@117 D3D11ResourceSync::tryFence: (0X80004002) No such interface supported c by map FINE: 2024-11-13 16:44:20.451712: ) 0 0 1 ( , color transform: mat<4, 4>( ma: 2.200000, signal peak: 1.000000 bpp:32(32), channels:(4), map: 0 1 2 3 , SampleDesc{1, 0}, Usage: 0, BindFlags: 28, CPUAccessFlags: 0, MiscFlags: 2. desired bindFlags: 8, miscFlags: 0same device, no copy, no share required, use input texture FINEST: 2024-11-13 16:44:20.471712: build hlsl elapsed: 15718us FINE: 2024-11-13 16:44:20.481712: dump UBO layout: align @offset +size /stride address name ~ path: type -> parent 16@0 +64/16 000000000B3A2C50 u_colorMatrix ~ u_colorMatrix: mat4 -> 0000000000000000 4 @64+4 /4 000000000B279360 u_ScaleA ~ u_ScaleA: float -> 0000000000000000 FINE: 2024-11-13 16:44:20.481712: 000000000F8B9710 video stream#0 AOT frame is sent st_frame - 0 FINE: 2024-11-13 16:44:30.955731: 000000000B4C2790 player.set(2) FINE: 2024-11-13 16:44:30.955731: default FrameReader000000000F8B9710 request to pause 1, loaded: 4. enum mdk::abi::State)@1077 requested state 1=>2, current state 1. status: 0X124 FINE: 2024-11-13 16:44:30.965731: 16657583 player186921600 onPlaybackStateChanged: PlaybackState.playing => PlaybackState.paused FINE: 2024-11-13 16:44:30.965731: default FrameReader000000000F8B9710 update state: 1=>2 ```

But when I try to play it online or with HLS, it doesn’t work and doesn’t respond. Here’s the log:

``` FINE: 2024-11-13 16:47:09.489985: default 000000000F8B9710 new FrameReader... 0000000) aFINE: 2024-11-13 16:47:09.489985: default 000000000A816AD0 new FrameReader... MFT:d3d=11, D3D11, DFINE: 2024-11-13 16:47:09.489985: 000000000F8D22E0 player property: avformat.rtsp_transport = tcp ,rtmp,http,https,tls,rtp,tcp,udp,crypto,httpproxy,data,concatf,concat,subfile FINE: 2024-11-13 16:47:09.529985: Error avrt::avio_open2(&avio_, ffmpeg::from_file_uri(in.c_str()), flags, &cb, &dict) @172 D:\a\mdk-sdk\mdk-sdk\mdk\ffmpeg\plugin\AVFormatIO.cpp: (0xb1b4b1ab) Unknown error occurred WARNING: 2024-11-13 16:47:09.529985: 000000000FC2DC00 url open error FINE: 2024-11-13 16:47:09.529985: default 000000000F8B9710 FrameReader::update MediaStatus 0X2=>0X2 FINE: 2024-11-13 16:47:09.529985: before avformat_open_input. io: 0000000000000000()/pb: 0000000000000000, url: https://app.amirnamaavar.ir/uploads/27-02-2022/video/dec/5e78014160ffe726374a04f2ccb372d5.mp4 FINE: 2024-11-13 16:47:09.569986: [FFmpeg:tls] Creating security context failed (0x80090326) FINE: 2024-11-13 16:47:09.569986: unsupported avformat options: rtsp_transport=tcp protocol_whitelist=file,rtmp,http,https,tls,rtp,tcp,udp,crypto,httpproxy,data,concatf,concat,subfile strict=experimental reconnect=1 reconnect_delay_max=7 FINE: 2024-11-13 16:47:09.569986: 2768default 000000000F8B9710 mdk::abi::FrameReader::update @1147: reset status_mask. status: 80000000 FINE: 2024-11-13 16:47:09.569986: 000000000F8B9710 mdk::abi::FrameReaderImpl::unload, current status 0x80000000, invalid: 0x80000000, loFINE: 2024-11-13 16:47:09.569986: default FrameReader000000000F8B9710 state: 0=>2=>0, 1 ```

It works correctly on Windows 10 and 11, but there’s an issue on Windows 7.

wang-bin commented 1 week ago

same as #40 and #22 , ssl on win7 does not support this url. you can use ffmpeg built with gnu tls, for example https://www.gyan.dev/ffmpeg/builds/ffmpeg-release-full-shared.7z , add dlls from the package and remove ffmpeg-7.dll, then a different ffmpeg will be used.

mohammadinfo commented 5 days ago

The procedure entry point kernel32. WaitOnAddress could not be located in the dynamic link library api-ms-win-core-synch-11-2-0.dll.

What should I do when I run Windows 7? In Windows 10, that's right.

wang-bin commented 5 days ago

The procedure entry point kernel32. WaitOnAddress could not be located in the dynamic link library api-ms-win-core-synch-11-2-0.dll.

What error message do you see?

What should I do when I run Windows 7? In Windows 10, that's right.

flutter <= 3.19. what's your flutter version?

mohammadinfo commented 5 days ago

What error message do you see?

This is the error message: The procedure entry point kernel32. WaitOnAddress could not be located in the dynamic link library api-ms-win-core-synch-11-2-0.dll.

flutter <= 3.19. what's your flutter version?

Flutter (Channel stable, 3.16.9, on Microsoft Windows [Version 10.0.19045.5011]

wang-bin commented 5 days ago

WaitOnAddress requires win8 and later, can you check which exe or dll use this function?

mohammadinfo commented 5 days ago

I'm currently using this version: ffmpeg-6.0-full_build-shared and my issue is resolved. However, when I use the latest version, it gives me the error I mentioned.

wang-bin commented 5 days ago

You have to report to whom build ffmpeg. I see Essentials build compatible with Windows 7 or above. Full build requires at least Windows 10 in https://www.gyan.dev/ffmpeg/builds

mohammadinfo commented 5 days ago

Okay, thanks.