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

Slow loading on lastest version #129

Closed abdelaziz-mahdy closed 3 months ago

abdelaziz-mahdy commented 3 months ago

Describe the bug loading local files are a bit slower, it loads for a while before starting the playback (on android)

on macos its the same speed as previous versions

network has the same problem, but it may be due internet speed Expected behavior it was much faster on previous versions

Log

https://justpaste.it/aifn6

wang-bin commented 3 months ago

The difference is previously ffmpeg 6.1 was used, now it's ffmpeg master branch. We noticed the performance downgrade a few months ago in ffmpeg 7.0 and later. We guess ffmpeg code is miscompiled or is broken. Can you try this https://sourceforge.net/projects/avbuild/files/android/ffmpeg-master-android-revert-8c936e9.tar.gz/download

abdelaziz-mahdy commented 3 months ago

The difference is previously ffmpeg 6.1 was used, now it's ffmpeg master branch. We noticed the performance downgrade a few months ago in ffmpeg 7.0 and later. We guess ffmpeg code is miscompiled or is broken. Can you try this https://sourceforge.net/projects/avbuild/files/android/ffmpeg-master-android-revert-8c936e9.tar.gz/download

Will try and let you know, can we open an issue for ffmpeg maybe it's something they can fix?

wang-bin commented 3 months ago

Need more tests to confirm which ffmpeg commit breaks

abdelaziz-mahdy commented 3 months ago

Need more tests to confirm which ffmpeg commit breaks

Okay, I will try to use the binaries you provided and if all is good then we can revert to it until we are sure all good I guess.

abdelaziz-mahdy commented 3 months ago

i am sorry i am confused on how to use this

The difference is previously ffmpeg 6.1 was used, now it's ffmpeg master branch. We noticed the performance downgrade a few months ago in ffmpeg 7.0 and later. We guess ffmpeg code is miscompiled or is broken. Can you try this https://sourceforge.net/projects/avbuild/files/android/ffmpeg-master-android-revert-8c936e9.tar.gz/download

wang-bin commented 3 months ago

replace mdk-sdk/lib/arm64-v8a/libffmpeg.so and rebuild

abdelaziz-mahdy commented 3 months ago

replace mdk-sdk/lib/arm64-v8a/libffmpeg.so and rebuild

doing that made the loading go from roughly 3 sec to less than a sec, very weird that the higher version of ffmpeg has that problem

can you revert back to ffmpeg 6.1 or thats not feasible?

wang-bin commented 3 months ago

I'm reverting that commit in my build. I don't why, only android is slow, maybe a compiler bug

abdelaziz-mahdy commented 3 months ago

if you need me to test anything let me know , i dont mind trying again

also all i need just to rebuild correct?

wang-bin commented 3 months ago

the latest mdk's ffmpeg is patched. you can rebuild with env var FVP_DEPS_LATEST=1

abdelaziz-mahdy commented 3 months ago

ok thank you very much <3