We consider a universe filled with perfect fluid with the constant equation of state parameter omega. In the theory of scalar perturbations, we study the effect of peculiar velocities on the gravitational potential. For radiation with omega = 1/3, we obtain the expression for the gravitational potential in the integral form. Numerical calculation clearly demonstrates the modulation of the gravitational potential by acoustic oscillations due to the presence of peculiar velocities. We also show that peculiar velocities affect the gravitational potential in the case of the frustrated network of cosmic strings with omega = -1/3. (C) 2020 The Author(s). Published by Elsevier B.V.