James Franco playing openly gay beat generation poet Allen Ginsberg in Howl will open Outfest, Los Angeles' gay film festival, on Thursday.

While Ginsberg is best known as the quintessential beat generation poet, he was also a pioneering gay rights advocate. Ginsberg often discussed being gay and advocated for the freedoms of sexual minorities. He went so far as to list his lover, the poet Peter Orlovsky, as his spouse in his Who's Who entry. Orlovsky is played by Aaron Tveit in the movie.

Howl, however, is not a love story, but a look at Ginsberg's most famous poem, Howl. The poem, published in 1955 by City Lights, a San Francisco-based bookstore, became the subject of a landmark obscenity trial that tested the boundaries of the First Amendment.

Last year, Franco played Harvey Milk's gay lover, Scott Smith, in the feature film Milk. The highly-acclaimed movie about the San Francisco politician murdered on the steps of City Hall was directed by Gus Van Sant. Van Sant executive produced Howl.

As a film director, Franco has produced two gay-themed shorts.

Franco's The Feast of Stephen won a Teddy award at the Berlin Film Festival where it premiered. Feast features a young gay man whose daydream of naked boys playing basketball turns violent when the boys chase him down. Another short, The Clerk's Tale, premiered at France's Cannes Film Festival. In the film, a gay man is haunted by the monotony of working at a high-end menswear store. Both shorts are based on poems.

“I want to be an artist and I want to be crazy,” Franco told UK paper The Independent.

He said he doesn't care much if the gay roles he's played and the gay characters he's portrayed in his films lead people to believe he's gay.

“The worst downside, and I don't consider this a downside, the worst thing that anybody could say is that I was gay and if somebody said that I guess they would be wrong,” Franco said.

The 32-year-old Franco, who is expected to reprise his role of artist Franco on ABC's General Hospital later this year, added that he'll take on “100 gay roles.”

“I would be happy to play 100 gay roles as long as they were always good parts,” he said.

Franco has been dating actress Anha O'Reilly for several years.

Outfest opens Thursday and runs for ten days. Festival organizers will also honor actress Jane Lynch for her LGBT advocacy.