Mayor Bill de Blasio said Thursday that the failure to reduce homelessness in New York City is one of his biggest regrets.

Despite millions of dollars in additional spending and the departure of two top officials in charge of addressing the problem, the city’s homeless population is at record highs, and, de Blasio said, “I’m very dissatisfied.”

“I’ve gotta produce for the people of this city. I’ve gotta find a way to keep preventing homelessness, to get people off the streets for good and to provide the shelter capacity we need. It’s not a fun and easy equation,” de Blasio said.

“So my job is to get it right, and I’m certainly not satisfied that I or my team got it right to date, but I do see the beginning of some real progress,” he said.

Earlier this year, the city announced that the homeless population topped 60,000 for the first time in recorded history. The figure had been steadily rising under de Blasio’s predecessors, and de Blasio’s team said the administration’s efforts have slowed the growth rate.

For much of his tenure, the homelessness issue has tormented de Blasio, who until until late last year dismissed claims of a worsening problem as tabloid hype. But after prodding by his own police commissioner and plummeting opinion poll numbers, de Blasio switched course.

His social-services deputy, Lilliam Barrios-Paoli, and homeless-services commissioner Gil Taylor have left the administration.

Sign up to get the latest updates Get Newsday's Breaking News alerts in your inbox. By clicking Sign up, you agree to our privacy policy.

Under de Blasio’s new Home Stat program, city workers have tried to maintain a list of every homeless person living on the streets, find out why each is homeless and conduct more frequent censuses. The city also has expanded the use of hotels to house the homeless, prompting complaints in some neighborhoods.

“We put a series of strategies in place. They didn’t get us where we wanted to go. And we had to try new ones,” de Blasio said at the year-end news conference.

Separately, de Blasio defended his administration’s production of a video touting his accomplishments — at taxpayer expense and tweeted from his government account..

A song in the video says, “No matter what will be, we’ve got Billy D.B.!”

Good-government groups have criticized de Blasio for the 3 minute, 35 second video. De Blasio is running for re-election next year.

“Every leader, every organization puts out materials talking about what they have done. They usually have glossy pictures of their leaders and letters from their leaders and quotes from their leaders. C’mon, this is no different,” de Blasio said.