Civilian casualties were not recorded at both scenes, but an unspecified number of security personnel were wounded, he adds.
Witnesses at the national television office, which faces the French embassy in an area that also houses the prime minister's office and the United Nations, said five people pulled up in front of the embassy in a pickup truck.
Earlier on Friday, witnesses said they saw armed men getting out of a auto and opening fire as they headed towards the embassy, BBC reported. Police and army units were deployed in the area.
Foreign Minister Jean-Yves Le Drian said damage to the embassy was minor, and the mission would be able to resume normal operations "in two or three days".
The explosion inside the headquarters shook surrounding buildings, set the compound on fire and sent up a thick column of black smoke.
Across central Ouagadougou to the west, heavy smoke rose from the army joint chief of staff's office, where witnesses reported loud explosions. At least 98 schools have been closed in Burkina Faso's Sahel region because of insecurity, according to Unicef.
Men escape from Burkina Faso's army headquarters during an attack in the capital Ougadougou, Burkina Faso March 2, 2018.
The embassy initially said on its Facebook page that an attack was underway at the embassy as well as Ouagadougou's French cultural institute. "Their safety is my priority", Le Drian said.
Sasha Banks Hypes Elimination Chamber, What Does Mahal Think Of Ronda Rousey/WWE
This is the final Raw PPV before WrestleMania and there are two spots on the card that will set up major matches in New Orleans. With tonight's WWE Elimination Chamber just hours away, WWE Superstar, Sasha Banks has been hyping the show on Twitter.
French forces in the country were also deployed. The two targets are a few meters away from the prime minister's office in the city.
Witnesses in Ouagadougou started reporting sounds of gunfire and rocket launchers across the city shortly after 10:00 a.m. local time.
French news site Le Monde Afrique is quoting a source inside the French embassy in Ouagadougou saying five gunmen had tried to enter the embassy but they failed. The landlocked country of around 19 million exports cotton and gold.
Last August, suspected extremists killed at least 18 people last August during a raid on a restaurant in Ouagadougou and militants have targeted Burkinabe security forces along its remote northern border region with Mali.
Some witnesses said the attack bore the markings of terrorism.
A government statement urged people to keep calm and avoid areas where there might be gunfire.
Attacks have increased in frequency since 2016 when al-Qaida in the Islamic Maghreb (AQIM) and the al-Mourabitoun group launched an assault on a hotel and restaurant taking 170 people hostage and killing 30 in Burkina Faso's most lethal attack.
Five countries launched a new task force previous year to tackle Islamist militants in the region, to which global donors have committed half a billion dollars.