Kodi Community Forum

Full Version: Video Corruption - only on Live HD TV
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I'm currently experiencing video corruption when watching H264 Live TV streams via TVHeadend, running a Alpha 3 Gotham build with the latest addon build, which manifests itself as the picture breaking up, most frequently when the scene has a lot of movement in it (e.g. sports) while the audio usually remains unaffected. This is on a Sandybridge i3 system running Ubuntu 13.04, although this problem was also present on 12.04. When the picture breaks up there is a corresponding drop in the fps on the codec info screen, usually to around ~18 fps.

It does not happen while watching local media, while streaming from the internet or watching back recordings of the same broadcasts which break up while watching them live. It is also not influenced by the choice of decoding method - using software or the Intel GPU via VAAPI makes no difference. What DOES make a difference is setting the TV to not change resolution with the video (I'm in the UK so TV is broadcast @ 25fps, so my TV switches from 60hz to 50hz), as the problem then goes away entirely.

I also have a windows PC with a stable Frodo build that does not have this problem when viewing live tv from the same source. Here is a debug log and a screenshot of the corruption in effect, does anyone have any ideas why this is happening specifically with live TV? Thanks.

http://pastebin.com/P1njXXxW

http://imgur.com/x059JCB
I was investigating a similar issue for VNSI, at least the corruption looked the same. It was triggered by a parser error on the backend. It seems that ffmpeg does not recover if something went wrong at this stage.

@adamsutton maybe we need some capability to flush the decoder on next i-frame after a parser error.
Forgot to mention that my workaround currently is to start a recording on the channel and then view that recording. There's no video break up when doing that, for the same source that has the issue constantly live.
@Fernet, I've found that it is possible to watch Live HD TV without corruption. The issue is the act of switching from 60hz to 50hz while also loading the channel. If I go onto a live Internet stream that also runs at 25fps and then directly open a tv channel without the refresh rate changing then it works fine.

Hope that's enough info to track down the problem in the code!

Edit: And even more specifically it's the "Pause for x time while switching refresh rate" option. Changing it from 1.5 seconds to 0 fixes the problem when accessing the stream normally.
I'll try removing the pause before switching (I'm currently using 0.5 seconds). My workaround so far has been to switch channels once if the corruption starts happening, I guess it fixes the issue because then the refresh rate doesn't have to change when I switch back.

FernetMenta Wrote:@adamsutton maybe we need some capability to flush the decoder on next i-frame after a parser error.

I think this could be a good idea. Ideally ffmpeg should be fixed so that it can gracefully recover from whatever error is causing it to start acting up at the moment.