title: How to form nested loops to obtain multiple folders dynamically in python using moviepy?
body: <p>How to form nested loops to obtain multiple folders dynamically in python using moviepy?</p>
  <p>We have 3 builders folders in that each has multiple projects consisting of 4 sub folders by name: Raw video(Uploaded videos)
  Original video(Unprocessed uploaded videos)
  Converted videos(fast forwarded videos)
  Final videos(merged videos)
  Here I want to builder folders dynamically one by one using nested loops to process the videos.
  Here is the code which process the builder-1 folder by giving the static path. I want this to be processed dynamically for all the builders:</p>
  <pre><code>from moviepy.editor import *
  import os
  import glob
  from natsort import natsorted
  import datetime
  import time
  import shutil
  from concurrent.futures import ThreadPoolExecutor
  
  
  def fast(path, thread_name):
      if os.path.splitext(path)[1] == '.mp4':
          print(&quot;Start : &quot; + str(thread_name) + &quot;  -  &quot; + str(datetime.datetime.now()))
          clip = (VideoFileClip(path).fx(vfx.speedx, 5))
          clip.to_videofile('A:/Internship/Builder-1/project-1/Converted videos/' + thread_name + '.mp4', codec='libx264')
          time.sleep(3)
          shutil.move(path, &quot;A:/Internship/Builder-1/project-1/Original videos/&quot;)
          print(&quot;End : &quot; + str(thread_name) + &quot;  -  &quot; + str(datetime.datetime.now()))
  
  
  with ThreadPoolExecutor(5) as pool:
      for i, filename in enumerate(glob.glob(&quot;A:/Internship/Builder-1/project-1/Raw videos/*.mp4&quot;), 1):
          pool.submit(fast, filename, f&quot;t{i}&quot;)
          
  
  </code></pre>