The screenwriting credits for "Sex Tape" imply that Kate Angelo wrote the initial drafts and that Jason Segel and Nicholas Stoller came in to bat clean-up once Segel was on the film as an actor. I'm not sure that's exactly how it went down, but it would explain the occasional lurch from tone to tone that is part of what keeps "Sex Tape" from working completely.

As set-ups for farce go, "Sex Tape" has a perfectly functional one. Jay (Segel) and Annie (Cameron Diaz) have been married long enough that they're finding their sex lives have bottomed out completely. It's a very real challenge that parents and other married couples face, especially after you have several children in the house. Jay works in the music industry and Annie writes a popular mommy blog which she may be able to sell to a much larger company. I liked that they didn't try to paint the marriage as terrible at the start of the film. There's still plenty of love and respect between Jay and Annie. We see their history as Annie writes about it, and it's fun. It's a little disconcerting to see Segel and Diaz playing college age, but you roll with it because it's just a short bit of the opening.

In an attempt to rekindle their relationship, the two of them spend an entire evening with the kids sleeping over at Grandma's house so they can reconnect sexually. Again… there are some choices made in these scenes that strike me as very honest. It's not just like flipping a switch for them. They try, but they can't just jump right back in because they've forgotten how to turn off the rest of the world so they can just get lost in each other. Annie's the one who suggests filming themselves having sex, and she even comes up with a framework for them to shoot.

So far, so good. What's weird is how I feel like this movie is so deeply dated because of the way things unfold. It is tied to a particular moment in consumer electronics, but that's the only way the premise works at all. Jay accidentally syncs his iPad to all the iPads he's given out as gifts over the years (they make sense of that in the movie, but it's still a labored idea), and he and Annie spend one long night trying to keep anyone from seeing the footage.

And here's where it starts to run into trouble, because the film wants to be wild and dark and crazy, but it's also a big studio summer movie, and so it feels like it flirts with truly insane material, but without ever really committing to it. It means the film feels like it sort of struggles to find its footing in terms of tone, and I'm not sure it can. By this time, Segel and Stoller are good enough as writers to be able to try to bring real emotion to the table when writing characters in movies like this, and Jake Kasdan has always struck me as a filmmaker who loves making comedies, but who also believes in digging just that little bit deeper. I'll say this… the film is genuinely dirty, and that's to its advantage. I wish we could be more frank in terms of language and topic in discussing sexuality on film, because there's so much value to being open about that stuff. It's still the thing that we seem to have the most trouble getting right in movies, which is crazy, since sex is such a fundamental part of the fabric of daily life.

Rob Corddry and Ellie Kemper play their best married couple friends, Robby and Tess, and when I complained in my review of "Tammy" about how there's basically no writing for the supporting characters, it was because they simply didn't make room for the good actors they hired to do anything. Here, Corddry and Kemper get to try for their own laughs, and Rob Lowe comes in playing the guy who runs the company that might buy Annie's blog, and he gets one big sequence where he really gets to swing for the fences. Even with this many talented people, along with Segel and Diaz both doing everything they can, I feel like the movie never really gets going the right way. If farce doesn't feel nimble, it can be deadly. It's one of the hardest things to get right. "Sex Tape" tries hard to impart a sense of urgency, and when it stops occasionally to try to create a very real human moment between Jay and Annie, it only serves to feel more calculated.

In terms of production value, it's a good-looking movie, and Kasdan keeps it moving. It's just over 90 minutes, and it flies by. I think the last ten minutes or so almost manage to get the film back on track, but by that point, it's run almost completely out of gas. It's a shame. Everything was in place for this one to work, and the cast couldn't possibly be more game. Just goes to show that even the most talented group can sometimes fail to figure out how to make something work.

"Sex Tape" opens everywhere on Friday.