More than two years ago, Kurt Schneider ’10 composed a song: “I want to bone my TA.”

Later, as he sat in the Swing Space common room with Jake Bruene ’09, the two conceived of writing a musical set on a college campus — the product of which became the Web series “College Musical,” which has garnered a total of 4.5 million hits on YouTube to date.

But the production team had loftier ambitions: Schneider and Bruene decided in fall 2009 to develop their story into a feature film, “College Musical the Movie,” which will premiere at the Whitney Humanities Center on Sunday.

“We never had the idea of making it into a movie in the beginning,” said Schneider, who directed the film. “It was just a crazy thought — ‘You know what, let’s try to make a film.’ If it wasn’t for people watching it online, we probably would never have made this film.”

The movie stars Sam Tsui ’11 as Cooper, a freshman who is so infatuated with his teaching assistant — played by Allison Williams ’10 — that he is failing English and at risk of losing his college scholarship, said Bruene, who wrote the screenplay. The musical comedy follows Cooper as he attempts to seduce his TA to remedy his grade. Along the way, he falls in love with fellow student Jackie (Julie Shain ’13), a girl he originally tries to use as a “stepping stone” for later romance with the TA, Bruene said.

“Cooper is a guy with whom the audience is supposed to sympathize,” Tsui said. “He’s the everyman’s hero who is in the unfortunate position of being too obsessed with his TA to the point that he cannot do well in class.”

The film was shot at Yale over five weeks in June and July 2010, with Andrew Johnson ’06 serving as the producer. Johnson estimated that 50 to 60 people — almost all Yale-affiliated — participated in the project on a regular basis, with several others serving as extras.

The production team worked up to 15-hour days to shoot all the footage they needed, Johnson said. They began the postproduction process of editing the film in August, and are still adding final touches.

Sunday’s premiere will be more like a “preview screening” of the movie, Bruene said, since the crew will work with a professional sound designer afterward to optimize the film’s sound.

He and the rest of the team said they do not yet have plans for the distribution of the movie, though they may submit it to film festivals in the future.

While staying true to its YouTube roots, the film contains additional characters and a more complex storyline, participants in the project said.

“It definitely was crafted more as a film, with a full arc,” Tsui said. “You get to learn more about the characters, and there is a full circle resolution.”

Bruene said that while the Web series depended on “Internet humor,” the film provides more context as to why the characters act the way they do.

After mentally erupting into song — the “I want to bone my TA” ballad that inspired the whole enterprise — when he is supposed to be taking an exam, Cooper fails the test and is in danger of losing his college scholarship if he does not improve his performance. This quandary gives him additional motivation to make his TA like him, and serves as the catalyst for the film’s plot, Bruene explained.

Other characters include Cooper’s roommates Nate (Miles Jacoby ’11) and Lubo (Brennan Caldwell ’12) and Dave McIntosh ’08, who plays a patient afflicted with the fictional “man-child” syndrome for comic effect.

“It’s essentially a chick flick,” Schneider said. “It’s a guy-gets-girl story. And it’s heartwarming and I think people are really going to relate to the characters, and our cast is incredible.”

The movie will be screened on Sunday at 8 p.m. and 10:30 p.m. in the Whitney Humanities Center auditorium. A question-and-answer session with the cast and crew will follow the first showing, and tickets can be reserved online.