Remaining police video clips of Justin Bieber after his January arrest will be made public with sensitive portions blacked out to protect the singer's privacy, a judge has ruled.

Miami-Dade County Judge William Altfield said two of the five unreleased video clips depict the singer's genitalia during a urine test for drugs at the Miami Beach police department.

Judge Altfield agreed with lawyers for Justin, who turned 20 on Saturday, that the video's airing would be an invasion of privacy that outweighed the public's right to know.

"Mr Bieber's right to privacy is paramount," the judge said. "He has not lost his right to privacy, and that is what is important here."

Lawyers for news outlets had previously suggested any sensitive portions be blacked out and the rest released under Florida's liberal open records laws. Much of the footage was released last week, some of it showing the singer walking unsteadily during a sobriety test.

Justin has pleaded not guilty to charges of driving under the influence, resisting arrest and driving with an expired licence. He and R&B singer Khalil Amir Sharieff were arrested early on January 23 during what police called an illegal street drag race between a Lamborghini and a Ferrari. Neither has been charged with drag racing.

Justin's lawyer Roy Black said he was satisfied with the ruling, as did media lawyers. AP lawyer Deanna Shullman said the news organisation would never show the singer's private parts, and Scott Ponce, representing The Miami Herald and CBS television stations, said the ruling was more about protecting the singer from random releases on the internet.

Mr Black said the three clips to be released without redaction are shot from an angle that is too far away to discern what is going on. It was not immediately clear when any of the video would be released.

Evidence released previously showed that a breath test found Justin's blood-alcohol level below the .02 threshold considered intoxicated for under-age drivers. The urine test found the presence of the active ingredient in marijuana and the anti-anxiety drug Xanax. Justin told officers he had been smoking marijuana before his arrest, according to police reports.

A trial date has not been set.