Making GPU OC with WattMan or changing standard speed values with MSI AfterBurner may cause similar problems. Also using a VGA-HDMI converter or using a poor quality HDMI cable may cause similar problems. It may also be helpful to try an older version GPU driver that you are sure is stable. Also... video memory damage caused by pre-made OC or pre-made mining to the GPU may cause similar problems.
How long have you been using the RX 580? Did these problems begin with a driver update? Has OC been done before? Have speed values been changed with MSI AfterBurner? Did you use an HDMI converter?
So...it is very difficult to say what the problem is with the video you shared ...