Four soldiers, part of a defected brigade which supports the demonstrators, were killed in fighting with government forces, medics at a field hospital said. Two people had died earlier on Tuesday when at least three shells hit a protest camp.
Violence has shifted from a crackdown on protesters seeking an end to the 33-year rule of President Ali Abdullah Saleh to a military confrontation between government troops and soldiers who have defected to the opposition.
It was not immediately clear who were the snipers who appeared on buildings. Pro-Saleh snipers had shot several protesters on Monday. Soldiers loyal to defected General Ali Mohsen were also on the streets.