Clear[]
x1[t_] := 1*Cos[(Sqrt[2])*t]
x2[t_] := -1*Cos[(Sqrt[2])*t]
Sp[t_] := 
      Show[Graphics[{RGBColor[0, 0, 1], Thickness[0.005], 
            Line[{{-0.5 + x1[t], 0}, {x1[t], 
                  0}, {0.5 + (4/5)*x1[t] + (1/5)*x2[t], 
                  0.5}, {1 + (3/5)*x1[t] + (2/5)*x2[t], -0.5}, {1.5 + 
                    (2/5)*x1[t] + (3/5)*x2[t], 
                  0.5}, {2 + (1/5)*x1[t] + (4/5)*x2[t], -0.5}, {2.5 + 
                    x2[t], 0}, {3 + x2[t], 0}}]}, 
          PlotRange -> {{-5, 8}, {-1, 1}}, 
          AspectRatio -> Automatic], 
        DisplayFunction -> Identity]
m1[t_] := 
      Show[Graphics[{RGBColor[0, 1, 0], Disk[{-0.5 + x1[t], 0}, 0.3]}, 
          AspectRatio -> Automatic], 
        DisplayFunction -> Identity]
m2[t_] := 
      Show[Graphics[{RGBColor[0, 1, 0], Disk[{3 + x2[t], 0}, 0.3]}, 
          AspectRatio -> Automatic], 
        DisplayFunction -> Identity]
g = 
      Table[Show[Sp[t], m1[t], m2[t], 
          DisplayFunction -> $DisplayFunction], {t, 0, 10, 
          0.1}]
Export["1.avi", g]