Even after surviving the collapse of CD sales, pirating, casual copying and the rapid decline of song downloads, music remains a tough business.

Yes, Pandora Music (P) is expected to launch an on-demand streaming service later this year that it projects will grow into a $1.3 billion business by 2020. And yes, its Internet radio platform boasts 78 million users who listen to its free ad-supported platform for an average of 24 hours a month, an audience that represents a 10% of all radio listening. 

Yet as Pandora CFO Mike Herring was quick to tell investors on a conference call last week, 65% to 70% of subscription sales from its on-demand service will go to pay royalties to songwriters and artists. And while royalties take a smaller cut of revenues from Pandora's free ad-supported platform, its still a substantial payment. Of course, the music industry still isn't satisfied with the arrangement. 

Against this backdrop, Oakland, Calif.-based Pandora reported a loss of $76 million for the June quarter on sales of $343 million. In its 10 year history, Pandora has flirted with profitability, but for only a quarter or two at a time. 

Spotify, the global music streaming leader, contends with these same maddening economics.

The bulk of its sales from 40 million subscribers to its $9.99 on-demand platform also goes to music labels, artists and songwriters. So, even though Spotify holds a commanding lead over Apple's  (AAPL) - Get Apple Inc. (AAPL) Report  Apple Music (17 million paid subscribers) and Pandora (4 million paid), it too has failed to turn a profit despite generating more than $2.18 billion in sales in 2015 (and a net loss of $194 million) with forecasts of $3 billion for this year.

"The rate structure is very challenging for anybody," said Paul Verna, a senior analyst at eMarketer. "For Pandora and Spotify, they don't have a Plan B. They are completely invested in streaming music, so they have to make it a sustainable and standalone business, because that's basically what they do."

Pandora and Spotify say they'll soon reach profitability despite lacking the built-in distribution networks and deeper pockets of Apple, Alphabet's (GOOGL) - Get Alphabet Inc. Class A Report YouTube, Microsoft (MSFT) - Get Microsoft Corporation (MSFT) Report  and Amazon (AMZN) - Get Amazon.com, Inc. Report , the world's most dominant tech companies that have also staked a claim to music streaming, the one part of the business that could turn around years of declining sales.

To move from red to black, Pandora and Spotify are looking to expand their music-related offerings by adding services like concert ticketing, original video and data collection about listener behavior to assist artists, record companies and advertisers. To decipher all the data, Pandora bought Next Big Sound in 2015 after Spotify had acquired Echo Next a year earlier.

"There's always going to be a certain amount of risk for pure plays in the age of platform dominance," said Max Wolff, partner at Manhattan Venture Partners, a merchant bank focused on technology investments. "They have to become the Google of serving up music -- these guys need to differentiate themselves."

That's why Pandora in October paid $450 million in stock and cash for the San Francisco-based concert ticketing company Ticketfly, which handles transactions for some 1,200 venues and event promotions in North America. Pandora's much-anticipated on-demand music service will overlay lots of Ticketfly features to enable users to buy admission to concerts of their choosing, CEO Tim Westergren said last week on an investor conference call.

Apple and Alphabet are holdings in Jim Cramer'sAction Alerts PLUS Charitable Trust Portfolio. Want to be alerted before Cramer buys or sells AAPL or GOOGL? Learn more now.

TheStreet Recommends

Spotify doesn't own a ticketing service but its Release Radar and Discover Weekly features inform users about shows in their area while offering new music they might like. Pandora, especially, pushes new music from independent labels which generally offer licensing deals lower than those negotiated by the Big Three labels: Warner Music, Universal Music Group and Sony's (SNE) - Get SONY GROUP CORPORATION SPONSORED ADR Report Sony Music.

"They want to teach you to like things that they don't have to pay 70% on," Wolff added.

As of last week, Pandora had signed new licensing deals with the major labels and the Merlin Network, which represents some 20,000 independent labels. Spotify, meanwhile, is in-between contracts. Its deals with the Big Three have reportedly lapsed. Spotify is trying to negotiate more favorable contracts before it confirms months of speculation that it plans to hold a public stock offering in late-2017.

Spotify's financing pressures, though, aren't felt in quite the same way at Apple, Microsoft or Amazon, which is making music an increasingly attractive part of Prime, its wildly successful customer retention program estimated to have 63 million members. Music has become an attractive feature of Amazon's voice-activated Bluetooth speaker, the Echo, which the company hopes to sell as many as 10 million in 2017, making it a $1 billion a year hardware business, according to The Information

For Amazon, a company with annual 2016 sales forecast to hit $137 billion, royalty fees to stream music are little more than a rounding error. Yet Spotify and Pandora bet that their relationships with music labels and artists will transcend anything the tech companies are doing. Warner, Universal and Sony also own a roughly combined 15% stake in Spotify.

"Apple, Google and Amazon probably have the marketing and distribution capabilities but they aren't a location for all things music, and they don't have the content relationships that Pandora has harvested over the last 10 years," Macquarie media analyst Amy Yong said. "User engagement continues to grow."

And growth means scale. It's not hard to imagine that the number of paid monthly global subscribers to a music streaming service will soon top 100 million. And while some musicians will always make more money than others, a very large subscription streaming could eventually make artists, songwriters and producers less wistful of the early days of compact discs.

"People are trying all sorts of business models to see what sticks," said Andrew Sparkler, an attorney with Downtown Music Publishing, a rights management company. "There's incentive for the services to get away from that statutory rates, and there's incentive for the labels and publishers to get away from it as well. The services would want more bells and whistles, and maybe that's lyrics, maybe that's video -- maybe that's a lot of things."

For Spotify, that means more video and original content.

After hiring former Netflix (NFLX) - Get Netflix, Inc. (NFLX) Report finance chief Barry McCarthy in 2015 to be its CFO, Spotify has been producing video content, shows built around music and pop culture. Spotify could also sell more advertising. It's free service is arguably under-ad penetrated compared to Pandora which gets more than 80% of its revenue through advertising. 

As for Pandora, Macquarie's Yong says the company is likely to reach profitability next year though its finances will become noticeably stronger in 2108. "As they grow subscriptions they can layer that on with Ticektfly and all the things they're doing in the car and also international," Yong says. "Profitability is definitely doable."

The rise of Spotify and Pandora begs the question as to what are musicians getting from record companies. It's not hard to imagine a platform like Spotify or Pandora, which are focused solely on music, usurping many of the functions of a music label: distributing their songs, paying artists and songwriters, publicizing concerts and selling tickets.

"They could eventually disintermediate some of that, or a lot of that," Wolff said. "Actually, its already happening."