NYPD officers using body cameras will tell members of the public they are being recorded — unless notification would impede an investigation or create a danger — under proposed rules being rolled out Friday governing use of the cameras.

The rules, which have to be approved by a special federal court-appointed monitor, are planned to govern this year’s rollout of body cameras for officers in 20 precincts, totaling about 1,000 to 1,200 officers.

The first precinct scheduled to get cameras is the 34th Precinct in Washington Heights.

The city hopes to have all 22,000 patrol officers wearing cameras by the end of 2019. The city experimented with about 50 body cameras in 2014.

Court-appointed monitor Peter Zimroth will be assessing the rollout of the camera program. The proposed rules, which will be incorporated in the Patrol Guide, cover numerous situations where camera activation is mandatory and where it is prohibited, as well as special cases in which cops should stop recording.

Among the situations requiring mandatory recording under the proposed rules are arrests, vehicle stops, interactions with those suspected of criminal activity and public interactions that escalate and become adversarial.

Included in situations where camera recordings are prohibited are routine activities in NYPD facilities, interviewing of confidential informants, during strip searches and during interviews of victims of sex crimes.

The proposed rules, which also say the recordings will be kept for at least a year, in part reflect the results of a questionnaire distributed to the public and police officers in June to assess attitudes about cameras.

Officials also talked with prosecutors, court officials, victims’ advocates and others to get input for the proposed policy, said Nancy Hoppock, NYPD assistant deputy commissioner.

Ninety-two percent of the 25,000 members of the public who responded to the questionnaire said police should use body cameras, and 73 percent or more said cameras would improve police-community relations, public safety, officer safety and the way cops and the public interact.

Among the more than 5,000 officers who responded to a slightly different survey, 71 percent said they would be likely or somewhat likely to volunteer to wear a camera, while 29 percent said they wouldn’t volunteer.

The survey found 85 percent to 91 percent of officers thought the cameras would either improve police-community relations or have no impact.

Among the big differences in police and public responses was on the question of whether cops should be permitted to view their own recordings. About 27 percent of the public said that was fine, while nearly 85 percent of the officers said it should be allowed.

Assistant Chief Matt Pontillo said that there were circumstances where cops shouldn’t record, such as when a person didn’t invite an officer to approach them or when officers are canvassing a public park in search of a missing child.

“That is not the kind of thing we would or should be recording because it is very invasive,” said Pontillo. “We are very cognizant and concerned about people’s privacy; we don’t want to deter people from cooperating.”

He added there would be cases where an officer could suddenly turn a camera on during an interview when suspicion was raised that a person may have been involved in a crime.