Also try switching to av1 codec, if you have a recent video card (https://arstechnica.com/gadgets/2022/03/firefox-will-efficie...), but not sure if it will help much if it's not the video lagging.