Kodi Community Forum

Full Version: Auto de-interlacing (in PVR streams) does not always work
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6 7
Trac ticket: http://trac.kodi.tv/ticket/16958



Following the discussion here: Revised codec thread - I still have a question.


I have a few TV channels on my satellite feed (running tvheadend) that 'need' de-interlacing. For example, I watch a certain channel with those news tickers (the rolling text in the bottom part of the screen, with news or stock prices etc.), and it's immediately noticeable that the stream is not good. The rolling text is jagged, making it pretty unintelligible. The Video menu gives me either the option to have de-interlacing Auto or Off. I have it set to Auto, but apparently that's not working in this case. If I set it to Off, nothing changes, but when I set it back to Auto, the video immediately becomes clear and texts are readable.

So, somewhere Kodi doesn't autodetect whether the video is interlaced. I'll admit it often works just fine (including these particular channels), but sometimes it doesn't.

It might be that tvheadend, the HTS addon, my satellite LNB, the satellite tuner (or its drivers) or whatever is in the wrong here, sending out some wrong flags in the video stream, but from a user perspective, I think Kodi should be able to do this better. Obviously it's perfectly capable of de-interlacing the stream, and often the detection works just fine, but it just doesn't always know when to do so.

Do other people experience the same phenomenon?
Is there anything I can do about this?
If you guys agree this is something that should be fixed, do you need more info or something?



I'm currently running Windows 10 x64 with a Krypton nightly from a few days ago. The tvheadend version is the latest nightly. I'll get some debug logs and perhaps a screenshot later tonight.
Unfortunately my last foray into programming was while QuickBasic was still new so I can't help you there. Wink
Please provide a sample that we can reproduce the issue.
I have experienced the same problems with interlaced pvr streams.
Deinterlace method is set to 'auto', but the video stream is still interlaced. When i switch to 'inactive' and then back to 'auto' everything works fine.
I'm using Kodi 17 Beta 2 on a windows x64 pc and dvbviewer recording service as pvr backend.
(2016-09-22, 21:22)TKOlit Wrote: [ -> ]I have experienced the same problems with interlaced pvr streams.
Deinterlace method is set to 'auto', but the video stream is still interlaced. When i switch to 'inactive' and then back to 'auto' everything works fine.
I'm using Kodi 17 Beta 2 on a windows x64 pc and dvbviewer recording service as pvr backend.

We investigated this on a trac ticket. Turned out be an issue with gfx driver on Windows. iirc it was AMD.
Since I created this thread, I only noticed the problem once, and didn't have time then to create logs and stuff. Oddly enough, it happens a bit more often before then. Perhaps I installed some newer nightly in between, I don't remember.

However, I also use AMD with a Crimson driver (Windows 10). Since my APU is like three years old, I see no problem in reverting to an older version, i.e. the Catalyst ones. I'll try that next, and then see what happens.

Thanks guys!
If the problem resurfaces with the older drivers, I'll report back.
Alright, so the problem is still here. Like suggested in the previous posts, I've reverted to the old 2015 AMD Catalyst drivers. (Running Windows 10 x64, AMD APU A6800k). Didn't seem to help.

Here is a debug log file: http://pastebin.com/zdS8q1XE
I truncated a bit in the middle because of the maximum file size on pastebin. The part where I switched to a channel that had de-interlacing problems, starts at 07:49:54. I switched to Al Jazeera TV. That's an SD MPEG-2 channel on satellite.

I switched to the channel, saw that is wasn't de-interlaced properly (despite the auto DXVA setting). Screenshot (screenshot004.png in the log) where it does not work: http://imgur.com/a/MgJ3F (Notice the text in the bottom.)

Then I went into the Video settings (in the player menu), changed to de-interlacing: None. Then back to DXVA, and voila, de-interlacing works! Screenshot (screenshot005.png in the log) where it works: http://imgur.com/a/Gxtzt


I haven't made a recording, because I noticed the previous time when I did make one, the recorded file didn't show the same behaviour. Either the de-interlacing detection is working randomly, or it only happens on live streams (PVR). I guess the latter, but I don't know. Most often in live TV it works just fine, but sometimes it doesn't, and it's pretty noticeable.

Because I reverted back to the Catalyst drivers, I had to re-set all settings. I kept all 'video enhancement' options OFF in the Catalyst control centre.

Please tell me if I can do more.
(2016-09-30, 08:26)willemd Wrote: [ -> ]Alright, so the problem is still here. Like suggested in the previous posts, I've reverted to the old 2015 AMD Catalyst drivers. (Running Windows 10 x64, AMD APU A6800k). Didn't seem to help.

Here is a debug log file: http://pastebin.com/zdS8q1XE
I truncated a bit in the middle because of the maximum file size on pastebin. The part where I switched to a channel that had de-interlacing problems, starts at 07:49:54. I switched to Al Jazeera TV. That's an SD MPEG-2 channel on satellite.

