Shia LaBeouf is set to star in 'Nymphomaniac'.

The 'Transformers' actor is in talks to appear in the Lars von Trier-directed erotic drama alongside Charlotte Gainsbourg, though it is not clear what role he would play in the film.

The movie follows the erotic adventures of a woman (Gainsbourg) from her youth to the age of 50, as recounted by her husband, who is played by Stellan Skarsgard.

Nicole Kidman recently revealed she also has a role in the film, and Willem Dafoe has been linked with a part in the movie.

The English-language project - which begins shooting in September - will be split into two parts, with the director planning to release two versions of the films, one more explicit than the other.

German funding body the NRW Filmstiftung is backing 'Nymphomaniac' and the film will be shot in North-Rhine Westphalia, an area of Germany.

'Nymphomaniac' is the latest in a string of independent projects for Shia.

He can next be seen in John Hillcoat's 'Lawless' and also appears in 'The Company You Keep' alongside Robert Redford, who has also directed the film.

Shia recently wrapped production on 'The Necessary Death of Charlie Countryman'.