# How to get smooth playback of image sequence

I would like smooth animation of a sequence of images, without the controls displayed by ListAnimate. I have a very simple playback function

ShowMovie[movie_, framerate_] :=
Dynamic[movie[[Clock[{1, Length[movie], 1},
Length[movie]/framerate]]], UpdateInterval -> 0]


But compared to ListAnimate, the animation is very jerky. This is illustrated in the following demonstration, which shows a square varied sinusoidally in luminance at various frequencies. ListAnimate is quite smooth, while ShowMovie is not. This is especially evident at the higher frequencies.

framerate = 60;
Manipulate[(
frames = If[hz == 0, 1, Ceiling[framerate/hz]];
contrasts = Sin[2. Pi Range[frames]/frames];
movie =
Image[{{#}}, Magnification -> 128] & /@ (.5 + .5 contrasts);
method[movie, framerate]
)
, {{hz, 1, "Hz"}, {0, 1, 2, 4, 10, 15, 20, 30},
ControlType -> SetterBar}
, {method, {ShowMovie, ListAnimate}}
]


Any suggestions on how to obtain smooth playback?

(This is related to an earlier question of mine but I hope is considered new.)

• Related Q/A: Why animator smoothes dynamic updates. – Silvia Nov 2 '14 at 6:45
• It is remarkable that after all this time Mathematica has no native "Movie" object, in the same way that it has an "Image" object. – abwatson Nov 3 '14 at 2:07