The suicide of writer David Foster Wallace at age 46 in 2008 provides a framing device for James Ponsoldt’s “The End of the Tour,” but though knowledge of it inevitably colors what we see and hear, it’s not the focus of the story. The larger section of the picture is set some twelve years earlier, when David Lipsky, a reporter for Rolling Stone magazine, spent five days traveling with the author at the end of a tour for his recently-published mega-novel, “Infinite Jest.” It depicts the give-and-take between the ambitious young interviewer and the somewhat skittish author, but is also meant to reveal Wallace’s vision of the world and his place in it—something that, we naturally conclude, would play a part in his ultimate decision to end his life.

As adapted by Donald Margulies from Lipsky’s book 2010 book (the planned article never materialized), the film is most notable for a tour-de-force performance (pun intended) by Jason Segel, playing against type as Wallace. He convinces as a scraggly-haired, bandana-wearing self-professed regular guy teaching at Illinois State in sleepy Bloomington, who gravitates between defensiveness and revealing admissions about his past and present over the course of the trip with Lipsky to and from Minneapolis. By contrast Jesse Eisenberg is pretty much in his comfort zone as the East Coast reporter, hitting many of the same notes as he has in previous films like “The Social Network.”

Still, the two stars play off one another nicely. Lipsky, a novelist whose work failed to get the recognition that “Jest” has received, is nonplussed that Wallace’s book is every bit as fantastic as reviews have suggested. Eisenberg catches the envy Lipsky feels toward his subject, especially when he tries to hide it during a phone call to his girlfriend (Anna Chlumsky), who enthuses about Wallace’s book and excitedly talks to the writer far longer than it takes to exchange mere pleasantries. It can also been seen in the moment when, before driving away from Wallace’s house after the trip is over, Lipsky sheepishly gives the writer a copy of his own book as a parting gift.

“The End of the Tour” also manages to convey, more adeptly than almost any other film, the uneasy relationship that inevitably exists between an interviewer and his subject. It’s shown not only in those moments when Lipsky’s probing is met with an icy stare—the editor wants him to push questions about Wallace’s rumored heroin usage, but the writer resists addressing such matters until he’s ready to bring them up himself—but also in the way that Eisenberg’s Lipsky frequently cuts into Wallace/Segel’s replies, suggesting a word or trying to direct the conversation down another path, or in the scene when he takes advantage of Wallace’s brief absence to poke around his house, jotting notes about posters on the walls and the contents of the medicine cabinet. In those cases Margulies, Ponsoldt and the actors perfectly capture the way such interactions go, with each man trying to bend things to his own purposes, and show how intrusive reporters will be when given the chance.

But while Eisenberg is fine, if familiar, as Lipsky, it’s Segel who dominates the film. Known primarily for his goofy comic turns, he shows himself capable of subtle dramatic work here. In his hands Wallace emerges as a larger-than-life fellow despite protestations to the contrary, and as a man of complexity and contradiction—indulging when the opportunity affords itself in the detritus of pop culture (he wants to visit the Mall of America, loves crass movies and watches junk TV so ravenously in hotels that he won’t have a set in his house for fear he won’t be able to turn it off) while prophesying that people will get lost in such ephemera and lose their common humanity in the process. Physically Segel fills the bill, using his big body sometimes to suggest clumsiness but often to express the man’s sensitivity to having his space invaded. And emotionally he can turn on a dime, most notably in a scene in which Wallace visits an old girlfriend of his (Mickey Sumner) and is irked at the thought that Lipsky might be coming on to her.

To be sure, this is a basically a talky two-hander of a movie, and one can be forgiven for smiling happily when a character like Joan Cusack’s blissfully oblivious Minnesota driver turns up to provide a dose of down-home comic relief, reacting with a grimace when Wallace shows up scruffily dressed for a radio interview and then, after listening to him, confessing that he was so interesting she might actually buy his book. But Segel and Eisenberg work so skillfully that you don’t mind the movie’s nearly exclusive concentration on them, even if in the final analysis their time together proves less revelatory than one might hope. On the technical side the film is no great shakes—the bland locations don’t give cinematographer Jakob Ihre much chance to shine, though he certainly captures the Midwest well enough. (A cursory query: did the winter of 1996 really bring knee-high snowdrifts to central Illinois while leaving the Twin Cities with only a dusting?) Danny Elfman’s score, however, is gently telling.

“The End of the Tour” will undoubtedly have most appeal for Wallace aficionados, even if many of them originally protested the idea of Segel playing the writer (and the Wallace estate is less than happy with the project having been undertaken at all). But though for most it will succeed more as an exceptional acting showcase than as a revealing portrait of the artist as a young man, it’s nonetheless a worthy effort on that basis alone.