Automated Video Looping (Version 2.0)

This package demonstrates the technology in the research paper:

Automated video looping with progressive dynamism.
Zicheng Liao, Neel Joshi, Hugues Hoppe.
ACM Trans. Graphics (SIGGRAPH), 32(4), 2013.

Please also refer to the project web page and additional results.

The demo consists of two programs:

For immediate use, just run the file _view_SampleSquareFlags_loop.bat to see the already computed example.

Download

The demo can be found here. Note that the code requires 64-bit Windows 7 (or more recent) (not Windows RT). Also, creating new video loops requires 8 GB of memory. Our package should contain all the necessary redistributable *.dll files. (If there are errors regarding missing dll files and Microsoft Visual Studio is not installed, it may be necessary to install its runtime components.)

Loop creation

VideoLoopCreate.exe SampleVideo.mp4

Reads the specified input video and creates the following files:

Supported input video formats include *.mp4, *.mov, and *.wmv files.

Only up to 5 seconds of the input video is processed. If the video is 7 seconds or longer, then the section from second 2 to second 7 is used, otherwise the last 5 seconds of the video is used.

For high-resolution videos (video height 720 or greater), the VideoLoopCreate program performs the looping optimization on a downsampled version of the video. However, the output video is at the same resolution as the input video.

It is possible to drag-and-drop an input video on top of the VideoLoopCreate.exe icon to run it.

It normally takes 2-4 minutes to process a video, depending on its resolution and the processor speed.

Loop viewing

VideoLoopView.exe SampleVideo_loop.mp4

Shows the specified video loop without any extra features.

One nice property of our video viewer is that it does not stutter when reaching the end of the video and resuming at the beginning.

VideoLoopView.exe SampleVideo_loop.vlp

Reads both SampleVideo_loop.mp4 and SampleVideo_loop.vlp to enable interactive control over video dynamism.

The vertical slider on the right controls the level of dynamism globally. The bottom setting corresponds to a static video, and the top setting corresponds to a fully dynamic video.

The checkbox below the slider enables red/green coloring of the looping regions. A region is shown green when looping and red when static.

Clicking over the video allows spatial control over dynamism -- enabling or disabling the looping state of the region under the cursor.

Painting a stroke over the video by dragging the left button affects all encountered regions -- disabling them by default, or enabling them if the "shift" key is held down.

For convenience, one may drag-and-drop a *.vlp (or *.mp4) file on top of the VideoLoopView.exe icon to view it (or set up a file association from the *.vlp extension to the VideoLoopView.exe program).

Advanced loop creation and 4K video

VideoLoopCreate.exe -loopsecs 4 -ext wmv M4Kseabeach1.wmv

This command, contained in the batch file _create_4K_loop_win8.bat, demonstrates additional command-line options using a 4K video input file M4Kseabeach1.wmv (which must be downloaded separately).

VideoLoopView.exe M4Kseabeach1_loop.wmv

Plays the video loop M4Kseabeach1_loop.wmv resulting from the VideoLoopCreate command above.

VideoLoopCreate.exe -reps 3 SamplePoolPalms.mp4

With the command-line parameter -reps 3, the program creates one additional file:

Video stabilization

The loop creation program assumes that input videos have no camera motion. This is best achieved by shooting videos with a camera on a tripod. If the video is hand-held, visible camera motion can lead to artifacts resulting in a poorer quality looped video. Thus, for hand-held videos we recommend running a software stabilizer or alignment process first. Here are some resources for stabilizing videos:

Directory contents

README.html this file
_view_SampleSquareFlags_loop.bat quickly invoke the video loop viewer on SampleSquareFlags_loop
_create_SamplePoolPalms_loop.bat create a video loop for the second sample video
_create_4K_loop_win8.bat create a 4K video loop
SampleSquareFlags.mp4 a sample input video
SampleSquareFlags_loop.mp4 a sample output video loop
SampleSquareFlags_loop.vlp the looping parameter file associated with the loop
SamplePoolPalms.mp4 another sample input video
VideoLoopCreate.exe the loop creation program
VideoLoopView.exe the loop viewing program
VideoLoopViewEngine.dll a runtime library required by the VideoLoopView program