Cenk Uygur can pinpoint the day he realized that Facebook FB video was going to rewrite his business model. It was April 6, the day his digital-video startup, TYT Network, uploaded a clip to the social network called “Teachers Sent to Jail FOR DECADES.”

The video didn’t strike Uygur as anything special—just a typical example of his network’s progressive news commentary. But by lunchtime, it had racked up 7 million Facebook “impressions,” or people who saw it in their Facebook News Feed. By the time he finished eating, it had added another million. He looked again when he arrived at his Los Angeles office: 9 million, total. And after he taped a show: 15 million. A day later, 18 million people had seen it. The day after that? Twenty-three million.

Looking over the stats, Uygur, who is TYT’s CEO, thought about all the videos his startup shared on the social network. “Oh, my God, these are all going to pop,” he thought. “It’s just a matter of time.” He had a second thought: “Our business is going to double.”

In recent months that kind of “oh, my God” moment has occurred for video creators around the world. News site BuzzFeed’s video views on Facebook grew 80-fold in a year, reaching more than 500 million in April. A series of eight videos by digital-media startup Mic garnered 33 million views in just two months. TYT has watched views grow by 10 times in four months. Dozens of other sites are reporting similar results—great news for them, and even better news for the social networking giant.

Seemingly overnight, video uploading and viewing have exploded on Facebook, where users now watch 4 billion video streams a day, quadruple what they watched a year ago. It’s happening because the social network’s engineers, quietly and with little fanfare, have retooled Facebook’s interface to make video easier than ever to watch and share. In February 2014, only a quarter of all videos posted to Facebook were uploaded directly to the network, while the rest came from YouTube GOOG or other video sites, according to analytics company Socialbakers. By a year later, the ratio had flipped: 70% of Facebook’s videos were uploaded directly.

These may sound like minor technical distinctions, but tiny changes make a huge difference when you’ve got 1.4 billion monthly active users. Facebook and its subsidiary Instagram already account for one out of every five minutes Americans spend on smartphones, and Facebook drives nearly a quarter of all web traffic. The company’s recent video improvements will likely push those numbers even higher. And while the surge will help the social network do even more to entertain bored millennials, there is also big money at stake. Facebook is, after all, in the advertising business. The new video-tech innovations not only encourage its users to spend more time on the site, but they also make it easier for marketers to reach those users.

Facebook has already proved that it’s a quick study in the ad world. Mobile advertising, a meaningless sliver of its business three years ago, made up 73% of its $3.3 billion in advertising revenue in the first quarter of 2015. It’s the main reason Facebook’s total revenue has roughly tripled over that stretch, and it’s the driver of the network’s current $226 billion market cap and gaudy 40% operating profit margins. Video, especially mobile video, could blow up just as dramatically for Facebook, offering a gateway for advertisers to reach digital consumers in the format that most closely resembles television—just as the migration of advertising dollars from television to digital reaches a tipping point. Facebook has become “synonymous with mobile,” Carolyn Everson, Facebook’s vice president of global marketing solutions, said at a recent investor conference. “I think that the next frontier is becoming synonymous with mobile video.”

To reach that frontier, Facebook is plowing resources into its video products at a rate that has executives buzzing at the television networks that are steadily losing ad spending to the Internet, and at the agencies that broker that spending. Above all, the push is raising questions for Google’s YouTube, the big kahuna of online video for the past decade, which for the first time faces a competitor that can match its reach.

Facebook’s mission-driven executives, famous for downplaying any profit motive, argue that the video push is not about money or getting a competitive edge—it’s about giving users what they want and connecting them to the content that matters. Still, “the TV money is coming,” says Richard Raddon, co-CEO of Zefr, a video data company. “Everyone is waking up to the fact that this is war.” Facebook doesn’t speak the language of conflict, but it suddenly looks very well-armed.


Everything is rad in “Awesome Town,” the conference room in which Facebook chief product officer Chris Cox holds his meetings. Adorned with gray mid-century furniture and neon-colored pillows, it is distinctly not an office, I’m told, because nobody at Facebook has an office. With capacity for 2,800 employees, Facebook’s new Frank Gehry–designed headquarters in Menlo Park, Calif., has the world’s largest open-office floor plan. Even CEO Mark Zuckerberg and COO Sheryl Sandberg hold meetings in large glass snow globes bathed in sunlight, visible to passersby, if not approachable.

