The current contract between the two media powerhouses was due to expire at the end of the year. However, the talks went smoothly and neither side felt the need to go public with negotiations and run ads attacking each other. That scenario has often played out for consumers.
"We're pleased to have reached agreement in advance of our deadline," said Melinda Witmer, Time Warner Cable's executive vice president and chief video and content officer.
Under the terms of the deal, Time Warner Cable also agreed to offer Epix, the pay-TV movie channel that Viacom co-owns, to its subscribers. Epix carries movies from Viacom's Paramount Pictures.
Time Warner Cable has more than 12 million subscribers in the U.S. and is the largest pay-TV provider in New York City and Los Angeles. It also recently completed a distribution agreement with Tribune Co., owner of local TV stations around the country including KTLA-TV in Los Angeles. Tribune is the parent company of the Los Angeles Times.
Follow Joe Flint on Twitter @JBFlint.