Comcast (CMCSA) - Get Report, which defied recent industry trends in the past two quarters by adding video subscribers, lost 4,000 TV customers in its second quarter but still beat Wall Street's earnings consensus Wednesday by adding more high-speed data and voice customers than it did a year ago.

The news helped boost its stock by 0.5% in early trading to $67.53 a share.

The nation's largest cable TV operator said its earnings fell by 1.2% in its second quarter, to 83 cents a share, but still topping Wall Street analyst estimates of 81 cents a share. The company recorded $19.3 billion in revenue, a 2.8% increase, and ahead of the Street's $19 billion consensus.

Comcast also said it would pay a quarterly dividend of 27.5 cents a share, in line with previous quarters.

Despite losses in the closely watched metric of video subscribers, Comcast said its traditionally slow second quarter was its best performance in the quarter in the past 10 years. Cable and satellite companies have been losing subscribers in recent years as more consumers cut the cord and watch video over online services such as Netflix (NFLX) - Get Report and Amazon's (AMZN) - Get Report Prime video service.

After adding subscribers in the prior two quarters, the company serves nearly 22.4 subscribers, 90,000 more than a year ago. Overall, the company said has nearly 28.1 million customer "relationships," adding 220,000 new high-speed customers and 64,000 additional customers who take voice services over its cable system.

The cable operator has fought the trend in subscriber losses in recent quarters by beefing up its video offerings on its X1 set-top box platform, which it has said reduces churn, or those customers who end their subscriptions. About 40% of its customers get the X1 service, the company said.

In early July, Comcast said it had reached agreement with Netflix to allow the popular Web streaming service to be offered to Comcast's video subscribers on its X1 platform.

"Literally they've got better technology than anyone else," said Jim Cramer, TheStreet's founder and manager of the Action Alerts PLUS portfolio, which owns Comcast.

Cramer predicted that Comcast's upcoming theme park would be big news, citing it as a reason for its agreement to purchase Dreamworks Animation (DWA) earlier this year.

"There's a lot of irons in the fire," Cramer said. "That's why it remains a very big holding for Action Alerts, and I just wish it would come in so we can buy more."

Operating earnings from Comcast's cable TV unit increased by 5.7%, to $5 billion in the quarter, on the strength of the added customers and rate hikes that offset a 7.4% hike in content costs largely associated with its sports contracts, the company said.

"Yes, the pay-TV industry is shrinking. And, yes, broadband is approaching saturation, but Comcast has decided not to attend the pity party," wrote MoffettNathanson analyst Craig Moffett, who has a buy recommendation on Comcast. "Comcast's cable video business is growing, thank you very much, and its broadband growth is accelerating."

Comcast's one weak spot was its NBCUniversal unit, where revenue declined by 1.8% thanks to the performance by its film studio, which failed to match last year's more robust slate that included Furious 7 and Jurassic World. The studio, whose movies in the current quarter included The Boss and The Huntsman: Winters War, generated operating cash flow of $56 million, an 86.7% decline, and revenue was off 40.4%.

NBCUniversal's overall revenue decreased by 1.8%, to $7.1 billion, and operating cash flow remained stable at $1.7 billion, as growth by its NBC network, cable channels and Universal theme park operations offset the studio decline. The theme parks benefited from Comcast's September acquisition of a majority stake in the Universal Studios theme park from owners that included Goldman Sachs (GS) - Get Report . Theme park revenue increased by 47% to $1.1 billion for the quarter, with operating cash flow hiked by 40.5% to $469 million.

This article is commentary by an independent contributor. At the time of publication, the author held a position in Comcast.