Chris Cox, Facebook Video
Facebook’s Chris Cox: His team’s video breakthrough was inspired by special effects in Harry Potter movies. Photograph by Brad Wenner for Fortune

Facebook did not make Zuckerberg and Sandberg available for this story. Cox, on the other hand, is excited to talk about video. He’s excited to talk about any Facebook product, really, and about the company’s mission to “make the world more open and connected.” An Atlanta native who speaks with impassioned sincerity, Cox dropped out of a master’s program at Stanford to join Facebook in its very early days as a software engineer and became vice president of product in 2008. Any cynical questions from a business reporter, like “Is Facebook video a play for TV ad dollars?” or “Are you trying to beat YouTube?,” are quickly countered with the Mission: making the world more open and connected. There wasn’t some grand plan to become a video juggernaut, Cox says. It was just an experiment that actually, surprisingly, worked.

In late 2013 a handful of engineers on a “new ideas” team were studying why so few people clicked on videos in News Feed, the main stream of content that Facebook users scroll through. The engineers hypothesized that the video thumbnail images weren’t compelling and that even when they were, people got impatient waiting for videos to load.

Then one day the team remembered the Daily Prophet newspaper from the Harry Potter movies, where images on the printed page magically come to life as the characters read. Cox describes it as an “of course” moment: “News Feed clearly should be alive and move in your hands on smartphones.” So why not automatically play all the videos?

There were internal doubts about video autoplay—few things on the web are as annoying as an unwanted video stream with a loud, distracting soundtrack. Cox’s team assuaged these fears by turning the sound off by default: Facebook autoplays are silent until users choose otherwise. There were also technical challenges to making the preloaded videos work, particularly on phones and tablets and in regions with slow Internet connections. But Facebook threw more engineers at the problem and launched a prototype to a test audience in September 2013.

The result was, in Cox’s words, “completely rad,” and also “awesome.” Views steadily grew as Facebook rolled out the feature more widely. One eye-popping milestone: Last summer the biggest viral video phenomenon of 2014—the ALS Ice Bucket Challenge—happened mostly on Facebook, where 440 million viewers watched Ice Bucket videos a total of 10 billion times. (YouTube announced only 1 billion Ice Bucket views.) By January, Facebook was serving 3 billion video views a day. In April, Facebook hit 4 billion views per day, matching the latest estimates available for 10-year-old YouTube.

Of course, not all views are created equal, as digital-video executives will pointedly tell you. Facebook counts any video that plays for at least three seconds as a view, so its numbers include inattentive drive-bys and “nah, this is boring” changes of mind. YouTube switched its focus in 2012 from number of views to amount of viewing time, which the site says currently totals “hundreds of millions of hours” per day and is growing 50% year over year.

Facebook doesn’t release viewing-time metrics, but there’s anecdotal evidence that users have long attention spans. Complex, a culture-focused media company founded by fashion designer Marc Ecko, reports average completion rates of 78% for its Facebook videos, which last two to 10 minutes. But regardless of how long they’re watching, Facebook’s fast-growing audience is making marketers pay attention. “Everybody thinks of YouTube as the default holding place for video,” says Scott Symonds, managing director of media at digital ad agency AKQA. “Facebook is changing that and fast.”


YouTube’s CEO is onstage rattling off statistics, and the kids won’t stop screaming. The company’s Madison Square Garden ad-sales event is filled with Madison Avenue suits, save for a gaggle of teenage superfans in the front section who respond to everything Susan Wojcicki says with a spirited chorus of “Woooooo!”

The event is part of the annual NewFronts, designed to dazzle advertisers into spending some of the budgets earmarked for television commercials on digital video instead. Dazzle and scare them: In an ominous speech, YouTube star John Green, known for his Vlogbrothers channel, warns the suits that they risk losing relevance with an entire generation if they advertise only on TV. The teens dutifully Woooooo! The suits chew sriracha popcorn and nod.

Susan Wojcicki, YouTube, Brandcast
YouTube’s CEO Susan Wojcicki at the company’s NewFront event for advertisers in April. Facebook’s video audience now rivals YouTube’s for the first time. Photograph by Stephen Lovekin—FilmMagic/Getty Images

