See more of the story

For “Queen & Slim,” screenwriter Lena Waithe’s meditation on race relations and police brutality, director Melina Matsoukas drew visual inspiration from sources as diverse as Alfonso Cuaron’s 2001 dramedy “Y Tu Mama Tambien” and Spike Lee’s 1989 classic “Do the Right Thing.” But the biggest influence came from YouTube.

“One of the key references for me has been real life, authentic struggles in the black community,” said Matsoukas, who makes her feature debut with the movie, in theaters on Thanksgiving. “I watched a lot of YouTube videos of black people being pulled over by the police or encountering law enforcement and it not necessarily ending well. Unfortunately, there are so many of those videos, but they were a major influence in how I wanted to approach shooting the opening scene.”

Starring Daniel Kaluuya and newcomer Jodie Turner-Smith, our protagonists (known simply as Slim and Queen until the end) are forced on the run within the first 10 minutes of the movie. “A Million Little Pieces” author James Frey pitched the idea for the opening to Waithe at a party.

“He was like, ‘Yo, I have this idea for a movie that I can’t write,’ ” she remembered. “And I was like ‘What’s that?’ ”

Frey described a scenario in which a black couple driving home from a first date are pulled over by a cop and forced to kill him in self-defense. “I was like, ‘You’re right, you shouldn’t write that,’ ” Waithe said. “But then we exchanged information. I think he thought he was never going to hear from or see me again, but it just stayed with me.”

She began drafting the story while working on a TV project, partly in protest of the way she said she was undermined by the series’ executives. “I was sort of dismissed and told, ‘You’re no longer needed, we’ll take it from here,’ ” Waithe said. “And during the course of my time on that show while my hands were tied, I wrote ‘Queen & Slim,’ so it’s really a sweet victory to me.”

Matsoukas and Waithe first worked together on the “Thanksgiving” episode of “Master of None,” for which Waithe shared an Emmy for comedy writing.

“It was everything I had been looking for for my first feature,” Matsoukas said. “It was provocative, it was political, it was an opportunity, I felt, to move the culture forward.

“I don’t like my relationships with people to dictate the material that I work on. But it was just good. It was a good, entertaining script that I could not put down.”

After Kaluuya broke out with “Get Out” and continued to steal scenes in “Black Panther” and “Widows,” it’s hard to imagine the actor not being shortlisted for the role. And when Matsoukas got the script, he was tentatively attached — much to her chagrin. “He had spoken to Lena and read the script before I had a chance to, and he really wanted to play Slim,” she said. “She wouldn’t give him the role before making sure that that was a choice I wanted to make, and it wasn’t. I did not want Daniel to play Slim at first.”

Still, she decided to sit down with the Oscar-nominated actor to get his sense of the character. “I only knew of him from ‘Get Out,’ and the person he plays in ‘Get Out’ is not Slim,” Matsoukas said. “I agreed to meet with him because of Lena, and what should’ve been a very quick coffee turned into an extremely long conversation and hopefully a lifelong friendship and working relationship.”

After finding their Slim, the pair also relished the chance to break a new voice by casting Turner-Smith as Queen.

“It’s an opportunity we obviously don’t get a lot and we really wanted somebody that was fresh and new,” Matsoukas said.

Waithe describes the movie as “protest art,” calling it her contribution to “the culture,” in the same vein as works by James Baldwin, Zora Neale Hurston, Lorraine Hansberry and Toni Morrison.

“There’s no greater weapon than my laptop,” she said. “I come from the church of Nina Simone, in that it is our job as artists to reflect the times. And by that, anything a black person writes is political. How could it not be? Whenever I’m being black and free and saying the things I want to say, that is a form of revolution. Some black art is watered down for white audiences. And the truth is, with white stuff, you don’t have to do that. Look at ‘Fleabag.’ Look at ‘Better Things.’ Look at any white movie that’s been nominated for an Academy Award. But what I felt in movies like ‘Menace II Society,’ it literally does not care about the white audience at all. Those kinds of films always speak to me in a different way, where I feel seen. Those are the movies that really inspire me.”

At the same time, the filmmakers are quick to clarify that “Queen & Slim” is intended for audiences of all stripes.

“Obviously, we made it as a meditation on the black experience, and I hope that black audiences really appreciate that it was told for them,” Matsoukas said. “But I also think that in order to create change, we have to make people uncomfortable. So for me, it’s important that everybody sees this and that we create empathy for each other. In order to create change there needs to be real dialogue, and I hope we can be a small part of that conversation.”