Sometimes you will see that the image quality is poor for the first 5 - 10 seconds but then improves.

This is because when you start viewing a YouTube video, YouTube tries to detect the speed of your internet connection to set the image quality to a suitable level that your internet connection can support.

This means that on occasion, it will initially set the image quality too low but will then correct itself to a more appropriate image quality after 5 - 10 seconds. If you restart the video, it will be the correct quality from the start.