As an example, in Spain it is illegal to have dashcams, and its content cannot be used in a trial - but you can share the content with insurances and policeman, and recording is generally not prosecuted. It is nonetheless an opening if an officer is searching for a way to fine you...
Please show a source for that claim. Afaik having the dashcam is legal (under conditions like it being mounted securely, not obstructing vision, recording limits so it's not surveillance,...) but publishing the video might violate data protection laws