Loops a section of a video
        @param video_name : name of video input file
        @param out : name of video output file
        @param start : start time of loop (timestamp hh:mm:ss)
        @param duration : duration of loop section (seconds)
        @param iterations : amount of times to loop
        @param video_length : length of video

def loop(self, video_name, out, start, duration, iterations, video_length,
             verbose=False):
        """
        Loops a section of a video
        @param video_name : name of video input file
        @param out : name of video output file
        @param start : start time of loop (timestamp hh:mm:ss)
        @param duration : duration of loop section (seconds)
        @param iterations : amount of times to loop
        @param video_length : length of video
        """
        beginning = NamedTemporaryFile(suffix='.avi')
        # section of video that will be looped
        loop_section = NamedTemporaryFile(suffix='.avi')
        # collection of looped sections
        loops = NamedTemporaryFile(suffix='.avi')
        end = NamedTemporaryFile(suffix='.avi')

        self.trim(video_name, beginning.name, '0', start)
        self.trim(video_name, loop_section.name, start, duration)
        self.trim(video_name, end.name, '00:00:08', video_length)

        # Open text file it and write the loop clip  n times
        with open('loop.txt', 'w') as f:
            for i in range(1, iterations):
                line = 'file {0}\n'.format(loop_section.name)
                f.write(line)

        # concat the loop clip upon itself n times
        call(['ffmpeg', '-f', 'concat',
              '-i', 'loop.txt', '-y',
              '-c', 'copy', loops.name])

        # concat the beginning clip, combo of loops, and end clip
        cfilter = (r"[0:0] [0:1] [1:0] [1:1] [2:0] [2:1]"
                   r"concat=n=3:v=1:a=1 [v] [a1]")
        call(['ffmpeg', '-i', beginning.name, '-i', loops.name, '-i', end.name,
              '-filter_complex', cfilter, '-y', '-c:v', 'huffyuv',
              '-map', '[v]', '-map', '[a1]', out])