On tape, Oliveira said the act was part of a fight "against cruel, cowardly people."
The video, obtained by Globo TV, first aired Tuesday night and posted on the television station's website Wednesday, shows a close-up of the young man with his back against a wall in a video he apparently recorded himself. He's cleanshaven, in a white shirt, and speaks in a slow, flat voice that betrays nothing of the massacre he has planned.
"The fight for which many brothers in the past have died, and I will die, is not exclusively for what is known as bullying," he says in the video. "Our fight is against cruel, cowardly people who take advantage of the kindness, the innocence, the weakness of people who are incapable of defending themselves."
He says he shaved the beard he'd been wearing because he was planning to scout out the school and didn't want to attract any attention. Oliveira said he'd been there, months before, and had gone again on Monday, three days before the shooting. He dates the video as Tuesday, April 5, two days before the shooting.
Police are still investigating a motive.
Neighbors and relatives remembered Oliveira — who killed himself after he was shot in the legs by a policeman — as a quiet, introverted young man who was spent his time with computers.
"He was very alone, absent, very closed up," said one of Oliveira's five siblings in an interview with Globo TV. He did not want to identify himself. The family is deeply upset and afraid of being targeted for Oliveira's actions. The sibling said Oliveira had been adopted as a baby and had a history of psychological problems. They have not yet claimed Oliveira's body, which remains at the city morgue.
One of the students who had been hospitalized after the shooting was released Wednesday, the Rio state health department said. Five others remain in local hospitals, two of them in critical condition.
The chilling video was broadcast on newspaper websites and television stations even as the archbishop of Rio de Janeiro celebrated a Mass on Wednesday morning before a crowd of 2,000 in front of the Tasso da Silveira school.
Archbishop Orani Tempesta called for those present to work toward creating an environment of safety and calm in the neighborhood, so the school could go back to being a refuge for children.
"This place has to become again a place where children can study in peace," he said.
The highway police officer who responded to a child's call for help and was able to shoot Oliveira in the legs, preventing him from continuing his attack, also asked for the school to continue its mission.
"To the parents, the students, I ask that they not abandon this school," said the officer, Marcio Alves. "You'll find here the strength to recover."
Parents and relatives of the 12 children who died also spoke, many crying as they did.
Valdir dos Santos, father of Milena Santos do Nascimento, a 14-year-old girl killed in the attack, tried to control his emotions so he could talk.
"On the day Milena died, I said my heart had been ripped out," he said. "It will hurt for a long time. I'll never forget my daughter, but I have to pull myself back up, because I have two others to care for."
The Mass ended with a prayer recited by all, including representatives of various religious groups. Police helicopters showered the congregation with red rose petals.
Based on reporting by the Associated Press.