Here’s amazing video proof showing how animals can sense danger (in this example an earthquake) before it occurs.
Notice Sophie the Labrador who is lying on the floor. She sniffs the floor a bit then she hops up and bolts out of frame.
A few seconds later, the earthquake hits and you can see the camera shake and people running for cover. Sophie apparently did a lap around the room trying to find her owner. They both made it out of the building safely.