Detection of flow velocities in pipes