It’s one of the iconic videos of the holiday season: An alien-looking David Bowie trading countermelodies with the 20th century’s most iconic crooners, Bing Crosby.

But their 1977 TV collaboration on “Little Drummer Boy / Peace on Earth” almost didn’t happen, according to interviews in the Bing Crosby bio film that debuts tonight on PBS’ “American Masters.”

Larry Grossman, a writer on the holiday special “A Merrie Old Christmas,” says in the film that they had decided Crosby and Bowie would sing “Little Drummer Boy” together. “And when we told Bowie about the number, he said ‘I won’t sing that song…I hate that song. And if I have to do that song, I can’t do the show,’” Grossman says.

Grossman also says Bowie told him, “I’m doing the show because my mother loves Bing Crosby.”

“We decided the best way to salvage the arrangement was to do a counter melody, that would fit in between the spaces and maybe write a new bridge, and see if we can sell him that,” says another writer of the special, Buz Kohan. “It all happened rather rapidly. I would say within an hour, we had written it and were able to present it to him again.”

It was an indelible moment for the Cosby children, who were on set for what was the last of a series of family Christmas specials.

“We were pretty young,” says Mary Crosby, 55, the singer’s only daughter who was also an actress (having shot J.R. on “Dallas”).  “We knew that this was happening.”

In what “American Masters” producers said was their first reunion before the media since that special, Mary Crosby, her brothers Nathaniel, and Harry appeared with their mother and Bing’s widow Kathryn Crosby in August to talk about the PBS special before TV reporters at the TV Critics Association press tour. That’s where the Bowie question came up.

“We were all on set, and the doors opened, and David walked in with his wife,” Mary Crosby said. “And they’re both wearing full length mink coats. They have matching full makeup, and their hair was bright red and about this long. And I just remember looking at the boys, and we were just thinking, ‘Oh, my God.’”

“That’s my that first moment, when he walked in,” she said. “Yes, it’s etched in my memory.”

“You should have seen the way he was dressed in rehearsal,” added Nathaniel Crosby, Bing’s youngest son. “It almost didn’t happen. And I think the producers, you know, told him to take the lipstick off and take the earring out.”

“But then they sat at the piano,” Mary Crosby said, “And David was a little nervous. And he said, ‘Well, like, I only sing in this key.’ And Dad’s like, ‘Don’t worry. I’ll get in there somehow.’

“And then you could just see it happening. Dad realized that he was David was this amazing musician, and David realized that he was with this amazing musician and that they were there to make music,” she said. “And you could just see them both collectively relax, and then magic was made. And I do think it is one of the most extraordinary duets still.”

“It happened, and it was just incredible,” Nathaniel Crosby said. “It was right in the middle of the ’70s. I think he’d just done ‘Changes; and had had a couple of hits. But it was it was just incredible to see the contrast and then, when they sat down at the piano, for them to put what has really become a cult classic now together.”

It’s led to a number of surprisingly reverent parodies and this recent odd edit, that by removing the music shows how awkward the encounter actually was.