Kodi Community Forum

Full Version: check output of media codec?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Is there a way to check that the video output of the media codec is valid?

I have a transport stream file (h.264 video) that I am trying to play back. The problem is that the first part of the file is corrupted (~700 KB). When I start play back from the beginning of the file, I get a black screen. However, if I seek past the beginning of the file the video starts playing back normally. It is as if the hw video decoder gets in a bad state and is reset somehow after a seek operation.

Also if I disable the media codec from the settings screen and then try to play back the file, the video will play back (although on my device the sw play back doesn't keep up).

The question I have is if there is a way to tell programmatically if the output of the hardware decoder is good or not?

Any thoughts on this?
SW decode (via FFMpeg) is very robust. HW decode depends totally on the people that coded that part and we have no control over it. We might get an error back but generally, that means bail because you are dead.

A seek generally involved a reset to the codec, both sw and hw.

In most cases, there's not much one can do but seek. The use cases of what to do on error is too large and might depends on your particular circumstance.
davilla,

Thanks.

Do you know if an error message will be printed out in the log if the media codec fails in a way that will show a blank screen?
depends, check xbmc.log and also check dmesg