Ok. You were right.
Disabling HTTPS scanning in the avast protection settings worked, but that seems to apply to all accounts on the PC.
My solution was to put exceptions for *.youtube.com and *.googlevideo.com into avast.
Hopefully that's a more secure solution. I guess.
though if you are getting similar errors on lots of sites then it might not be a good idea to set up exclusions for all f them.