YouTube has been making a version of this pitch for most of its existence. But the company’s 2015 NewFront contained a much subtler dig at a new competitor. Across two hours of PowerPoints and performances, the name Facebook was never mentioned, but the network’s presence was clear to anyone paying close attention. Comedian Grace Helbig highlighted the active engagement of her YouTube fans. “They’re not just passively seeing it as they scroll by,” she said. (You know, like on Facebook.) Green touted the power of YouTube’s fans while dissing the shrinking “eyeballs” business of easily ignored display ads. (You know, like on Facebook.)

Similar themes surfaced on YouTube parent company Google’s earnings call, just before the NewFronts. Google chief business officer Omid Kordestani noted that YouTube is a video destination, and therefore a YouTube session is a great time to show video ads to viewers: “Not when they are distracted by something else.” (You know, like on Facebook.)

Before this year, YouTube had little competition for videos from the Internet’s homegrown stars. When Steven Kydd launched Tastemade, his food-focused video network, in 2013, YouTube was essentially the only place to publish. “It was a one-horse town,” he says. Now distribution platforms from Facebook to Apple TV, Amazon Prime Instant Video, Snapchat, Vessel, Spotify, and Roku all want original video content. Some are offering creators like Tastemade a better deal than YouTube’s revenue-share model, in which Google gets a whopping 45% of the money their videos generate. “It’s a good time to be in the content business,” Kydd says with a wry smile.

In the one-horse-town days, when creators complained about the revenue split, YouTube had a one-word answer: “Scale.” As the only video platform with a billion-person audience, YouTube had the power to dictate terms. But lately, in a bid to outflank the new competition, YouTube has been rushing to lock its creators into long-term contracts, offering cash bonuses in exchange for exclusivity deals, according to the Wall Street Journal. (A Google spokesperson declined to comment on the report but said, “We’ve always invested in creators and their success.”)

Facebook hasn’t yet offered Internet stars a way to make money. So far, its sales pitch is simply, “Access our massive audience.” That pitch has already persuaded many traditional media brands to distribute more content via Facebook (including, full disclosure, Fortune, which recently launched a video interview series that Facebook hosted at its headquarters). That’s how Facebook persuaded Michelle Phan, famous for her makeup demonstrations and her 7.7 million YouTube subscribers, to post sneak-preview videos of her book to her Facebook page. It’s why Uygur’s TYT Network, which has more than 2 million YouTube subscribers, created a new show called Final Judgment specifically for Facebook. TYT isn’t making money on that content yet, but Uygur isn’t worried. “We believe in building the audience first, and the monetization comes after,” he says.


2014 COMPANY PROFILE
Rank in Fortune 500: 242
Revenues: $12.5 billion
Profits: $2.9 billion
Employees: 9,199
Total Return to Shareholders
(Since IPO, Annual Rate*):
31.3%

*May 18, 2012 to Dec. 31, 2014.


The audience growth Facebook offers is clear. Creators have already noticed that Facebook’s algorithm—the secret formula determining which content shows up in a person’s News Feed—seems to heavily favor video. For creators with more than a million Facebook fans, photo posts reach 14% of their audience on average, and text-only updates reach just 4%, according to one manager of content creators. But video posts? They reach 35%. In March, Facebook launched a tool that lets videomakers expand their audience even further: an embeddable player that allows Facebook videos to be published elsewhere on the web, just as YouTube’s player does.

If YouTube stars expand to Facebook or Vine or Vessel, it doesn’t mean they’ll abandon YouTube. It’s not either-or, but everywhere-all-the-time. Suzie Reider, head of advertising sales at YouTube, dismisses the idea of these platforms being a true competitive threat. “Users know [and] the creators know that YouTube’s heart and soul has been video from the beginning and will be video until the end,” she says.


The Youtube pitch party was one of 33 NewFront events in April, thrown by everyone from Hulu and Yahoo to the New York Times and Condé Nast. Facebook, conspicuously, did not throw one. Instead, one week prior to the NewFront noise, the company invited a few hundred executives from ad agencies and Fortune 500 brands to the cafeteria of its New York City office on Astor Place. There, Facebook executives Adam Berger and Keenan Pridmore unveiled Anthology, the company’s program to bring in more video ads.

Facebook doesn’t make content, but with Anthology, it acts as matchmaker between brands and companies that do—video creators like Vice Media, Tastemade, and the Onion. Let’s say you’re CEO of a sriracha popcorn business and you want to run video ads on Facebook. But because your company’s core business is making popcorn, you don’t have any videos to publish. With Anthology, you can pay to have someone like Vice make one for you. The cost starts at $2 million for a customized campaign and distribution, according to people in attendance at the Astor Place event.

