Solution 1 :
I actually faced the same issue with exoplayer version 2.10.0. This is actually a bug in exoplayer you can get more information about the same here. A new version will fix this issue. You can find the details here
Problem :
We have integrated exoplayer in one of my video player application for playing local video
EXOPLAYER VERSION : 2.11.0
we have observe that have MP4 play perfectly by forward and rewind video but when trying to play big MKV file then Exoplayer stuck initially when we start MKV video and when forward and backward mkv video then player stuck for approximately 10 second then play the video
we have checked it by android studio profiler tools and observe that when we play MKV video then memory consumption increased above the 1.1 GB but when we play MP4 video then memory consumption is approximately 600MB
When we forward the video then we got following logcat
2020-07-09 18:26:05.854 13217-13217/com.videoplayer.easylife4u D/[email protected][PlayerActivity]: ViewPostIme pointer 0
2020-07-09 18:26:05.926 13217-13217/com.videoplayer.easylife4u D/distance =>: 76.0
2020-07-09 18:26:05.926 13217-13217/com.videoplayer.easylife4u D/seeking position =>: newPosition=>4391 duration=>28237 percentOfDuration=>4391.0605
2020-07-09 18:26:05.928 13217-14563/com.videoplayer.easylife4u I/ACodec: [OMX.Exynos.avc.dec] signalFlush
2020-07-09 18:26:05.928 13217-14564/com.videoplayer.easylife4u I/ACodec: [OMX.Exynos.avc.dec] ExecutingState flushing now (codec owns 0/5 input, 3/15 output).
2020-07-09 18:26:05.928 13217-14564/com.videoplayer.easylife4u I/ACodec: [OMX.Exynos.avc.dec] Now Flushing
2020-07-09 18:26:05.930 13217-14564/com.videoplayer.easylife4u I/ACodec: [OMX.Exynos.avc.dec] FlushingState onOMXEvent(0,1,0)
2020-07-09 18:26:05.932 13217-14564/com.videoplayer.easylife4u I/ACodec: [OMX.Exynos.avc.dec] FlushingState onOMXEvent(0,1,1)
2020-07-09 18:26:05.932 13217-14564/com.videoplayer.easylife4u I/ACodec: [OMX.Exynos.avc.dec] Now Executing
2020-07-09 18:26:05.950 13217-13217/com.videoplayer.easylife4u D/distance =>: 125.0
2020-07-09 18:26:05.950 13217-13217/com.videoplayer.easylife4u D/seeking position =>: newPosition=>5355 duration=>28237 percentOfDuration=>5355.15
2020-07-09 18:26:05.951 13217-14563/com.videoplayer.easylife4u I/ACodec: [OMX.Exynos.avc.dec] signalFlush
2020-07-09 18:26:05.951 13217-14564/com.videoplayer.easylife4u I/ACodec: [OMX.Exynos.avc.dec] ExecutingState flushing now (codec owns 5/5 input, 11/15 output).
2020-07-09 18:26:05.951 13217-14564/com.videoplayer.easylife4u I/ACodec: [OMX.Exynos.avc.dec] Now Flushing
2020-07-09 18:26:05.974 13217-14564/com.videoplayer.easylife4u I/ACodec: [OMX.Exynos.avc.dec] FlushingState onOMXEvent(0,1,0)
2020-07-09 18:26:05.975 13217-13217/com.videoplayer.easylife4u D/distance =>: 174.0
2020-07-09 18:26:05.975 13217-14564/com.videoplayer.easylife4u I/ACodec: [OMX.Exynos.avc.dec] FlushingState onOMXEvent(0,1,1)
2020-07-09 18:26:05.975 13217-13217/com.videoplayer.easylife4u D/seeking position =>: newPosition=>6304 duration=>28237 percentOfDuration=>6304.176
2020-07-09 18:26:05.975 13217-14564/com.videoplayer.easylife4u I/ACodec: [OMX.Exynos.avc.dec] Now Executing
2020-07-09 18:26:05.976 13217-14563/com.videoplayer.easylife4u I/ACodec: [OMX.Exynos.avc.dec] signalFlush
2020-07-09 18:26:05.978 13217-14564/com.videoplayer.easylife4u I/ACodec: [OMX.Exynos.avc.dec] ExecutingState flushing now (codec owns 0/5 input, 11/15 output).
2020-07-09 18:26:05.978 13217-14564/com.videoplayer.easylife4u I/ACodec: [OMX.Exynos.avc.dec] Now Flushing
2020-07-09 18:26:05.981 13217-14564/com.videoplayer.easylife4u I/ACodec: [OMX.Exynos.avc.dec] FlushingState onOMXEvent(0,1,0)
2020-07-09 18:26:05.984 13217-14564/com.videoplayer.easylife4u I/ACodec: [OMX.Exynos.avc.dec] FlushingState onOMXEvent(0,1,1)
2020-07-09 18:26:05.984 13217-14564/com.videoplayer.easylife4u I/ACodec: [OMX.Exynos.avc.dec] Now Executing
2020-07-09 18:26:05.998 13217-13217/com.videoplayer.easylife4u D/distance =>: 290.0
2020-07-09 18:26:05.998 13217-13217/com.videoplayer.easylife4u D/seeking position =>: newPosition=>8597 duration=>28237 percentOfDuration=>8597.168
2020-07-09 18:26:05.999 13217-14563/com.videoplayer.easylife4u I/ACodec: [OMX.Exynos.avc.dec] signalFlush
2020-07-09 18:26:05.999 13217-14564/com.videoplayer.easylife4u I/ACodec: [OMX.Exynos.avc.dec] ExecutingState flushing now (codec owns 5/5 input, 11/15 output).
2020-07-09 18:26:06.002 13217-14564/com.videoplayer.easylife4u I/ACodec: [OMX.Exynos.avc.dec] Now Flushing
2020-07-09 18:26:06.019 13217-13217/com.videoplayer.easylife4u D/distance =>: 337.0
2020-07-09 18:26:06.019 13217-13217/com.videoplayer.easylife4u D/seeking position =>: newPosition=>9513 duration=>28237 percentOfDuration=>9513.098
2020-07-09 18:26:06.025 13217-14564/com.videoplayer.easylife4u I/ACodec: [OMX.Exynos.avc.dec] FlushingState onOMXEvent(0,1,0)
2020-07-09 18:26:06.031 13217-14564/com.videoplayer.easylife4u I/ACodec: [OMX.Exynos.avc.dec] FlushingState onOMXEvent(0,1,1)
2020-07-09 18:26:06.032 13217-14564/com.videoplayer.easylife4u I/ACodec: [OMX.Exynos.avc.dec] Now Executing
2020-07-09 18:26:06.033 13217-14563/com.videoplayer.easylife4u I/ACodec: [OMX.Exynos.avc.dec] signalFlush
2020-07-09 18:26:06.033 13217-14564/com.videoplayer.easylife4u I/ACodec: [OMX.Exynos.avc.dec] ExecutingState flushing now (codec owns 0/5 input, 11/15 output).
2020-07-09 18:26:06.034 13217-14564/com.videoplayer.easylife4u I/ACodec: [OMX.Exynos.avc.dec] Now Flushing
2020-07-09 18:26:06.034 13217-14564/com.videoplayer.easylife4u I/ACodec: [OMX.Exynos.avc.dec] FlushingState onOMXEvent(0,1,0)
2020-07-09 18:26:06.038 13217-14564/com.videoplayer.easylife4u I/ACodec: [OMX.Exynos.avc.dec] FlushingState onOMXEvent(0,1,1)
2020-07-09 18:26:06.038 13217-14564/com.videoplayer.easylife4u I/ACodec: [OMX.Exynos.avc.dec] Now Executing
2020-07-09 18:26:06.042 13217-13217/com.videoplayer.easylife4u D/distance =>: 378.0
2020-07-09 18:26:06.042 13217-13217/com.videoplayer.easylife4u D/seeking position =>: newPosition=>10321 duration=>28237 percentOfDuration=>10321.019
2020-07-09 18:26:06.044 13217-14563/com.videoplayer.easylife4u I/ACodec: [OMX.Exynos.avc.dec] signalFlush
2020-07-09 18:26:06.044 13217-14564/com.videoplayer.easylife4u I/ACodec: [OMX.Exynos.avc.dec] ExecutingState flushing now (codec owns 0/5 input, 11/15 output).
2020-07-09 18:26:06.044 13217-14564/com.videoplayer.easylife4u I/ACodec: [OMX.Exynos.avc.dec] Now Flushing
2020-07-09 18:26:06.044 13217-14564/com.videoplayer.easylife4u I/ACodec: [OMX.Exynos.avc.dec] FlushingState onOMXEvent(0,1,0)
2020-07-09 18:26:06.047 13217-14564/com.videoplayer.easylife4u I/ACodec: [OMX.Exynos.avc.dec] FlushingState onOMXEvent(0,1,1)
2020-07-09 18:26:06.047 13217-14564/com.videoplayer.easylife4u I/ACodec: [OMX.Exynos.avc.dec] Now Executing
2020-07-09 18:26:06.062 13217-13217/com.videoplayer.easylife4u D/distance =>: 442.0
2020-07-09 18:26:06.062 13217-13217/com.videoplayer.easylife4u D/seeking position =>: newPosition=>11560 duration=>28237 percentOfDuration=>11560.341
2020-07-09 18:26:06.063 13217-14563/com.videoplayer.easylife4u I/ACodec: [OMX.Exynos.avc.dec] signalFlush
2020-07-09 18:26:06.063 13217-14564/com.videoplayer.easylife4u I/ACodec: [OMX.Exynos.avc.dec] ExecutingState flushing now (codec owns 5/5 input, 11/15 output).
2020-07-09 18:26:06.064 13217-14564/com.videoplayer.easylife4u I/ACodec: [OMX.Exynos.avc.dec] Now Flushing
2020-07-09 18:26:06.081 13217-13217/com.videoplayer.easylife4u D/distance =>: 467.0
2020-07-09 18:26:06.081 13217-13217/com.videoplayer.easylife4u D/seeking position =>: newPosition=>12066 duration=>28237 percentOfDuration=>12065.866
2020-07-09 18:26:06.087 13217-14564/com.videoplayer.easylife4u I/ACodec: [OMX.Exynos.avc.dec] FlushingState onOMXEvent(0,1,0)
2020-07-09 18:26:06.091 13217-14564/com.videoplayer.easylife4u I/ACodec: [OMX.Exynos.avc.dec] FlushingState onOMXEvent(0,1,1)
2020-07-09 18:26:06.091 13217-14564/com.videoplayer.easylife4u I/ACodec: [OMX.Exynos.avc.dec] Now Executing
2020-07-09 18:26:06.092 13217-14563/com.videoplayer.easylife4u I/ACodec: [OMX.Exynos.avc.dec] signalFlush
2020-07-09 18:26:06.094 13217-14564/com.videoplayer.easylife4u I/ACodec: [OMX.Exynos.avc.dec] ExecutingState flushing now (codec owns 0/5 input, 11/15 output).
2020-07-09 18:26:06.094 13217-14564/com.videoplayer.easylife4u I/ACodec: [OMX.Exynos.avc.dec] Now Flushing
2020-07-09 18:26:06.095 13217-14564/com.videoplayer.easylife4u I/ACodec: [OMX.Exynos.avc.dec] FlushingState onOMXEvent(0,1,0)
2020-07-09 18:26:06.103 13217-14564/com.videoplayer.easylife4u I/ACodec: [OMX.Exynos.avc.dec] FlushingState onOMXEvent(0,1,1)
2020-07-09 18:26:06.103 13217-14564/com.videoplayer.easylife4u I/ACodec: [OMX.Exynos.avc.dec] Now Executing
2020-07-09 18:26:06.109 13217-13217/com.videoplayer.easylife4u D/distance =>: 494.0
2020-07-09 18:26:06.109 13217-13217/com.videoplayer.easylife4u D/seeking position =>: newPosition=>12596 duration=>28237 percentOfDuration=>12596.404
2020-07-09 18:26:06.109 13217-14563/com.videoplayer.easylife4u I/ACodec: [OMX.Exynos.avc.dec] signalFlush
2020-07-09 18:26:06.109 13217-14564/com.videoplayer.easylife4u I/ACodec: [OMX.Exynos.avc.dec] ExecutingState flushing now (codec owns 0/5 input, 11/15 output).
2020-07-09 18:26:06.110 13217-14564/com.videoplayer.easylife4u I/ACodec: [OMX.Exynos.avc.dec] Now Flushing
2020-07-09 18:26:06.110 13217-14564/com.videoplayer.easylife4u I/ACodec: [OMX.Exynos.avc.dec] FlushingState onOMXEvent(0,1,0)
2020-07-09 18:26:06.111 13217-13217/com.videoplayer.easylife4u D/[email protected][PlayerActivity]: ViewPostIme pointer 1
2020-07-09 18:26:06.115 13217-14564/com.videoplayer.easylife4u I/ACodec: [OMX.Exynos.avc.dec] FlushingState onOMXEvent(0,1,1)
2020-07-09 18:26:06.115 13217-14564/com.videoplayer.easylife4u I/ACodec: [OMX.Exynos.avc.dec] Now Executing
2020-07-09 18:26:06.562 13217-13230/com.videoplayer.easylife4u I/MediaMetadataRetrieverJNI: release
2020-07-09 18:26:06.825 13217-14379/com.videoplayer.easylife4u D/PlayerActivity: ekta1:1
2020-07-09 18:26:07.887 13217-14376/com.videoplayer.easylife4u V/FA: Inactivity, disconnecting from the service
2020-07-09 18:26:10.070 13217-14379/com.videoplayer.easylife4u D/PlayerActivity: ekta1:1
Check below URL that produce the MKV file issue and URL is : https://drive.google.com/file/d/1c3sitERi_6fo2e_WjyI7FpVTTqsNXWYW/view?usp=sharing