DirecTV and Viacom may have quarreled bitterly over the costs of a new contract this month, but they agree on at least one thing: the preservation of television as they know it, provided only to paying subscribers.

After a marathon negotiating session Thursday, the two companies announced early Friday that they had reached an agreement to end a nine-day blackout of Nickelodeon, MTV, Comedy Central and other cable channels in DirecTV homes.

Under the deal, Viacom-owned shows like “Jersey Shore” will become more accessible via the Internet for DirecTV subscribers, through a sign-in system sometimes called “TV Everywhere.” But free access to people who don’t subscribe to DirecTV or another similar distributor is likely to become more restrictive, thereby fortifying the existing model of TV distribution.