I had the same issues on two different computers, one with Intel HD4400 and one with Intel HD620 CPU/GPU.
This is how I resolve the problem:
Install Updated Open Graphics Drivers PPA
sudo add-apt-repository ppa:oibaf/graphics-drivers
sudo apt update
This will update your Mesa graphics drivers but most importantly your
A note of caution: It's been known for these drivers to have some issues so I would suggest that after the update, if everything works, remove this PPA from your sources list.
/etc/X11/xorg.conf.d/20-intel.conf file with this content:
Identifier "Intel Graphics"
Option "AccelMethod" "sna"
Option "DRI" "3"
Option "TearFree" "true"
Option "Backlight" "intel_backlight"
mpv Media Player. Not
mpv. Use this for playing your local videos.
The 1. and 2. did manage to remove all my video-in-browser troubles, I even get to have hardware acceleration in Google Chrome without any issues. Number 3. helped me with the local video files.
There is a good reading on this here: IntelQuickSyncVideo
In case you don't have the command
sudo apt install software-properties-common
and then redo the previous command who contains