A man who claimed to be leader of Nigeria's Boko Haram has appeared in a video posted on social media, rejecting statements by the country's military that he had been seriously wounded in an air strike.

"You have been spreading in the social media that you injured or killed me," the man purporting to be Abubakar Shekau, leader of the armed group, said in the 40-minute video released on YouTube on Sunday.

Last month, Nigeria's air force said it had killed senior members of the group, adding that Shekau had been seriously wounded.

The Nigerian military has said it killed or critically wounded Shekau multiple times in recent years, often right before someone who claims to be him shoots a video denying it.

Inside Story - Nigeria deal with Boko Haram still possible?

While they all sport Shekau's distinctive beard, the grainy quality of the footage means it is not always possible to confirm if the person is the same as in previous videos.

"I will not get killed until my time comes," said the man in the video addressed to "tyrants of Nigeria in particular and the west of Africa in general".

Speaking in Hausa, Arabic and English and in dialects spoken in northeast Nigeria he appeared to be in good physical health.

He used the video to issue threats against President Muhammadu Buhari, who appealed to the United Nations this week for help in negotiating the release of the more than 200 Chibok schoolgirls kidnapped by the group more than two years ago.

"If you want your girls, bring back our brethren," Shekau said.

Nigerian armed forces spokesman Sani Usman downplayed the video released on Sunday.

"He ... tried, albeit failingly, to deny the air raid by the Nigerian Air Force in which he was wounded," Usman said.

"The video has shown beyond all reasonable doubt the earlier suspicion that the purported factional terrorist group leader is mentally sick and unstable."

The women who love Boko Haram

Separately, the army said "suspected remnants" of Boko Haram attacked troops near Logomani, in northern Borno state, in the early hours of Sunday.    

"Our troops fought gallantly and … the troops counted 22 dead bodies of Boko Haram fighters," it said in a statement. Four soldiers were killed and two wounded.

Boko Haram has killed about 20,000 people and displaced more than two million in a seven-year insurgency aimed at creating a state adhering to strict Islamic laws.

It controlled a swathe of land in northeast Nigeria about the size of Belgium at the end of 2014 but was pushed out by Nigerian troops, aided by soldiers from neighbouring countries, early last year.

Nigeria marks 500 days since Chibok girls' abduction

Source: Agencies