Kodi Community Forum

Full Version: Fire TV2 - CVideoPlayerAudio::Process - stream stalled
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Hi,

I've Kodi 17 RC2/arm8a running on Fire TV 2 with 5.2.4.0. I encountered this problem a few times while playing a movie ( BluRay 720p x264 DTS ). The video will just stop abruptly and will be back to the file explorer. Restarting will resume the play though.

In the kodi log I saw this info -

Code:
00:00:19.487 T:368312134048  NOTICE: CVideoPlayerAudio::Process - stream stalled
00:00:19.806 T:368217301248   ERROR: CDVDMediaCodecInfo::ReleaseOutputBuffer ExceptionCheck index(9), render(1)
00:00:23.244 T:368291723968   ERROR: Previous line repeats 66 times.
00:00:23.245 T:368291723968   ERROR: Read - Error( -1, 22, Invalid argument ) - Retrying
00:00:23.288 T:368217301248   ERROR: CDVDMediaCodecInfo::ReleaseOutputBuffer ExceptionCheck index(9), render(1)
00:00:33.253 T:368291723968   ERROR: Previous line repeats 191 times.
00:00:33.254 T:368291723968   ERROR: Read - Error( -1, 22, Invalid argument )
00:00:33.260 T:368291723968  NOTICE: CVideoPlayer::OnExit()
00:00:33.260 T:368291723968  NOTICE: VideoPlayer: eof, waiting for queues to empty
00:00:33.260 T:368291723968  NOTICE: Closing stream player 1
00:00:33.261 T:368291723968  NOTICE: CDVDMessageQueue(audio)::WaitUntilEmpty
00:00:33.261 T:368291723968  NOTICE: Waiting for audio thread to exit
00:00:33.264 T:368312134048   ERROR: Got MSGQ_ABORT or MSGO_IS_ERROR return true

The logcat showed this repeatedly -

Code:
W/System.err(31423): android.media.MediaCodec$CodecException: Error 0xfffffff3
W/System.err(31423):    at android.media.MediaCodec.releaseOutputBuffer(Native Method)
W/System.err(31423):    at android.media.MediaCodec.releaseOutputBuffer(MediaCodec.java:1091)
W/System.err(31423): android.media.MediaCodec$CodecException: Error 0xfffffff3
W/System.err(31423):    at android.media.MediaCodec.releaseOutputBuffer(Native Method)
W/System.err(31423):    at android.media.MediaCodec.releaseOutputBuffer(MediaCodec.java:1091)
W/System.err(31423): android.media.MediaCodec$CodecException: Error 0xfffffff3
W/System.err(31423):    at android.media.MediaCodec.releaseOutputBuffer(Native Method)
W/System.err(31423):    at android.media.MediaCodec.releaseOutputBuffer(MediaCodec.java:1091)
W/System.err(31423): android.media.MediaCodec$CodecException: Error 0xfffffff3
W/System.err(31423):    at android.media.MediaCodec.releaseOutputBuffer(Native Method)
W/System.err(31423):    at android.media.MediaCodec.releaseOutputBuffer(MediaCodec.java:1091)
W/System.err(31423): android.media.MediaCodec$CodecException: Error 0xfffffff3
W/System.err(31423):    at android.media.MediaCodec.releaseOutputBuffer(Native Method)
W/System.err(31423):    at android.media.MediaCodec.releaseOutputBuffer(MediaCodec.java:1091)
W/System.err(31423): android.media.MediaCodec$CodecException: Error 0xfffffff3
W/System.err(31423):    at android.media.MediaCodec.releaseOutputBuffer(Native Method)
W/System.err(31423):    at android.media.MediaCodec.releaseOutputBuffer(MediaCodec.java:1091)

The mediainfo -

Code:
Format                                   : Matroska
Format version                           : Version 4 / Version 2
File size                                : 6.55 GiB
Duration                                 : 2 h 27 min
Overall bit rate                         : 6 343 kb/s
Encoded date                             : UTC 2015-01-07 04:52:34
Writing application                      : mkvmerge v6.2.0 ('Promised Land') built on Apr 28 2013 12:22:01
Writing library                          : libebml v1.3.0 + libmatroska v1.4.0

