Tehreek-e-Taliban Pakistan said the soldiers' heads were cut off Sunday when the militants infiltrated the northwestern district of Upper Dir, Khaama Press reported.
The Pakistani military previously said 13 of its troops were killed in the confrontation and seven were beheaded, while four other soldiers were missing, the news Web site said.
The Pakistani military had not responded to a request for comment on the video, Khaama Press said.
The Pakistan Observer reported highly placed military sources said Pakistan's military authorities have lodged a strong protest with their counterparts in Afghanistan, while the Pakistani government has taken up the matter through diplomatic channels.
The Observer said more than 100 militants were involved in the cross-border clash.
The newspaper quoted military sources as saying "the miscreants" also fired rockets into Pakistani territory Monday.