Get the transform matrix for each frame
You have to change the frame in your for-loop via Scene.frame_set():

bpy.context.scene.frame_set(f)


By the way, I would not use obj.location, rotation_euler etc. because they do not contain the final location, rotation and so on.
For example, parent your camera to an object, then rotate the object - the camera.rotation_euler will not change.

You should use obj.matrix_world instead (if you need it separated, decompose this matrix with to_location, to_euler etc.)