Video
ID                                       : 1
Format                                   : AVC
Format/Info                              : Advanced Video Codec
Format profile                           : [email protected]
Format settings, CABAC                   : Yes
Format settings, ReFrames                : 5 frames
Codec ID                                 : V_MPEG4/ISO/AVC
Duration                                 : 2 h 27 min
Bit rate                                 : 4 833 kb/s
Width                                    : 1 280 pixels
Height                                   : 544 pixels
Display aspect ratio                     : 2.35:1
Frame rate mode                          : Constant
Frame rate                               : 23.976 (24000/1001) FPS
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 8 bits
Scan type                                : Progressive
Bits/(Pixel*Frame)                       : 0.289
Stream size                              : 4.86 GiB (74%)
Writing library                          : x264 core 144 r2525 40bb568
Encoding settings                        : cabac=1 / ref=5 / deblock=1:0:0 / analyse=0x3:0x133 / me=umh / subme=7 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=1 / me_range=16 / chroma_me=1 / trellis=1 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=0 / chroma_qp_offset=-2 / threads=18 / lookahead_threads=3 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=3 / b_pyramid=2 / b_adapt=1 / b_bias=0 / direct=1 / weightb=1 / open_gop=0 / weightp=2 / keyint=250 / keyint_min=23 / scenecut=40 / intra_refresh=0 / rc_lookahead=40 / rc=2pass / mbtree=1 / bitrate=4833 / ratetol=1.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / cplxblur=20.0 / qblur=0.5 / ip_ratio=1.40 / aq=1:1.00
Language                                 : French
Default                                  : Yes
Forced                                   : No

Audio
ID                                       : 2
Format                                   : DTS
Format/Info                              : Digital Theater Systems
Mode                                     : 16
Format settings, Endianness              : Big
Codec ID                                 : A_DTS
Duration                                 : 2 h 27 min
Bit rate mode                            : Constant
Bit rate                                 : 1 509 kb/s
Channel(s)                               : 6 channels
Channel positions                        : Front: L C R, Side: L R, LFE
Sampling rate                            : 48.0 kHz
Frame rate                               : 93.750 FPS (512 spf)
Bit depth                                : 24 bits
Compression mode                         : Lossy
Stream size                              : 1.56 GiB (24%)
Language                                 : French
Default                                  : Yes
Forced                                   : No

Menu
00:00:00.000                             : en:00:00:00.000
00:14:43.049                             : en:00:14:43.049
00:30:01.675                             : en:00:30:01.675
00:49:42.897                             : en:00:49:42.897
01:17:58.924                             : en:01:17:58.924
01:34:45.013                             : en:01:34:45.013
01:45:22.441                             : en:01:45:22.441
02:05:20.555                             : en:02:05:20.555
02:24:48.722                             : en:02:24:48.722

Any idea what could be the problem?

Thanks
I turned on the "debug" and played the video again. Guess something is wrong with the mediacodec? I've both MediaCodec(surface)/ MediaCodec enabled in the Player Settings. I'll disable it and will check if that helps.

Code:
12:00:32.618 T:368259493360   DEBUG: CDVDVideoCodecAndroidMediaCodec::Decode current state (4)
12:00:32.638 T:368217301872   ERROR: CDVDMediaCodecInfo::ReleaseOutputBuffer ExceptionCheck index(5), render(1)
12:00:32.672 T:368259493360   DEBUG: CDVDVideoCodecAndroidMediaCodec::Decode current state (4)
12:00:32.688 T:368217301872   ERROR: CDVDMediaCodecInfo::ReleaseOutputBuffer ExceptionCheck index(5), render(1)
12:00:32.724 T:368259493360   DEBUG: CDVDVideoCodecAndroidMediaCodec::Decode current state (4)
12:00:32.741 T:368217301872   ERROR: CDVDMediaCodecInfo::ReleaseOutputBuffer ExceptionCheck index(5), render(1)
12:00:32.776 T:368259493360   DEBUG: CDVDVideoCodecAndroidMediaCodec::Decode current state (4)
12:00:32.790 T:368217301872   ERROR: CDVDMediaCodecInfo::ReleaseOutputBuffer ExceptionCheck index(5), render(1)
12:00:32.828 T:368259493360   DEBUG: CDVDVideoCodecAndroidMediaCodec::Decode current state (4)
12:00:32.857 T:368217301872   ERROR: CDVDMediaCodecInfo::ReleaseOutputBuffer ExceptionCheck index(5), render(1)
12:00:32.880 T:368259493360   DEBUG: CDVDVideoCodecAndroidMediaCodec::Decode current state (4)
12:00:32.908 T:368217301872   ERROR: CDVDMediaCodecInfo::ReleaseOutputBuffer ExceptionCheck index(5), render(1)
12:00:32.925 T:368310813984   ERROR: Read - Error( -1, 22, Invalid argument )
12:00:32.927 T:368310813984    INFO: Process - eof reading from demuxer
12:00:32.928 T:368310813984  NOTICE: CVideoPlayer::OnExit()
12:00:32.928 T:368310813984  NOTICE: VideoPlayer: eof, waiting for queues to empty
12:00:32.928 T:368310813984  NOTICE: Closing stream player 1
12:00:32.928 T:368310813984  NOTICE: CDVDMessageQueue(audio)::WaitUntilEmpty
12:00:32.929 T:368320104160   DEBUG: CVideoPlayerAudio - CDVDMsg::GENERAL_EOF
12:00:32.929 T:368320104160   DEBUG: CVideoPlayerAudio - CDVDMsg::GENERAL_SYNCHRONIZE
12:00:32.929 T:368320104160   ERROR: Got MSGQ_ABORT or MSGO_IS_ERROR return true
12:00:32.930 T:368320104160  NOTICE: thread end: CVideoPlayerAudio::OnExit()
12:00:32.930 T:368320104160   DEBUG: Thread VideoPlayerAudio 368320104160 terminating
12:00:32.930 T:368310813984  NOTICE: Waiting for audio thread to exit
12:00:32.930 T:368310813984  NOTICE: Closing audio device
12:00:32.931 T:368219938384   DEBUG: ActiveAE::SyncStream - average error -2172.536868 above threshold of 100.000000
12:00:32.933 T:368219938384   DEBUG: CActiveAE::DiscardStream - audio stream deleted
12:00:32.934 T:368219938384   DEBUG: CActiveAE::ClearDiscardedBuffers - buffer pool deleted
12:00:32.935 T:368310813984   DEBUG: Previous line repeats 1 times.
12:00:32.936 T:368310813984  NOTICE: Deleting audio codec
12:00:32.941 T:368310813984  NOTICE: Closing stream player 2
12:00:32.942 T:368259493360   DEBUG: CDVDVideoCodecAndroidMediaCodec::Decode current state (4)
12:00:32.942 T:368310813984  NOTICE: CDVDMessageQueue(video)::WaitUntilEmpty
12:00:32.952 T:368259493360   DEBUG: CDVDVideoCodecAndroidMediaCodec::Decode current state (4)
12:00:33.001 T:368219938384   DEBUG: Previous line repeats 4 times.
12:00:33.002 T:368219938384   DEBUG: CActiveAE::ClearDiscardedBuffers - buffer pool deleted
12:00:33.007 T:368259493360   DEBUG: CVideoPlayerVideo - CDVDMsg::GENERAL_SYNCHRONIZE
12:00:33.007 T:368259493360   ERROR: Got MSGQ_ABORT or MSGO_IS_ERROR return true
12:00:33.007 T:368259493360  NOTICE: thread end: video_thread
12:00:33.007 T:368259493360   DEBUG: Thread VideoPlayerVideo 368259493360 terminating
Hi, I'm facing a similar problem on my SHIELD. Could you please check if the freeze also occurs without mediacodec, so in pure software decoding? For me it does. I've spent around 3 days to hunt down the cause with some of our devs, but we haven't found the root cause. As other SHIELD users didn't have the problem with the sample file I provided, we assumed it's probably a hardware issue of some sort, but when you also have this issue, it must be something else.
(2017-01-05, 22:19)dmxclass Wrote: [ -> ]I turned on the "debug" and played the video again. Guess something is wrong with the mediacodec? I've both MediaCodec(surface)/ MediaCodec enabled in the Player Settings. I'll disable it and will check if that helps.

