-
-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Drop frames problem fps is very bad #134
Comments
please show me the log following issue template |
Experiencing the same issue on Windows. I am using the Player low level object and showing the texture:
And even with a bare bone UI (nothing else but the player's texture) I get severe frame dropping compared to the vanilla Flutter player. Here's the logs although, ignore the buffering my internet was a bit unstable at that moment: https://pastebin.com/VczcUvV7 I also have a sample to showcase the issue: Aurora.Media.Center.2024-09-07.11-48-07.-.Trim.mp4 |
In case it's not clear enough in the sample, here you have another player at the top and FVP at the bottom. You can clearly see the dropped frame after slowing down the footage Timeline.1.mov |
flutter's rendering performance is very poor, comparing to my Qt examples, higher cpu and gpu load, lower fps. It's texture api for native plugins is not good enough, we can't know the rendering context used by flutter gui, so in fvp I create another context to render video. but it's impossible to sync 2 contexts in fvp without knowing flutter's context, so if flutter does not handle resource synchronization correctly(I guess yes), you will see tearing. You can download libmdk and run What is vanilla Flutter player? |
THE PROBLEM IN ANDROID TV, |
I need the log, otherwise I can't help |
is there a way to fix this? for example adding a buffer for the texture synchronisation?
I mean the basic VideoPlayer component in Flutter. It does not have the chopiness issue
OK so I tried it. It does work much better but I think. See the footage. First half is MDK, second half is MPV. BTW there is an issue in glfwplay.exe I think because cli options (like adding a video URL or adding -log all) don't do anything, so unfortunately I wasn't able to get any log. Timeline.1.mov |
Impossible to fix tearing issue. Must fix in flutter side.
which platform?
I run commands in msys2, then log will print to msys2 terminal. If no msys2, you can add |
It's not a tearing issue, the issue is frame dropping / stuttering. And when using the Flutter Video_player or Media_kit packages instead, there's no issues at all, that's why I think it comes from the FVP package (not MDK lib itself, just the way the binding to Flutter is). Also see for the terminal, if I run the command, the terminal detaches: |
I see tearing in #134 (comment)
|
No it's not tearing, I superposed two video. The top half is MPV, the bottom half is MDK |
I edit the screenshot. Do you mean there are 2 players in your recorded video, top left triangle is mpv, bottom right triangle is mdk? What I see is tearing at diagonal. |
yes correct that is it |
Be sure to specify the texture size in the updateTexture(width, heigth) method. |
I see thanks, I am assuming that only is relevant when the viewport is not 4k |
try master branch, and set max texture size as screen size or smaller registerWith(options: {
'maxWidth': screenWidth,
'maxHeight': screenHeight,
}); |
Screen.Record_2024-09-08-03-29-28.mp4Look drops in the apk test |
4k live Android mobile Screen.Record_2024-09-08-03-32-55.mp4 |
Same Channel 4k working good in vlc player Screen.Record_2024-09-08-03-35-16.mp4 |
Yes. Flutter is not the best choice for a video application. It copies each frame to his own scene. This is a very large volume of more than 9Mb for a 2000x1200 screen. |
It had no effect.
In Flutter:
In this case, there are no lags. Unfortunately, I can't build such an option in release mode. |
I think this is the important point. Every players uses the same technique I think but only the MDK-flutter one seems to have the lags. I think there might just be a bug rather than a hard Flutter limitation. |
Maybe it has some meaning. There is a constant message in the logs, similar to missed frames. But I do not know exactly what it means. W/vulkan (10596): vkAcquireNextImageKHR: non-infinite timeouts not yet implemented |
hi dear,
i have problem with fvp drop frames on android (mobile, tv) im trying to use AMediaCodec and FFmpeg but his give me same results frame drops i test it in: XIAOMI MI BOX S2 (Android), And mobile RED MAGIC 6, Poco x3 Pro, Tecno Spark 8 tecno spark 10 pro, give me same results, drop frames in LIVE M3u8, and Movies MP4, MKV
I/AudioTrack(21381): AudioTrack::setVolume L:1.000000 R:1.000000 and the pakage is com.poppycorn.rax.poppycorn
I/AudioTrack(21381): AudioTrack::setVolume L:1.000000 R:1.000000
I/AudioTrack(21381): AudioTrack::setVolume L:1.000000 R:1.000000 and the pakage is com.poppycorn.rax.poppycorn
I/AudioTrack(21381): AudioTrack::setVolume L:1.000000 R:1.000000
I/AudioTrack(21381): AudioTrack::setVolume L:1.000000 R:1.000000 and the pakage is com.poppycorn.rax.poppycorn
I/AudioTrack(21381): AudioTrack::setVolume L:1.000000 R:1.000000
I/AudioTrack(21381): AudioTrack::setVolume L:1.000000 R:1.000000 and the pakage is com.poppycorn.rax.poppycorn
I/AudioTrack(21381): AudioTrack::setVolume L:1.000000 R:1.000000
I/AudioTrack(21381): AudioTrack::setVolume L:1.000000 R:1.000000 and the pakage is com.poppycorn.rax.poppycorn
I/AudioTrack(21381): AudioTrack::setVolume L:1.000000 R:1.000000
I/AudioTrack(21381): AudioTrack::setVolume L:1.000000 R:1.000000 and the pakage is com.poppycorn.rax.poppycorn
I/AudioTrack(21381): AudioTrack::setVolume L:1.000000 R:1.000000
I/AudioTrack(21381): AudioTrack::setVolume L:1.000000 R:1.000000 and the pakage is com.poppycorn.rax.poppycorn
I/AudioTrack(21381): AudioTrack::setVolume L:1.000000 R:1.000000
I/AudioTrack(21381): AudioTrack::setVolume L:1.000000 R:1.000000 and the pakage is com.poppycorn.rax.poppycorn
I/AudioTrack(21381): AudioTrack::setVolume L:1.000000 R:1.000000
I/AudioTrack(21381): AudioTrack::setVolume L:1.0
The log note give me anything about dropframes
The text was updated successfully, but these errors were encountered: