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

Client Crash on NVidia Shield #165

Open azukaar opened 1 month ago

azukaar commented 1 month ago

Whenever some videos, it ends up in a crash on NVidia Shield after about 1sec (I can see the first few frames). I cant seem to find a pattern as to which videos crash thought. I will add details if I do

here are the logs I get from logcat

https://pastebin.com/vy95EicL

azukaar commented 1 month ago

This part seems to explain the crash. Is that a memory usage issue?


2024-10-13 15:21:50.738  3202-3202  Zygote                  pid-3202                             I  Process 27021 exited due to signal 9 (Killed)
2024-10-13 15:21:50.738  3202-3202  Zygote                  pid-3202                             I  Process 27178 exited due to signal 9 (Killed)
2024-10-13 15:21:50.738  3202-3202  Zygote                  pid-3202                             I  Process 31266 exited due to signal 9 (Killed)
2024-10-13 15:21:50.738  3202-31296 Zygote                  pid-3202                             I  Process 26210 exited due to signal 9 (Killed)
2024-10-13 15:21:50.740  3202-31295 Zygote                  pid-3202                             I  Process 26835 exited due to signal 9 (Killed)
2024-10-13 15:21:50.741  3202-31297 Zygote                  pid-3202                             I  Process 26437 exited due to signal 9 (Killed)
2024-10-13 15:21:50.741  3202-31298 Zygote                  pid-3202                             I  Process 26324 exited due to signal 9 (Killed)
2024-10-13 15:21:50.741  3202-31294 Zygote                  pid-3202                             I  Process 26199 exited due to signal 9 (Killed)

image

azukaar commented 1 month ago

OK I was able to "fix" the issue by reducing the buffering min/max time of the player, it seems when those are too high it will stuff the memory up until it crashes. Closing now

azukaar commented 1 month ago

just re-opening as I noticed something odd: the debug logs are spammed with this. What does that mean? IT happens on any Android device AFAIK

D/.azukaar.auror( 5157): PlayerBase::stop() from IPlayer
D/AudioTrack( 5157): stop(2198): called with 40 frames delivered        
D/.azukaar.auror( 5157): PlayerBase::stop() from IPlayer
D/AudioTrack( 5157): stop(2198): called with 40 frames delivered        
D/.azukaar.auror( 5157): PlayerBase::stop() from IPlayer
D/AudioTrack( 5157): stop(2198): called with 40 frames delivered        
D/.azukaar.auror( 5157): PlayerBase::stop() from IPlayer
D/AudioTrack( 5157): stop(2198): called with 40 frames delivered        
D/.azukaar.auror( 5157): PlayerBase::stop() from IPlayer
D/AudioTrack( 5157): stop(2198): called with 40 frames delivered        
D/.azukaar.auror( 5157): PlayerBase::stop() from IPlayer
D/AudioTrack( 5157): stop(2198): called with 40 frames delivered        
D/.azukaar.auror( 5157): PlayerBase::stop() from IPlayer
D/AudioTrack( 5157): stop(2198): called with 40 frames delivered        
D/.azukaar.auror( 5157): PlayerBase::stop() from IPlayer
D/AudioTrack( 5157): stop(2198): called with 40 frames delivered        
D/.azukaar.auror( 5157): PlayerBase::stop() from IPlayer
D/AudioTrack( 5157): stop(2198): called with 40 frames delivered        
D/.azukaar.auror( 5157): PlayerBase::stop() from IPlayer
D/AudioTrack( 5157): stop(2198): called with 40 frames delivered        
D/.azukaar.auror( 5157): PlayerBase::stop() from IPlayer
D/AudioTrack( 5157): stop(2198): called with 40 frames delivered        
D/.azukaar.auror( 5157): PlayerBase::stop() from IPlayer
D/AudioTrack( 5157): stop(2198): called with 40 frames delivered        
D/.azukaar.auror( 5157): PlayerBase::stop() from IPlayer
D/AudioTrack( 5157): stop(2198): called with 40 frames delivered        
D/.azukaar.auror( 5157): PlayerBase::stop() from IPlayer
D/AudioTrack( 5157): stop(2198): called with 40 frames delivered        
D/.azukaar.auror( 5157): PlayerBase::stop() from IPlayer
D/AudioTrack( 5157): stop(2198): called with 40 frames delivered        
D/.azukaar.auror( 5157): PlayerBase::stop() from IPlayer
D/AudioTrack( 5157): stop(2198): called with 40 frames delivered        
D/.azukaar.auror( 5157): PlayerBase::stop() from IPlayer
D/AudioTrack( 5157): stop(2198): called with 40 frames delivered        
D/.azukaar.auror( 5157): PlayerBase::stop() from IPlayer
D/AudioTrack( 5157): stop(2198): called with 40 frames delivered        
D/.azukaar.auror( 5157): PlayerBase::stop() from IPlayer
D/AudioTrack( 5157): stop(2198): called with 40 frames delivered

If I play the same video on Windows I get

flutter: mdk.FINE: 22:40:27.525: [FFmpeg:hevc] Unknown profile bitstream

repeated every half second

wang-bin commented 1 month ago

just re-opening as I noticed something odd: the debug logs are spammed with this. What does that mean? IT happens on any Android device AFAIK

D/.azukaar.auror( 5157): PlayerBase::stop() from IPlayer
D/AudioTrack( 5157): stop(2198): called with 40 frames delivered        
D/.azukaar.auror( 5157): PlayerBase::stop() from IPlayer
D/AudioTrack( 5157): stop(2198): called with 40 frames delivered        
D/.azukaar.auror( 5157): PlayerBase::stop() from IPlayer
D/AudioTrack( 5157): stop(2198): called with 40 frames delivered        
D/.azukaar.auror( 5157): PlayerBase::stop() from IPlayer
D/AudioTrack( 5157): stop(2198): called with 40 frames delivered        
D/.azukaar.auror( 5157): PlayerBase::stop() from IPlayer
D/AudioTrack( 5157): stop(2198): called with 40 frames delivered        
D/.azukaar.auror( 5157): PlayerBase::stop() from IPlayer
D/AudioTrack( 5157): stop(2198): called with 40 frames delivered        
D/.azukaar.auror( 5157): PlayerBase::stop() from IPlayer
D/AudioTrack( 5157): stop(2198): called with 40 frames delivered        
D/.azukaar.auror( 5157): PlayerBase::stop() from IPlayer
D/AudioTrack( 5157): stop(2198): called with 40 frames delivered        
D/.azukaar.auror( 5157): PlayerBase::stop() from IPlayer
D/AudioTrack( 5157): stop(2198): called with 40 frames delivered        
D/.azukaar.auror( 5157): PlayerBase::stop() from IPlayer
D/AudioTrack( 5157): stop(2198): called with 40 frames delivered        
D/.azukaar.auror( 5157): PlayerBase::stop() from IPlayer
D/AudioTrack( 5157): stop(2198): called with 40 frames delivered        
D/.azukaar.auror( 5157): PlayerBase::stop() from IPlayer
D/AudioTrack( 5157): stop(2198): called with 40 frames delivered        
D/.azukaar.auror( 5157): PlayerBase::stop() from IPlayer
D/AudioTrack( 5157): stop(2198): called with 40 frames delivered        
D/.azukaar.auror( 5157): PlayerBase::stop() from IPlayer
D/AudioTrack( 5157): stop(2198): called with 40 frames delivered        
D/.azukaar.auror( 5157): PlayerBase::stop() from IPlayer
D/AudioTrack( 5157): stop(2198): called with 40 frames delivered        
D/.azukaar.auror( 5157): PlayerBase::stop() from IPlayer
D/AudioTrack( 5157): stop(2198): called with 40 frames delivered        
D/.azukaar.auror( 5157): PlayerBase::stop() from IPlayer
D/AudioTrack( 5157): stop(2198): called with 40 frames delivered        
D/.azukaar.auror( 5157): PlayerBase::stop() from IPlayer
D/AudioTrack( 5157): stop(2198): called with 40 frames delivered        
D/.azukaar.auror( 5157): PlayerBase::stop() from IPlayer
D/AudioTrack( 5157): stop(2198): called with 40 frames delivered

It's system log. nothing we can do

If I play the same video on Windows I get

flutter: mdk.FINE: 22:40:27.525: [FFmpeg:hevc] Unknown profile bitstream

repeated every half second

it can be ignored, ffmpeg bug, I can add a patch

azukaar commented 1 month ago

I dont think it can be ignored because the errors cause Android playback to be very choppy, on windows it appears once a second but on Android it gets spammed pretty hard causing a lot of lags

azukaar commented 1 month ago

Just to give you an idea of how much it gets spam with the additional logging from Master: There's a one error per millisecond basically. The video is super laggy

D/AudioTrack(27314): stop(2614): called with 40 frames delivered
I/flutter (27314): mdk.FINE: 11:36:15.044: 0x475b9520>12638 00:00:12.6/03:01:11 cache 0v 3.4s/4904KB 378KB/s |-1|<4ms update 42.5ms 24.7fps draw 1/3 +0ms gpu 8675/8691us 
drop 8
D/.azukaar.auror(27314): PlayerBase::stop() from IPlayer
D/AudioTrack(27314): stop(2614): called with 40 frames delivered
D/.azukaar.auror(27314): PlayerBase::stop() from IPlayer
D/AudioTrack(27314): stop(2614): called with 40 frames delivered
D/.azukaar.auror(27314): PlayerBase::stop() from IPlayer
D/AudioTrack(27314): stop(2614): called with 40 frames delivered
D/.azukaar.auror(27314): PlayerBase::stop() from IPlayer
D/AudioTrack(27314): stop(2614): called with 40 frames delivered
D/.azukaar.auror(27314): PlayerBase::stop() from IPlayer
D/AudioTrack(27314): stop(2614): called with 40 frames delivered
D/.azukaar.auror(27314): PlayerBase::stop() from IPlayer
D/AudioTrack(27314): stop(2614): called with 40 frames delivered
D/.azukaar.auror(27314): PlayerBase::stop() from IPlayer
D/AudioTrack(27314): stop(2614): called with 40 frames delivered
D/.azukaar.auror(27314): PlayerBase::stop() from IPlayer
D/AudioTrack(27314): stop(2614): called with 40 frames delivered
D/.azukaar.auror(27314): PlayerBase::stop() from IPlayer
D/AudioTrack(27314): stop(2614): called with 40 frames delivered
D/.azukaar.auror(27314): PlayerBase::stop() from IPlayer
D/AudioTrack(27314): stop(2614): called with 40 frames delivered
D/.azukaar.auror(27314): PlayerBase::stop() from IPlayer
D/AudioTrack(27314): stop(2614): called with 40 frames delivered
D/.azukaar.auror(27314): PlayerBase::stop() from IPlayer
D/AudioTrack(27314): stop(2614): called with 40 frames delivered
D/.azukaar.auror(27314): PlayerBase::stop() from IPlayer
D/AudioTrack(27314): stop(2614): called with 40 frames delivered
D/.azukaar.auror(27314): PlayerBase::stop() from IPlayer
D/AudioTrack(27314): stop(2614): called with 40 frames delivered
D/.azukaar.auror(27314): PlayerBase::stop() from IPlayer
D/AudioTrack(27314): stop(2614): called with 40 frames delivered
D/.azukaar.auror(27314): PlayerBase::stop() from IPlayer
D/AudioTrack(27314): stop(2614): called with 40 frames delivered
D/.azukaar.auror(27314): PlayerBase::stop() from IPlayer
D/AudioTrack(27314): stop(2614): called with 40 frames delivered
D/.azukaar.auror(27314): PlayerBase::stop() from IPlayer
D/AudioTrack(27314): stop(2614): called with 40 frames delivered
D/.azukaar.auror(27314): PlayerBase::stop() from IPlayer
D/AudioTrack(27314): stop(2614): called with 40 frames delivered
D/.azukaar.auror(27314): PlayerBase::stop() from IPlayer
D/AudioTrack(27314): stop(2614): called with 40 frames delivered
D/.azukaar.auror(27314): PlayerBase::stop() from IPlayer
D/AudioTrack(27314): stop(2614): called with 40 frames delivered
D/.azukaar.auror(27314): PlayerBase::stop() from IPlayer
D/AudioTrack(27314): stop(2614): called with 40 frames delivered
D/.azukaar.auror(27314): PlayerBase::stop() from IPlayer
D/AudioTrack(27314): stop(2614): called with 40 frames delivered
D/.azukaar.auror(27314): PlayerBase::stop() from IPlayer
D/AudioTrack(27314): stop(2614): called with 640 frames delivered
D/.azukaar.auror(27314): PlayerBase::stop() from IPlayer
D/AudioTrack(27314): stop(2614): called with 40 frames delivered
D/.azukaar.auror(27314): PlayerBase::stop() from IPlayer
D/AudioTrack(27314): stop(2614): called with 40 frames delivered
D/.azukaar.auror(27314): PlayerBase::stop() from IPlayer
D/AudioTrack(27314): stop(2614): called with 40 frames delivered
D/.azukaar.auror(27314): PlayerBase::stop() from IPlayer
D/AudioTrack(27314): stop(2614): called with 40 frames delivered
D/.azukaar.auror(27314): PlayerBase::stop() from IPlayer
D/AudioTrack(27314): stop(2614): called with 40 frames delivered
D/.azukaar.auror(27314): PlayerBase::stop() from IPlayer
D/AudioTrack(27314): stop(2614): called with 40 frames delivered
D/.azukaar.auror(27314): PlayerBase::stop() from IPlayer
D/AudioTrack(27314): stop(2614): called with 40 frames delivered
D/.azukaar.auror(27314): PlayerBase::stop() from IPlayer
D/AudioTrack(27314): stop(2614): called with 40 frames delivered
D/.azukaar.auror(27314): PlayerBase::stop() from IPlayer
D/AudioTrack(27314): stop(2614): called with 40 frames delivered
D/.azukaar.auror(27314): PlayerBase::stop() from IPlayer
D/AudioTrack(27314): stop(2614): called with 40 frames delivered
D/.azukaar.auror(27314): PlayerBase::stop() from IPlayer
D/AudioTrack(27314): stop(2614): called with 40 frames delivered
D/.azukaar.auror(27314): PlayerBase::stop() from IPlayer
D/AudioTrack(27314): stop(2614): called with 40 frames delivered
D/.azukaar.auror(27314): PlayerBase::stop() from IPlayer
D/AudioTrack(27314): stop(2614): called with 40 frames delivered
D/.azukaar.auror(27314): PlayerBase::stop() from IPlayer
D/AudioTrack(27314): stop(2614): called with 40 frames delivered
D/.azukaar.auror(27314): PlayerBase::stop() from IPlayer
D/AudioTrack(27314): stop(2614): called with 40 frames delivered
D/.azukaar.auror(27314): PlayerBase::stop() from IPlayer
D/AudioTrack(27314): stop(2614): called with 40 frames delivered
D/.azukaar.auror(27314): PlayerBase::stop() from IPlayer
D/AudioTrack(27314): stop(2614): called with 40 frames delivered
D/.azukaar.auror(27314): PlayerBase::stop() from IPlayer
D/AudioTrack(27314): stop(2614): called with 40 frames delivered
D/.azukaar.auror(27314): PlayerBase::stop() from IPlayer
D/AudioTrack(27314): stop(2614): called with 40 frames delivered
D/.azukaar.auror(27314): PlayerBase::stop() from IPlayer
D/AudioTrack(27314): stop(2614): called with 40 frames delivered
D/.azukaar.auror(27314): PlayerBase::stop() from IPlayer
D/AudioTrack(27314): stop(2614): called with 40 frames delivered
D/.azukaar.auror(27314): PlayerBase::stop() from IPlayer
D/AudioTrack(27314): stop(2614): called with 40 frames delivered
D/.azukaar.auror(27314): PlayerBase::stop() from IPlayer
D/AudioTrack(27314): stop(2614): called with 40 frames delivered
D/.azukaar.auror(27314): PlayerBase::stop() from IPlayer
D/AudioTrack(27314): stop(2614): called with 40 frames delivered
D/.azukaar.auror(27314): PlayerBase::stop() from IPlayer
D/AudioTrack(27314): stop(2614): called with 40 frames delivered
D/.azukaar.auror(27314): PlayerBase::stop() from IPlayer
D/AudioTrack(27314): stop(2614): called with 40 frames delivered
D/.azukaar.auror(27314): PlayerBase::stop() from IPlayer
D/AudioTrack(27314): stop(2614): called with 40 frames delivered
D/.azukaar.auror(27314): PlayerBase::stop() from IPlayer
D/AudioTrack(27314): stop(2614): called with 40 frames delivered
D/.azukaar.auror(27314): PlayerBase::stop() from IPlayer
D/AudioTrack(27314): stop(2614): called with 40 frames delivered
D/.azukaar.auror(27314): PlayerBase::stop() from IPlayer
D/AudioTrack(27314): stop(2614): called with 40 frames delivered
D/.azukaar.auror(27314): PlayerBase::stop() from IPlayer
D/AudioTrack(27314): stop(2614): called with 40 frames delivered
D/.azukaar.auror(27314): PlayerBase::stop() from IPlayer
D/AudioTrack(27314): stop(2614): called with 80 frames delivered
D/.azukaar.auror(27314): PlayerBase::stop() from IPlayer
D/AudioTrack(27314): stop(2614): called with 40 frames delivered
D/.azukaar.auror(27314): PlayerBase::stop() from IPlayer
D/AudioTrack(27314): stop(2614): called with 40 frames delivered
D/.azukaar.auror(27314): PlayerBase::stop() from IPlayer
D/AudioTrack(27314): stop(2614): called with 40 frames delivered
D/.azukaar.auror(27314): PlayerBase::stop() from IPlayer
D/AudioTrack(27314): stop(2614): called with 40 frames delivered
D/.azukaar.auror(27314): PlayerBase::stop() from IPlayer
D/AudioTrack(27314): stop(2614): called with 40 frames delivered
D/.azukaar.auror(27314): PlayerBase::stop() from IPlayer
D/AudioTrack(27314): stop(2614): called with 80 frames delivered
D/.azukaar.auror(27314): PlayerBase::stop() from IPlayer
D/AudioTrack(27314): stop(2614): called with 40 frames delivered
D/.azukaar.auror(27314): PlayerBase::stop() from IPlayer
D/AudioTrack(27314): stop(2614): called with 40 frames delivered
D/.azukaar.auror(27314): PlayerBase::stop() from IPlayer
D/AudioTrack(27314): stop(2614): called with 40 frames delivered
D/.azukaar.auror(27314): PlayerBase::stop() from IPlayer
D/AudioTrack(27314): stop(2614): called with 40 frames delivered
I/flutter (27314): mdk.FINE: 11:36:15.107: 0x475b9520>12763 00:00:12.7/03:01:11 cache 0v 3.5s/4996KB 1067KB/s |+2|<4ms update 40.4ms 23.4fps draw 1/7 +0ms gpu 8675/8691us drop 8
wang-bin commented 1 month ago

D/.azukaar.auror(27314): PlayerBase::stop() from IPlayer

it's from system audio renderee. does the audio sound correct? you can try to disable audio tracks

azukaar commented 3 weeks ago

You are correct the issue is gone if I disable the audio with player.activeAudioTracks = [];