I switched to the channel, saw that is wasn't de-interlaced properly (despite the auto DXVA setting). Screenshot (screenshot004.png in the log) where it does not work: http://imgur.com/a/MgJ3F (Notice the text in the bottom.)

Then I went into the Video settings (in the player menu), changed to de-interlacing: None. Then back to DXVA, and voila, de-interlacing works! Screenshot (screenshot005.png in the log) where it works: http://imgur.com/a/Gxtzt


I haven't made a recording, because I noticed the previous time when I did make one, the recorded file didn't show the same behaviour. Either the de-interlacing detection is working randomly, or it only happens on live streams (PVR). I guess the latter, but I don't know. Most often in live TV it works just fine, but sometimes it doesn't, and it's pretty noticeable.

Because I reverted back to the Catalyst drivers, I had to re-set all settings. I kept all 'video enhancement' options OFF in the Catalyst control centre.

Please tell me if I can do more.

What version of Catalyst drivers are you using? For me last working one is 15.7.1 WHQL. AMD has released two Catalyst versions after that but in my experience they suck just as much as all the Crimson drivers.

It's easy to downgrade the drivers if you're running old enough hardware (mine is Radeon HD 7870) but I pity those who built their HTPC on the new 400 series that cannot use Catalyst drivers.

AMD has really dropped the ball in regards of video playback quality on Windows and it seems they have no intention on fixing these problems.

Couple of rants on AMD forums:
https://community.amd.com/thread/191799
https://community.amd.com/thread/197434
Yep, I'm also running Catalyst 15.7.1 (WHQL).

I had the 16.2.1 beta running, because the newer Crimsons didn't support my AMD A10 A6800k + Radeon 8670d, which is from 2013. I agree with you that it's frustrating that they dropped all kinds of advanced features from their newer drivers.
Alright, I have here a video of what I see on my TV. It's been filmed with just my mobile phone and obviously that's not ideal, but I think you can see what happens. I focused on the ticker text in the bottom part of the screen.

The menus aren't visible in my video but what I did was:
1. Start PVR / TV
2. Enter menu, turn off de-interlacing from DXVA to Off
3. Exit menu, see full screen video (no change in de-interlacing)
4. Enter menu, turn ON de-interlacing from Off to DXVA
5. Exit menu, see full screen video (great quality now)

Video of my TV: https://vid.me/qI0d
(The video website downgrades quality more than I expected, here is the original .mp4 on WeTransfer which shows it more clearly: https://we.tl/cH6waJ7aLg )


This now happens pretty much every time I watch PVR. With the AMD Crimson drivers I think the problem usually only surfaced with live streams, but it may be that I changed settings between both drivers. I cannot check that anymore.

I've made a sample recording with tvheadend. My Kodi actually has the same problem with the recording as it has with a live stream. (But e.g. MPC-HC has no problem.)
Here is a WeTransfer link to the .ts video file: https://we.tl/s0Z9ipWuVx


I don't have a new debug log, but the behaviour that I see is exactly the same as in my previous post: http://forum.kodi.tv/showthread.php?tid=...pid2426605 (There's a debug log there.)



It's _not_ the same as in this bug: http://trac.kodi.tv/ticket/16899 because in that case it was solved by downgrading the AMD drivers. I tried that, it didn't help.

Perhaps this isn't new in Krypton, but in previous versions there was the 'override' to force de-interlacing, which is now removed. I know there are good reasons, but isn't there some way to force it again, but perhaps not in the GUI, but only in advancedsettings.xml or something? It's a dirty workaround, but from a user's perspective, it does make Kodi PVR usable again on AMD / Windows. Or I'm missing some other factor?


Running Kodi Krypton nightly from Oct 3rd. Windows 10 Pro x64, AMD Catalyst 15.7.1 with an AMD APU A10-6800k ("Radeon 8670D"). The video streams come from TVHeadend (current nightly).
Forcing deinterlacing won't cure your issue because deinterlacing is already set to on. The problem is that the driver does not seem to recognize it. Step 4. and 5. of your descriptions do nothing but reset/set a flag given to dxva renderer.
Thanks for your reply. I had hoped - a little bit - that it was a bug in Kodi, causing the interlacing to be not recognised at the start, or something. But I see it something must be wrong in my HTPC here.

I will try some re-installing of different driver versions or perhaps the entire OS if that's necessary.


The odd thing is though, that it worked perfectly in Jarvis and I first noticed problems with Krypton. But perhaps some Windows updates or AMD driver has changed in the same time.

I'll report back when I know more.
Maybe the driver only recognizes the flag when it changes from progressive to interlaced. Starting DXVA rendering with the flag forced to progressive could cure the issue. This is just automated what you did manually.
we'll provide a test build with those changes. stay tuned
Pages: 1 2 3 4 5 6 7