A policeman blocks photographers from taking pictures during an anti-China protest in front of the Opera House in Hanoi (Reuters)

A crackdown by the Vietnamese government on political dissent is continuing with two musicians thrown into jail for writing anti-government songs.

Vo Minh Tri and Tran Vu Anh Binh were sentenced to four and six years jail by a court in Ho Chi Minh City on charges of spreading propaganda against the state.

They were sentenced in a half-day trial that came after 10 months in detention.

Vo, 34 and Tran, 37, allegedly posted their dissident songs on a Vietnamese opposition website run by a group of expatriate activists known as Patriotic Youth.

Vo was blamed for composing a song criticising Vietnam's alleged submissive policy towards China on territorial claims in the South China Sea. One of Tran's melodies encouraged non-violent protest against Vietnam's single party rule.

The sentence was slammed by human rights groups.

"This is a ludicrous way to treat people just for writing songs. These men are prisoners of conscience, detained solely for the peaceful exercise of their right to freedom of expression through their songs and non-violent activities and should be freed," said Rupert Abbott, Amnesty International's Vietnam researcher.

"First critics, then bloggers, then poets, and now musicians. The international community can no longer stand by quietly as these free speech activists are picked off one by one by Vietnam's security apparatus," said Human Rights Watch's Asia division deputy director Phil Robertson.

Vietnam's communist party has been implementing a severe suppression of online criticisms and dissent.

Earlier in 2012, three bloggers were sentenced to up to 12 years in jail on similar charges and an arrest warrant against another two was issued.