Is that true when a crime is being committed as well? I'm sure no burglar consents to being on camera while perpetrating a crime.
Section 201a of the German Criminal Code covers laws relating to taking videos and photographs of other people.
It is illegal to, without consent, create or transmit a photograph or video of another person when that person is in a private premises or room that is protected from public view – as this translates to a violation of that person’s intimate privacy.
Also prohibited is using or making public a video or photograph obtained illegally in violation of Section 201a.
German law allows you to make recordings of privately spoken words in instances where it is necessary to defend yourself or another person.
Section 34 of the German Criminal Code defines self-defence to include present danger to life, limb, liberty, honour, property or another legal interest which cannot otherwise be averted. However, individuals are required to weigh the conflicting interests and the degree of danger, in this case, legal interest, against their protected interests.
If the protected interests outweigh the legal interests, they are allowed to act accordingly provided the extent that the act committed is an adequate means to avert the danger.
Source