Artefacting on rx560 with live TV content
#1
Hi,

I am experiencing an issue where play pack of DVB TV recordings will begin to artefact and worsen until the image is frozen. Audio continues fine. This only occurs with live TV, local playback of x264 and x265 content play fine, and the system in general runs well. System is running ubuntu 20.04. I have tried the same content with a 5.15 kernel and obiaf and kisak-mesa ppa's as well as an libreelec nightly, all with the same results. Hardware is a rx560 and intel i5 4570.

dpkg -l |grep mesa | pastebinit
https://paste.ubuntu.com/p/frwyHKXSFC/


DISPLAY=:0 vainfo | pastebinit
https://paste.ubuntu.com/p/zYJV35wWyS/

cat ~/.kodi/temp/kodi.log | pastebinit
https://paste.ubuntu.com/p/PNtxwhHJhC/

dmesg | pastebinit
https://paste.ubuntu.com/p/HzrwKcPkGF/

id | pastebinit
https://paste.ubuntu.com/p/mf3D852dZP/

amixer | pastebinit
https://paste.ubuntu.com/p/WCZM5bVfVT/

cat /var/log/Xorg.0.log | pastebinit
https://paste.ubuntu.com/p/QNpDBxYjHc/

mediainfo
https://paste.ubuntu.com/p/wthYZhVMMf/

video of artefacting
https://youtu.be/EJCfi4RP5Pg

link to sample recording
https://www.dropbox.com/s/1l7w5wcjtnh0cj...ct.ts?dl=0

Anyone have any thoughts on how to fix this?
Reply
#2
New logs from yesterdays libreelec nightly. Exact same issue as the ubuntu logs above.
This only seems to happen with interlaced content. I have run combined cpu + gpu stresstests, games, kodi gui, video content for long periods and the system behaves - no graphical glitches or issues.
I can stop a video and start playing and it will begin to play normally.
it begins with motion having a ghosting and it progressively deteriorates until it is like the video linked to above.
Opening the fullscreen GUI and returning to the video does not fix the issue. GUI displays fine while the artefacting is present on the video stream.

DISPLAY=:0 vainfo | pastebinit
http://ix.io/3EE0

cat ~/.kodi/temp/kodi.log | pastebinit
http://ix.io/3EE1

dmesg | pastebinit
http://ix.io/3EE2

id | pastebinit
http://ix.io/14YC

amixer | pastebinit
http://ix.io/x8T

No dpkg or xorg logs are available on librelec. Happy to provide anything else if it will help.

Another round of logs from libreelec:

DISPLAY=:0 vainfo | pastebinit
libva info: VA-API version 1.13.0
libva info: Trying to open /usr/lib/dri/radeonsi_drv_video.so
libva info: Found init function __vaDriverInit_1_13
libva info: va_openDriver() returns 0
http://ix.io/3EE0

LibreELEC:~ # cat ~/.kodi/temp/kodi.log | pastebinit
http://ix.io/3EEa

LibreELEC:~ # dmesg | pastebinit
http://ix.io/3EE2

LibreELEC:~ # id | pastebinit
http://ix.io/14YC

LibreELEC:~ # amixer | pastebinit
http://ix.io/x8T
Reply
#3
Trying to dig into this some more.
I have installed windows on this machine and I get similar results as the video posted above. I didnt grab any logs but I can if wanted.
I have run another round of gpu + cpu stress tests, mem test and tried removing ram sticks and reseating the gpu, all of which have passed/none of which have made a difference.
In the most recent log I noticed the following line around when the issue started

2021-11-30 20:36:36.863 T:333115   DEBUG <general>: ffmpeg[0x56321c011040X]: [mpegts] Packet corrupt (stream = 0, dts = 2007374635).

So it seems like the software is not recovering from a corrupt live tv stream. Given the nature of dvb-t live tv, corrupt files is to be expected. I have an intel system that is fed from the same backend and I have never experienced corruption like this.
I tried googling the line above and google gives me a warning that there arent many good results, and there are a few hits related to ffmpeg, but nothing that I can see that relates to artifacting of the video output.

I have played the sample recording I posted above and the corruption occurs around the 4m43s mark. I was able to reprouce the corruption several times by skipping to 4m20s. The log file had a bit more info which may relate to the error. The file is being played locally which I believe rules out mythtv-pvr or network issues.

2021-11-30 20:52:18.128 T:366796   DEBUG <general>: ffmpeg[0x56321b9c1730X]: [mpegts] Packet corrupt (stream = 0, dts = 2209044203).
2021-11-30 20:52:30.018 T:293926 WARNING <general>: CGLContextEGL::SwapBuffers: last msc time greater than interval (1)
2021-11-30 20:52:33.283 T:293928   DEBUG <general>: LIRC: - NEW 0001016600000001 00 KEY_INFO devinput (KEY_INFO)
2021-11-30 20:52:33.298 T:293926   DEBUG <general>: HandleKey: launch_media_center (0xc3) pressed, action is Info
2021-11-30 20:52:33.298 T:293926   DEBUG <general>: ------ Window Init (DialogFullScreenInfo.xml) ------
2021-11-30 20:52:33.298 T:293926    INFO <general>: Loading skin file: DialogFullScreenInfo.xml, load type: KEEP_IN_MEMORY
2021-11-30 20:52:33.299 T:293926   DEBUG <general>: ------ Window Init (DialogSeekBar.xml) ------
2021-11-30 20:52:33.301 T:372941   DEBUG <general>: Thread JobWorker start, auto delete: true
2021-11-30 20:52:33.301 T:293926   DEBUG <general>: ------ Window Init (Custom_1109_TopBarOverlay.xml) ------
2021-11-30 20:52:33.301 T:372941   DEBUG <general>: ffmpeg[0x7f559c0dec80X]: [image2] Custom AVIOContext makes no sense and will be ignored with AVFMT_NOFILE format.


I dont really know what else to try or where to look for a possible solution.
Is anyone with a radeon rx560 or similar vintage radeon hardware able to test the video linked above and test to see if the corruption happens on their system? Since the same issue appears on windows I guess that OS doesnt really matter (FWIW I also experience the same issue on windows 10 x64, manjaro and libreelec nightlies)
Is there anyother software which is comparable to kodi which I can test with to help isolate the issue?
Does anyone have any pointers on where to look for fixes? Or if I need to report this issue elsewhere?

Any help is appreciated!

EDIT I have disabled "allow hardware acceleration - vaapi" in kodi's settings and the corruption no longer occurs in the test video linked above. I guess thats good news as it points to it not being hardware related. But still not sure how to tackle this frequent issue.

EDIT The test video I linked to displays the same issue when played in VLC. Not sure if vaapi is being used but I'm guessing it is as the symptoms are the same. I'll do some more testing on windows to help narrow down the issue.
Reply
#4
I tested some video playback in windows with the test file.
VLC, Kodi and Movies & TV app all display identical corruption at the same point.
SMPlayer does not display the corruption.

I also tested on a Windows Nvidia machine with VLC and the corruption does not occur. Unfortunately Kodi crashed when trying to browse the folder where the video is located, but Im guessing it will be the same as VLC.

So it looks like hardware acceleration with ffmpeg on possibly all polaris hardware... Ill post to the ffmpeg mailing list and see where that goes.

In the meantime, if anyone running polaris, or and amd gpu, would be able to test the sample I attached to the first post I'd much appreciate it.
Reply

Logout Mark Read Team Forum Stats Members Help
Artefacting on rx560 with live TV content0