While using a camera inside the cockpit is OK, attaching one to the outside of the plane could be an airworthiness violation. Some problematic things I've seen are attaching a camera to the top cap of a balanced rudder, or placing it where it changes the airflow over a control surface resulting in a surprising response to a control input.
External camera mounts are used by a lot of pilots but they are in a gray area as far as the regulations go. Aircraft airworthiness is the key factor in external camera mounting. Basically, anything that you attach to the outside of an aircraft that wasn't part of the aircraft's airworthiness Type Certificate or a Supplemental Type Certificate can potentially make the aircraft un-airworthy. If you get ramp checked and the inspector requests that you produce documentation that proves the camera is part of the TC or STC, you might have trouble doing that unless it's an expensive, professional system with a STC. A wise strategy would be to remove the external camera when the aircraft is parked. Obviously, you don't want to mount the camera anywhere that it would interfere with flight controls, lift or stall characteristics. You also don't want the camera mount to fail and possibly damage the airframe or endanger people on the ground. Tie down bolts and wing struts are good places to mount a camera that provide a sturdy attachment point that is unlikely to fail. The closer a camera is to the engine or propeller, the more vibration will be introduced in the video even with image stabilization. Wing struts and tie down mounts move the camera away from the engine and the turbulent air from the propeller. Flightflix makes excellent, sturdy mounts for a variety of cameras and offers vibration damping mechanisms. They have a good guide on the regulations located at https://flightflix.net/faa-camera-mount-guide/ . Your best bet for an external camera mount would be something that can be considered “temporary” and therefore not subject to the FARs. The regulations do not define what is “temporary” but a mount that does not require tools to install or remove is a good rule of thumb. Hand-operated clamp type mounts are examples of this type of mount. However, you would want it to be sturdy enough to avoid the blanket 91.13 “careless or reckless operation”. The under-wing tie down bolt is the best spot for a camera on my airplane. Flightflix makes a sturdy mount for this location that can be installed or removed by hand: https://flightflix.net/product/rock-steady-tie-down-gopro-ball-mount/ .
I was going to post the Flight Fix resource but saw that you beat me to it.
The video on that page is the most comprehensive consideration of the subject that I saw. Thank you for sharing it.
If the camera is inside the cockpit, it's courteous to ask if your passengers mind being recorded. In many US states, it's legally mandatory to get permission from all participants before recording a conversation.