Oh, just watch the video ….
My favorite line from the video “Sometimes the video loop is visually plausible but semantically incorrect”.
And then try it yourself: http://research.microsoft.com/en-us/um/people/hoppe/proj/videoloops/README.html
And if you are more curious you can read the paper: http://research.microsoft.com/en-us/um/people/hoppe/proj/videoloops/