It’s illegal for them to do that. You can tape whatever you want in public places. You might not be allowed to publish it depending on what exactly you are taping but just filming something is not prohibited.
I guess we are lucky that the law in Germany doesn’t follow the the-camera-steals-your-soul-theory with regard to personal rights – i.e. taking a photo or filming in public is never (pretty much, the exception is stalking) illegal, personal rights of the photographed can only be violated by making the photos public (and the law has certain exceptions were making photos public is legal even without consent of all the photographed).
But it’s certainly true that the police can majorly inconvenience you. They can take your camera away and even though they have to give it back to you and are not allowed to delete anything that they can do that at all does suck. At least they cannot fine you or worse.
The most annoying thing is that many in the police seem to be unaware about the law. (They strangely never seem to have that problem when a law gives them more power.) They will lecture you on and on about personal rights even if those are irrelevant as long as you don’t plan to make the photos public. (And even if you, say, documented police brutality a newspaper could print the photo no problem, they would just have to pixelate faces.)
They can take away your camera (i.e. you better not stop them from taking away your camera – but they have to give you a receipt) but they are absolutely not allowed to delete or change anything without a conviction of some sort (and you definitely won’t get any conviction for taking photos in public, no matter what you take photos of – stalking is the only exception but that’s not the case here).
They might even not be allowed to look at your photos without a court order (since looking at your photos is a search – I’m not sure about that one).
They can only keep your camera around as long as they plan on using it as evidence – meaning that if there is no investigation or as soon as the investigation ends or after the court is finished with the case they have to give it back to you (unchanged if the court doesn’t rule otherwise – which it won’t).
The good news is that the police in Germany cannot make you pay a fine or get you into prison for taking photos of them. The bad news is that they can inconvenience you by temporarily taking away your camera. Which they can do but as soon as they delete so much as one photo you should defend yourself and sue.