Having this same issue also. Any progress on fixing it?
Nope and nobody is working on it.
(2017-01-05, 22:19)dmxclass Wrote: [ -> ]I turned on the "debug" and played the video again. Guess something is wrong with the mediacodec? I've both MediaCodec(surface)/ MediaCodec enabled in the Player Settings. I'll disable it and will check if that helps.

(2017-01-06, 12:51)da-anda Wrote: [ -> ]Hi, I'm facing a similar problem on my SHIELD. Could you please check if the freeze also occurs without mediacodec, so in pure software decoding? For me it does. I've spent around 3 days to hunt down the cause with some of our devs, but we haven't found the root cause. As other SHIELD users didn't have the problem with the sample file I provided, we assumed it's probably a hardware issue of some sort, but when you also have this issue, it must be something else.

I had some time today to make 2 test runs with 2 video files and I think I found our problem. I disabled MediaCodec and left MediaCodec(surface) enabled and it seems to stop the crashing. Granted I only went through 2 files (TV episodes) about 45 minutes each but both those files didn't make it through before turning off MediaCodec. Hope you guys give it a try and see what happens. I'll have some more time tmrw to run some movies for further testing but it looks very promising.

(2017-01-09, 10:24)fritsch Wrote: [ -> ]Nope and nobody is working on it.

Does "Mr. I don't Care Anymore" have special powers or something? I asked if he had any progress on fixing it which would assume he was testing the on/off of either of the MediaCodecs b/c that's what he said and that's what I quoted. How do you know if had any progress or was even attempting to test the different settings?
I said: Nobody is working on a fix from kodi team. You are free to test / disable / change whatever you want. But the error is clear and it's not "fixable" by altering certain settings.
Hey fritsch, pardon me but that was not clear to me you were talking about the Kodi dev team fixing it. My apologies.

You've made yourself much more clear to me now. Could you clarify why the settings wouldn't change anything? I already did two tests, both videos crashed to the menu before and didn't after the change in settings. I'm running a test movie now which has failed before to see if it'll crash and might be able to do a couple more.

My notion was that the dev team does not care about Fire anything and that unless its a open Android box or Raspi we will just have to figure things out on our own by either downgrading/smpc/or like I'm doing now which is fucking around with settings. This issue did not occur before the RC1/RC2, I used all the Krypton versions starting from Alpha 2. I know the RC2 was a quick re-release after RC1 for Android due to issues. Thanks for at least responding.
We have no android maintainer. No android hw has any dedicated support anymore. V17 is my goodbye best effort. I don't plan hacking on a platform I don't have or use. Just found v17 sad on it and tried to help..

Disabling mediacodec might resolve the crash, but the firetv is too slow in general without hw acceleration.

So if you downgrade to latest beta, all is fine?
v17 worked perfectly fine up until the RC2 with both mediacodec and mediacodec(surface) 'on'. However I have not downgraded back since it seems to be fixed.

I ran through another movie and am now more than half way through with another one and no crashes back to the menu. First one the video is untouched from a full bluray, file size ~24GB.

first movie specs -> http://pastebin.com/raw/BUshVB8h
second movie specs -> http://pastebin.com/raw/eJ1ePdh4

The previous two videos I tested were nowhere near the processing needs of the first film linked above.

My understanding of the settings are that they both enable separate types of hw acceleration. I find it hard to believe that the FireTV played and looked fine on the first movie I played without any hardware help.
So, please summarize for me:
- Is there still something broken in the RCs? All the problems magically fixed?
If you clarify this I could answer your question better.

There are two options enabled by default to get hardware acceleration.

mediacodec ---> enables hw acceleration
mediacodec (surface) ---> enables hw acceleration

If you disable one or the other, do you completely lose all hw acceleration?
If you disable surface only, it will use GLES for rendering, but still use medacodec for decoding <- that would be good if that helped.
If you disable both -> SW decoding only <- would be bad.
What happens in this scenario?

mediacodec ---> disable
mediacodec (surface) ---> enable
That should not be settable.
Pages: 1 2