Lin, 33, was wearing a yellow T-shirt, shorts and a baseball cap as he walked in nonchalantly with Magnotta at 10:16 p.m. on May 24, 2012.
Just a few hours later, Magnotta was caught on the same cameras, wearing Lin's T-shirt and methodically putting trash in the basement of the building as well as carrying it outside over the next day.
That was just one of dozens of instances that Magnotta was captured entering and leaving the building before he left for Europe on May 26.
Magnotta, 32, is charged with first-degree murder in Lin's slaying and dismemberment. The Chinese student's torso was found on May 29, stuffed into a suitcase behind the apartment building.
Confronted with the body part, garbage bags soaked in blood and identity papers bearing the name Luka Rocco Magnotta, a homicide detective initially thought the accused was the victim.
But Claudette Hamelin testified Thursday that Magnotta quickly went from possible victim to person of interest and then to main suspect after the building manager identified a man caught on the surveillance video as Magnotta.
The jury also heard from another witness Thursday that Magnotta was captured on video at two Montreal-area postal counters.
The trash behind the apartment provided a wealth of evidence, Hamelin testified, referring to items the jurors saw for themselves after seeing them in photos.
"We found Mr. Magnotta's identification, tools that were covered in blood or what looked like blood, a small dog and pieces of a human body," Hamelin said.
Police also found a video camera, a laptop computer and a cellular phone, all looking "normal, usable, functional," Hamelin said. A few of the garbage bags contained limbs — arms and legs without hands or feet attached.
Armed later with the knowledge of a so-called murder video, Hamelin said they returned for a few more items from the trash: a poster from the movie "Casablanca" and a wine bottle, bearing the label "Wish for Love," that had been used to sodomize the victim.
The video sequences shown Thursday capture Magnotta returning to the apartment on the morning of May 25 with a big, grey suitcase. The torso was found in a grey suitcase with slash marks and drops of spray paint.
A sequence later in the day shows Magnotta using the elevator to bring the suitcase downstairs, struggling to get it out the front door. Magnotta is seen taking garbage out the front door, even though garbage bins are in the basement.
Magnotta is also spotted on video walking a small black puppy in the wee hours of May 25 — the same animal police found dead in the trash.
In the videos, Magnotta is often seen wearing a dark wig. He shows no discernible emotion. On a number of occasions, he stops to check his appearance in a wall of mirrors in the lobby of the building as he goes about his day.
Earlier on Thursday, the trial heard audio testimony from the preliminary hearing of a now-deceased witness who rented Magnotta the bachelor apartment for $490 a month.
Eric Schorer testified in 2013 the building had four security cameras — three with various views of the ground floor and entrance and one in the basement. They were activated by motion detectors and Schorer testified he never told Magnotta specifically of their existence.
Schorer said there was nothing remarkable about his first meeting with Magnotta, about two months before Lin's death. He testified Magnotta told him he was unemployed, was looking for work as a caregiver and that he had a child in the area.
In his testimony, Schorer said the janitor of the building reported seeing a suitcase outside that was smelly and covered in maggots amid a mound of trash.
The janitor, Michael Nadeau, testified Thursday he broke a small lock to get a closer look.
"We saw a neck, shoulders and the top of a torso and that was enough for us," he said. "We called 911 right away."
Magnotta has pleaded not guilty to five charges but will argue he is not criminally responsible because of mental disorder.
While Magnotta admits to causing the acts he's accused of in Lin's death, his lawyer, Luc Leclair, has said his client suffers from schizophrenia and was diagnosed with borderline personality disorder shortly before the slaying.
The Crown contends the killing was planned and deliberate and says its case will show just that.
The charges against Magnotta are first-degree murder; criminally harassing Prime Minister Stephen Harper and other members of Parliament; mailing obscene and indecent material; committing an indignity to a body; and publishing obscene material.
The first week of the trial heard from eight witnesses — five police officers, two apartment employees and Lin's former lover, Feng Lin.
The trial resumes Monday with Hamelin's testimony.
Notable moments from the first week included:
— A bizarre note naming Prime Minister Stephen Harper and his wife Laureen sent to Conservative Party headquarters being submitted as evidence.
— Jurors hearing that Lin had split from his gay partner less than two weeks before his slaying because he felt family pressure to marry a woman.
— Crown prosecutor Louis Bouthillier telling jurors from the outset that the first 53 seconds of the so-called murder video actually shows a different man in footage recorded one week earlier.
Also on HuffPost