Amazon.com Inc., looking for ways to offer more films on its streaming service, has held discussions with at least two major Hollywood studios about options that could include cofinancing movies in exchange for certain online rights, according to people familiar with the matter.

The company held exploratory talks with executives at Sony Corp.’s studio division and Viacom Inc.’s Paramount Pictures, said the people, who asked not to be identified because the discussions are at an early stage. The options included development funds, as well as money for film production.

Obtaining more movies from the studios would help Amazon attract viewers to its streaming service, which trails Netflix Inc. in popularity. The online retailer will spend more than $5 billion on video programming this year, according to Bloomberg Intelligence.

Sony, in fifth place at the box office this year, releases the “Spider-Man” movies and has had successes with the animated films “Peter Rabbit” and “Hotel Transylvania 3: Summer Vacation.” Paramount, last among the major studios in market share, has had two major hits: “A Quiet Place” and “Mission: Impossible — Fallout.”

It’s not clear what rights Amazon could obtain. The premium cable network Starz, owned by Lions Gate Entertainment Corp., has a contract to show Sony films for years after they leave theaters in a deal that runs through at least 2021, while the cable channel Epix, owned by MGM Holdings, has a similar accord for Paramount movies.

Working relationship

Amazon and Sony have worked together before. For both “Jumanji: Welcome to the Jungle” and more recently “Hotel Transylvania 3,” Sony allowed Amazon Prime customers to see the movies in theaters before their nationwide release.

Amazon is in the middle of rebooting its Los Angeles studio, which has produced a number of critically acclaimed projects but few blockbusters. Deals with other producers offer a way to increase the volume of high-end movies the service can offer. The Seattle company hired NBC executive Jennifer Salke in February to lead Amazon Studios.

Netflix scored a coup when it secured rights to Walt ­Disney films like “Avengers: Infinity War” and “Star Wars.” But Disney now views Netflix as a threat and is launching its own streaming services. It has said it won’t renew that deal when their contract expires at the end of the year.

Money from Amazon would help Sony and Paramount reduce the financial risks associated with moviemaking. While some studios don’t take co-financiers, Sony and Paramount do, and last year both had deals end or fall through. Sony’s deal with LStar Capital was ended and possible funding for Paramount from Chinese investors failed to materialize.

Outside funding in Hollywood has become more scarce, with the pullback by Chinese investors and the exit of longtime financiers, including now Treasury Secretary Steven Mnuchin and billionaire James Packer.

Both studios have produced TV shows for Amazon.