Even though it was explicitly pitched to them, ad agencies—the ones who normally connect brands and “creatives”—worry that Anthology will give Facebook one more way to work around them. They’ve been getting used to that feeling. Facebook already likes to pitch directly to brands, dazzling them into spending more money on Facebook than their agencies might recommend. “Facebook is a bit of a frenemy to agencies,” says Tony Effik, vice president of media and connections for ad agency R/GA. But it’s a necessary frenemy; Effik praises Facebook’s ability to target very specific demographics with video ad campaigns. One agency executive grumbles about Facebook’s aggressiveness, while admitting, with a sigh, that its execution has been flawless. “I own Facebook stock,” he says. Everson, the Facebook marketing VP, says there’s no intention of eliminating the middlemen, telling Fortune, “We cannot do our jobs without our agency partners.”

Facebook is proceeding with caution in deploying its new generation of ads. Video autoplay was a magical surprising win, but advertisements are almost never a magical surprising win. Web audiences, particularly millennials and teens, are allergic to being sold to. As Shane Smith, CEO of Vice Media, likes to say, they have “the most sophisticated bullshit detectors in history.” Quality of content, not quantity of spending, is the key to reaching this audience, adds Steve Ellis, CEO of WhoSay, a platform that connects celebrities with brands. That’s why Facebook is asking media companies to make the ads—the better to bypass those detectors.

A slow start to the ad strategy hasn’t stopped analysts from obsessing over it. According to eMarketer, Facebook already owns a quarter of the mobile-ad market. Video is the next logical extension. On the company’s quarterly earnings call in April, no other topic drew more questions from analysts. “Mobile-video advertising is the Facebook story for 2015 to drive growth,” says Richard Greenfield, a media and tech analyst at BTIG.

There’s no question that the opportunity is massive. The average American now spends more time using a mobile device than watching television. Forrester expects digital advertising, a $57 billion business in 2014, to overtake TV’s $85 billion next year. Omnicom Media Group OMC , an ad agency holding company that oversees $55 billion in global ad spending, has advised some clients to move between 10% and 25% of their TV budgets to online video. Food giant Mondelez International MDLZ and insurer Allstate ALL (neither of them Omnicom clients) are among the big advertisers that have announced such moves.

Facebook doesn’t have this field to itself, of course. The very full bucket of TV ad dollars is too great a prize for any web platform to pass up. Messaging app Snapchat, a Facebook rival, is ramping up sales of video ads for its new Discover platform. Same goes for Twitter, which owns two hot video properties, Vine and Periscope. Spotify recently added video-streaming capabilities to its music-streaming app, partnering with just about every big name in digital-video content. Hulu, Yahoo YHOO , and Verizon-backed AOL AOL are doubling down on their video strategies. By this time next year, any one of them might have conjured up a 4-billion-view-a-day video product themselves.

Fidji Simo, Facebook Video
Facebook’s Fidji Simo: Video ads can have “all the reach you care about in a targeted way.” Courtesy of Facebook

Facebook has one huge advantage: data. No other media outlet knows the full name, hometown, marital status, exercise habits, political opinions, and favorite movies, musicians, cars, retailers, restaurants, airlines, and electronics brands of hundreds of millions of people. This enables the site to deliver the targeted audiences brands crave. Lexus, for example, created 1,000 versions of the same video ad to target 1,000 different types of customers on Facebook—so a “male Lexus enthusiast who appreciates technology” saw a different spot than “a female, who lives in Chicago, and enjoys travel.” Advertisers “are realizing that video doesn’t need to be this, like, super-blast thing. You can have all of the reach you care about in a targeted way,” says Fidji Simo, Facebook’s director of media products.

But Facebook’s biggest advantage over YouTube and other video providers may turn out to be boredom. “Video is watched when people are bored,” says Benjamin Ling, a venture capitalist who has worked at Google, YouTube, and Facebook. “Facebook is particularly good at curing boredom.” Where YouTube, owned by a search giant, makes it easy for people to find videos they’re looking for, Facebook can show people stuff they didn’t even know they wanted to see. And with almost a billion people logging on every day, the audience is there now. “We are already a destination for everything,” says Simo, “and video is a part of that.”

A version of this article appears in the June 15, 2015 issue of Fortune magazine with the headline ‘Facebook’s Video Invasion.’