Applying a transformation to the world from the point of view of the camera is the most straight forward way.
When the character advances the camera can be modeled as a cartwheel without the wooden circle, keeping just the wooden sticks. This curve is called cycloid.
Also with each foot step the camera needs to move slightly to one side or the other as if the wooden sticks where separated by the horizontal distance between the two legs, balancing the center of mass to keep it vertically aligned with the foot touching the ground.
The two movement seen from the point of view of the camera would look like half a circle (or an ellipse).
Approximating the cycloid to a sinusoidal, the translation would be given by:
translation( A * cos(d + pi/2), B * sin(pi/2 - 2*d), 0 )
Where d is the distance since the character started to move. The movement speed can be modified by multiplying d by a factor, or the values of X or Y by an arbitrary amplitude.