Taking the first step toward a possible merger, CBS Corp. and Viacom Inc.'s boards each have formed special committees to evaluate whether a consolidation of the two media companies would benefit shareholders.

CBS' decision, which came Thursday during a board meeting in Studio City, begins a process that could result in the reunification of the companies. Viacom simultaneously announced that its board also had formed "a special committee of independent directors to evaluate a potential combination with CBS Corp."

"The committee has retained independent legal counsel and is retaining independent financial advisors in connection with this evaluation," Viacom said in a statement.

CBS and Viacom, both controlled by the Sumner Redstone family, were one entity until Redstone in 2006 divided his empire into two companies in a bid to generate more wealth. But now, both companies face steep challenges as consumers migrate to streaming services and other entertainment platforms.

In recent years, Viacom has struggled with ratings challenges at key networks and box-office flops, while CBS has been able to boost its value on the strength of its programming. The company has substantially increased revenue through the fees it charges cable and satellite television distributors who want to include CBS in their pay-TV bundle.

Redstone's daughter, Shari Redstone, tried unsuccessfully to combine the companies in 2016. At that time, CBS' board resisted reunification out of concern that Viacom's problems would weigh on CBS. The 2016 merger talks fell apart over issues of control and a proposed valuation of Viacom, according to people familiar with the situation but who were not authorized to speak publicly.

But Viacom has since improved its operations and devised a new business plan. Viacom owns MTV, VH1, BET, Comedy Central, Nickelodeon and the Paramount Pictures movie studio in Los Angeles.

Analysts have been mixed on the benefits of a merger.

"Potential of a recombination of CBS and Viacom would provide CBS with increased scale, more diverse assets, a major studio, while it would bring many of those same benefits to Viacom," Moody's Senior Vice President Neil Begley said in a note. "The most important [benefit] would be to put a surer footing beneath Viacom while it continues to turn around its media networks and Paramount."

However, Marci Ryvicker, a media analyst with Wells Fargo Securities, was skeptical.

"CBS-Viacom? Um, no thanks," Ryvicker wrote in a research note last weekend. "Unfortunately, we are more afraid of the longer term value destruction -- particularly at CBS, which we have historically favored given its clean portfolio of MUST HAVE content."

CBS cautioned that a merger with Viacom was not a given.

"There can be no assurance that this process will result in a transaction or on what terms any transaction may occur," CBS said.

Redstone and her family, through its Massachusetts holding company, National Amusements, control nearly 80% of the voting shares of the two companies. Shari Redstone, daughter of the ailing 94-year-old mogul and vice chairperson of both companies, favors the consolidation.

However, the special committees at Viacom and CBS will be composed of independent shareholders who must weigh whether a transaction would benefit all shareholders.

"National Amusements supports the processes announced by CBS and Viacom to evaluate a combination of the two companies, which we believe has the potential to drive significant, long-term shareholder value," the firm said in a statement.

It's unclear who would run the combined company, if the merger comes together. Although CBS Chief Executive Leslie Moonves has a strong track record managing CBS and restoring the patina of the CBS television network, Redstone might instead favor Bob Bakish, who was tapped to be chief executive of Viacom nearly 14 months ago.

Bakish has spent the last year reorganizing the company. He also changed the management at Paramount and negotiated a hard-fought carriage contract with Charter Communications.

Ryvicker estimated that a merger would bring $390 million in cost savings but she warned that Wall Street has respect for Moonves and his leadership, and forcing his retirement could have costly repercussions. She estimated that CBS' stock could decline "at least 10%" should Moonves exit.

"These are two completely different companies with completely different content strategies," Ryvicker said.

But many think that a CBS and Viacom transaction will happen. Both medium-sized companies are in a rapidly changing business where conglomerates, such as AT&T and the Walt Disney Co., are trying to scoop up media companies to better compete against internet giants Google, Apple, Facebook, Netflix and Amazon.com.

In the last 16 months, AT&T announced its takeover of Time Warner Inc., which owns CNN, TBS, HBO, TNT and the Warner Bros. studio. Last year, Discovery Communications unveiled its consolidation of Scripps Networks Interactive, which owns HGTV, Food Network and the Travel Channel.

And in December, Disney announced a $52.4-billion takeover of much of Rupert Murdoch's 21st Century Fox.

CBS, which owns the CBS television network, TV stations and Showtime, is the stronger of the two companies. Wall Street values CBS at $22.5 billion. Its stock closed up $1.32, or 2.3%, to $58.93 on Thursday.

Viacom, which has a market capitalization of $13.6 billion, has been trying to overcome management missteps, including a lack of investment in television programming, an uneven strategy for online distribution and consistently poor-performing movies. Viacom also blundered by buying back its stock at inflated prices.

Viacom shares closed down 21 cents, or less than 1%, to $33.21 on Thursday.

"In just a few years both CBS and Viacom became relatively small companies in the global content business," Morgan Stanley media analyst Benjamin Swinburne wrote in a note. "Our view is that re-merging CBS/Viacom ... could be a first step towards further consolidation activity, not the last."