(Adds detail, shares)
Aug 3 (Reuters) - Viacom Inc, the owner of MTV, Comedy Central and Paramount, posted better-than expected quarterly revenue and profit as higher affiliate revenue offset continued declines in U.S. advertising revenue.
The company's shares were up 2.7 percent at $36.00 in after-hours trading on Thursday.
Viacom's domestic affiliate revenue, the fees it collects from cable TV operators as well as online distributors, rose 4 percent to $1.01 billion.
Analysts had expected a 2.8 percent rise in domestic affiliate revenue, according to financial data and analytics firm FactSet.
New York City-based Viacom, like many of its peers, is struggling to keep viewers watching its channels as they flock to online streaming services such as Netflix Inc and Amazon.com Inc's Prime. With fewer people watching live television, TV ratings and ad revenue have taken a nosedive.
Domestic advertising revenue fell 2 percent in the third quarter, the 12th consecutive quarterly decline, in line with analysts' expectations, according to FactSet.
Viacom said in February that as part of a turnaround plan orchestrated by new Chief Executive Bob Bakish, it is focusing on six of its brands - Paramount, BET, Comedy Central, MTV, Nickelodeon and Nick Jr.
"There remains much work to be done, but we will continue to build on this progress for our shareholders, partners and fans," CEO Bakish said in a statement on Thursday.
Excluding items, the company earned $1.17 per share. Analysts on average had expected to earn $1.05 share, according to Thomson Reuters I/B/E/S.
Net profit attributable to Viacom rose to $683 million, or $1.70 per share, in the third quarter ended June 30 from $432 million, or $1.09 per share, a year earlier.
Revenue rose 8.3 percent to $3.36 billion, beating analysts' expectation of $3.29 billion.
Last month, Viacom tried to buy Scripps Networks Interactive , home of such lifestyle networks as Food Network, HGTV and the Travel Channel, but was outbid by Discovery Communications, which announced on Monday it is buying Scripps for $11.9 billion. (Reporting by Aishwarya Venugopal in Bengaluru and Jessica Toonkel in New York; Editing by Maju Samuel)