[mythtv] Mediacodec problem with fire stick 4K

Aman Gupta aman at tmm1.net
Tue Nov 20 22:32:42 UTC 2018


On Tue, Nov 20, 2018 at 2:28 PM Peter Bennett <pb.mythtv at gmail.com> wrote:

> Hi Aman
>
> When running with mediacodec on the fire stick 4K, there is a problem
> with MPEG2. Perhaps the 4K does not support MPEG2 or the interlacing is
> causing a problem. What appears to happen is that we get the situation
> where we have done avcodec_send_packet until it returns AVERROR(EAGAIN).
> The avcodec_receive_frame also returns AVERROR(EAGAIN) and this
> continues forever, we never get a frame out of it. With h264 it works
> fine. If there is no MPEG2 support, maybe we should get an error return
> or it should revert to software decoding. Is there anything ffmpeg can
> do to avoid this, or do I have something wrong in my code?
>

The hardware mpeg2 decoder on that device is extremely buggy.

For some interlaced streams, it will generate flashing green output:
https://github.com/amzn/exoplayer-amazon-port/issues/58

For videos where it works, the decoder will randomly lock up after some
time and stop accepting new packets and also stop returning new frames (as
you noticed).

These are issues in the underlying codec/hardware/OS and not something
ffmpeg can work-around.

Aman


>
> I have set ffmpeg debug logging and captured the log. That is here ->
> https://pastebin.com/ZF9JiMTX
> The code where we process packets is here ->
>
> https://github.com/MythTV/mythtv/blob/a1349d7f535dfcc5993a1f515e4ee2cb257e3aa6/mythtv/libs/libmythtv/avformatdecoder.cpp#L3686
>
> Peter
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mythtv.org/pipermail/mythtv-dev/attachments/20181120/d54ccd11/attachment.html>


More information about the mythtv-dev mailing list