Cinedigm Corp. (Nasdaq: CIDM) is buying the entertainment unit of Gaiam Inc. (Nasdaq: GAIA) for $51.5 million.

The business distributes home entertainment brands and content, including DVDs. New York-based Gaiam will retain the health and fitness media business, which makes yoga mats and exercise videos.

Cinedigm, headquartered in Century City, Calif., makes software products for cinemas and distributes content, including documentary films. Cinedigm is also known for helping moving theaters transition from film to digital.

The deal will allow Cinedigm to distribute independent film, television and digital content in the theatrical, home and mobile spaces. The company says the deal will make it the fourth largest non-theatrical DVD and Blu-Ray distributor in the U.S.

In 2012, Cinedigm purchased New Video Group, a distributor of independent films, TV shows and specialty entertainment, based in New York, for $14 million.

The deal will be financed through a new $55 million senior-secured credit facility arranged by Société Générale Corporate that includes a $25 million three year term loan and $30 million revolving credit facility.

Blackstone Advisory Partners LP acted as financial adviser for the deal.