# Animation rendered from command line only shows the first frame

I am rendering an animation using blender -b file.blend -a. The blender file is set to save animations as an ".mp4". It runs OK and creates an output animation video. The problem is that the video is stuck in the first frame.

I also tried saving the animation as PNG images, but the output was the same. All of the saved pictures were the first frame.

Rendering the animation from the UI works fine.

What's the correct way of saving an animation from the command line?