Will Ferrell is in talks to play porn producer Russ Meyer in independent movie project “Russ and Roger Go Beyond.”

The film centers on the collaboration between Meyer and Roger Ebert on the 1970 film  “Beyond the Valley of the Dolls,” which Meyer directed from a script he co-wrote with Ebert.

Producers are Mark Amin’s Sobini Films, David Permut through his Permut Presentations and Richard Waltzer.

The script is written by Christopher Cluess, whose credits include “Saturday Night Live” and “The Simpsons.” It explores the relationship between Meyer and Ebert, who was starting out as a Chicago Sun-Times film critic when he agreed to write the script.

Meyer, who died in 2004 at the age of 82, directed a long line of sexploitation films such as “Beneath the Valley of the Ultra-Vixens” and “Faster, Pussycat! Kill! Kill!” Ebert died in April, 2013.

“Beyond the Valley of the Dolls” was released by 20th Century Fox, one of the few studio films to go out with an X rating, and became enormously profitable.

The film was originally intended as a sequel to the 1967 film “Valley of the Dolls” but became a satire instead.

Ferrell is starring in Warner Bros. prison comedy “Get Hard” with Kevin Hart with a March release planned.

News was first reported by Deadline.com.