How to move object constrained to curve move with same speed as another animated object

Say I have an object which has an animation.

(I turned on the motion path to make it more clear)

I have another object which is constrained to a curve. I want it to follow the curve BUT I want it to do it at the same speed as the animated object.

here I am manually moving the object to show what I mean. I want the cube to move along the path, but with the same variations in speed that the moving camera has.

Doing this will essentially let me deform a motion path like you would do with a mesh.
I don’t much about coding so if the answer includes writing some kind of script, I would really appreciate it if you gave an example :slight_smile:

You want to constrain the motion of an object following a path but with the copied speed of an other object ??? I think this is not so easy to do with just the Object Constraints of blender. Are you sure you want exactly this??? Most of the time someone want it the other way: make something follow some other ting bit not so tight…