There has been anger at a perceived lack of warning and insufficient support from authorities after the floods.
King Felipe and Queen Letizia have been visiting Paiporta, a town that has been severely affected.
The footage shows the king making his way down a street with a hostile crowd shouting and chanting. Some protesters threw what appeared to be objects and mud at him.
On Saturday Spanish Prime Minister Pedro Sánchez ordered 10,000 more troops, police officers and civil guards to the area.
He said the deployment was Spain’s largest in peacetime. But he added that he was aware the response was “not enough” and acknowledged “severe problems and shortages”.