“If you can’t have fun, it’s probably not worth doing it,” said Mike Gundy, whose Oklahoma State Cowboys opened at No. 11 in the College Football Playoff rankings. (Tim Warner/Getty Images)

North Carolina Coach Larry Fedora hadn’t actually seen the video, nor was he going to seek it out. But he wasn’t surprised when he heard what his old friend Mike Gundy had gotten up to on a recent Friday night in Stillwater, Okla.

It happened during a homecoming event for Oklahoma State, where Gundy is in the midst of his 13th season coaching the Cowboys’ football program. He took center stage at a pep rally on Oct. 13 and, on a whim, goaded his star quarterback Mason Rudolph into taking his shirt off, then whipped his own off as well. An already rowdy crowd at Gallagher-Iba Arena exploded into an all-out frenzy.

“That’s who Mike is,” said Fedora, who first met Gundy when both worked at Baylor in the 1990s and was his offensive coordinator for his first three years in Stillwater. “I really, truly believe that’s who he is. He likes to have a good time, and when you’re having success and when you’re winning, you can be that way.”

Gundy later deadpanned at a news conference about his wife’s reaction to the stunt: “Kristen said it made her throw up in her mouth a little bit, which I understand. But they enjoyed it . . . If you can’t have fun, it’s probably not worth doing it.”

And so a 50-year-old college football coach has amassed a viral hit rate that might make a YouTube star jealous. The pep-rally video was splashed all over social media — one of Gundy’s sons told him it had been prominently featured on Snapchat, right next to a story about the Kardashians. In 2016, Gundy had his hair cut into a mullet to annoy his son, but it became so popular among fans that it earned him face time on ESPN and led the coach to proclaim this summer that the hairstyle was worth “millions” to his program. It’s arguable that Gundy first became a national commodity as a coach as much for an epic rant at a 2007 news conference — “I’m a man! I’m 40!” — as any victory.

Of course, Gundy wouldn’t have kept his platform if not for victories. His Cowboys (7-1, 4-1 Big 12), ranked 11th in the season’s first College Football Playoff rankings, enter Saturday’s annual Bedlam game against No. 5 Oklahoma (7-1, 4-1) in line for their sixth 10-win season since 2010, in the thick of the Big 12 championship race and on the fringes of the playoff hunt. He has a program-record 111 victories at Oklahoma State against 51 losses.

That sustained success and experience — his current tenure at one program is tied with Ohio’s Frank Solich as the third longest in major college football, after Iowa’s Kirk Ferentz and TCU’s Gary Patterson — allows a coach to be a little loose.

“This is a gladiator, violent sport,” Gundy said Monday, “and I’ve kind of come to the realization that if we can’t have fun while we’re doing it, I’m not so sure that I would want to be a part of it.”

It wasn’t always that way, according to some of his coaching peers. “He wasn’t like [this] at all,” West Virginia Coach Dana Holgorsen said this week of his time as Gundy’s offensive coordinator in 2010. “He was uptight, he didn’t appear to be having a whole lot of fun doing what he was doing.”

Gundy’s first star-making turn, of course, wasn’t a show of irreverence but an outburst of temper. His “I’m a man! I’m 40!” rant after a game in 2007 came in response to a column in the Daily Oklahoman that criticized one of his players.

Fedora remembers that night, Sept. 22, because Gundy didn’t tell his assistant he had gone off in his news conference. Fedora experienced it as every other sports fan across the nation did — by seeing it repeated incessantly on ESPN.

“He lived across the street from me, so I got up, went across the street, banged on the door and said, ‘You could’ve at least told me!’ ” Fedora said. “It was before you could say things were going viral, but it was going viral. And you could see the strength in — I don’t if strength is the right word — but the marketing tool that you had when you made a headline. And he capitalized on that with recruiting, and everything. I think he saw that. Probably at that point, the light went on.”

Gundy believes that letting his personality show is good for his relationship with players, recruits and the media. It has also become Oklahoma State’s best marketing tool.

Gundy’s players chalk his mullet and his antics at the homecoming rally up to his mischievous nature. Members of his coaching staff describe them more as advertising — not to say that Gundy is inauthentic, just that he’s smart.

“It’s almost like you’ve got to really be a jackass out there and make dumb decisions to get written about,” said Glenn Spencer, the Cowboys’ defensive coordinator who has coached under Gundy since 2008, before adding that his boss doesn’t take it quite that far.

“When we don’t get recognized like we should, he’s smart enough to create some things and get us on air, get us reported, because sometimes the national media is going to hang with those top — whatever you call them — blue bloods. Those guys. But we don’t have that tradition that a lot of these programs have, we don’t have the decades of playing for it all . . . what they’ve done is made it so it’s not unusual to see that OSU emblem in the polls now, whereas a decade ago it was rare. Our people would’ve done back flips if we’d have gotten ranked. Now, it’s not good enough. So that means we’re doing something right.”

It extends to the field. The Cowboys’ offense ranks No. 3 in the nation in total yardage and outscores opponents by an average of more than 20 points per game. Quarterback Mason Rudolph ranks No. 1 in the nation in passing yards (2,866) and passing yards per game (358.3); James Washington is the No. 2 wide receiver in the nation, one of just two 1,000-yard receivers through eight games in all of the Bowl Subdivision. That will keep a coach’s spirits high.

Said Holgorsen, whose team was defeated, 50-39 by the visiting Cowboys on Saturday: “What I’ve noticed in really, actually, spending more time with him . . . I’ve seen a much more relaxed Coach Gundy.”

After the wild win in Morgantown, Gundy was fairly sedate in his postgame news conference, focused on all of the mistakes his Cowboys made. But toward the end of his speech, he couldn’t resist.

A reporter posed a hypothetical: “If somebody told you you’d come into Morgantown, have all these turnovers, blocked punt return for a touchdown and come out of here with an 11-point win. . . .”

Gundy responded: “I’d have said they were drinking. Heavy. And I’d have said I wish I was drinking with them. Heavy.”

A public relations assistant chose that moment to end the news conference, and Gundy smiled.

“They always cut me off when I get into left field,” he joked.