City by the Sea is like something you happen to stumble across on late-night television, and it's earnest and square and a little nondescript, but your thumb never quite hits the zap button, and slowly, almost in spite of yourself, you realize that you've been drawn in, hooked by the urgency of a heartfelt mediocre movie. Or maybe it's just the performers that get you.
I felt myself lured into ''City by the Sea'' the moment that James Franco, with scuzzy clothes, a lopsided scowl, and an electric shock of hair that makes him look like the Bob Dylan of 1965 crossed with a gangly, desiccated Johnny Depp, came into view on a dilapidated Long Island boardwalk, trying to hawk a beat-up guitar for $20 so that he could score some dope. There have been a million sideshow junkies in the movies, but Franco, who starred in TNT's ''James Dean'' and gave what is perhaps the single greatest performance I have ever seen in a TV biopic (miraculously, he was able to match Dean's intensity), speaks here with the soft, barely articulate wail of a wounded young boy, and he turns his face into a road map of desolation. He's never less than transfixing.
In ''City by the Sea,'' Franco's ravagement is matched by the decay of his surroundings -- the oceanside town of Long Beach, N.Y., which is portrayed in the movie as a bombed-out wasteland of a suburban resort, full of grimy coffee shops and porn parlors, thugs and losers, and windowless, abandoned warehouses and apartment buildings under lowering gray skies. You might call it squalid, except that there's hardly enough life on hand to fuel more than a token neon glimmer of decadence. The director, Michael Caton-Jones (''This Boy's Life''), shoots this empty shell of a landscape in what might be described as '70s-new-realism style, employing telephoto long shots that invite us to view the characters as visual aspects of their environment. As Franco's wormy man-child lurches his way across the screen, stabbing a drug dealer dead in a disastrous act of self-defense, you have very little idea of who this weirdly innocent killer is, but you know that you want to keep watching him.
You also want to watch Robert De Niro. He has played more than his share of anonymously weary, middle-aged urban cops, but if De Niro walked through his roles in ''15 Minutes'' and ''Showtime,'' in ''City by the Sea'' it's the character who's desperate and beleaguered, not the performance. De Niro's Vincent LaMarca has a blobbyish physique and a very square haircut that's a little too long, mostly because it looks like Vincent is too lazy to keep it trim. He lives in a ratty fourth-floor walk-up, and more nights than not, he moseys downstairs to canoodle with his neighbor, Michelle (Frances McDormand), who's sort of his girlfriend except that he keeps her -- along with the rest of the world -- at arm's length. There are, you see, Scandalous Incidents in Vincent's past; he would just as soon not talk to anyone about them. The principal one involves Franco's Joey, who is now officially wanted for murder. Joey is a trashed human being, but he happens to be Vincent's son, abandoned years before by a father who didn't believe in himself.
A cop who rediscovers his estranged child on the wrong side of the law -- it sounds like the most movieish of situations. But ''City by the Sea'' is, in fact, based on actual events (it was adapted from a 1997 Mike McAlary Esquire article), and the best thing about the film is that it refuses to either hype or shun its ironies. As De Niro and Franco circle toward each other, full of sadness and bile, they pick open their old wounds, and the movie turns into a policier version of an Arthur Miller father-son truthfest, which is at once corny, a little schematic, and just honest enough to work. De Niro plays Vincent with an insecurity, a deep-down squirmy shame, that we're not used to seeing from this actor in dramatic roles. It's one of his gentlest, most quietly affecting performances.
''City by the Sea'' has combustible moments that wake you right up, like the ones featuring William Forsythe as a pirate-haired drug dealer who coasts on self-satisfied macho, and it has elements that tilt toward the maudlin. (Integral as it is, I could have lived without the baby.) It also has the kind of what-the-hell poetic title and indifferent marketing campaign that inevitably accompanies movies that open during the week that kids go back to school. I wonder, however, whether the film's commercial prospects aren't doomed by its best qualities as well. ''City by the Sea'' moves along with a quietude, a scruffy direct plainness that has long gone out of style. At least, it has on the big screen.