title: How to utilize multiprocessing and multithreading efficiently to convert 1000s of video files to audio using python in parallel
body: <p>I tried to convert video files to audio using moviepy python package. it works perfectly fine.
  However, I have 1500 100MB sized videos and I want to convert all of them to audio files. It takes a lot of time with the standard approach.</p>
  <p>Code to convert one video file to audio:</p>
  <pre><code>import moviepy.editor as mp
  clip = mp.VideoFileClip('file.mp4') 
  clip.audio.write_audiofile(r&quot;file.mp3&quot;)
  </code></pre>
  <p>I can also use threading to convert multiple files at the same time but I want to utilize multiprocessing and multithreading both to achieve the result most efficiently with less time complexity.</p>
  <p>Algo using threading only:</p>
  <pre><code>clip1...clip10= make 10 lists with 150 files names from os.listdir()
  spawn 10 threads to process 10 files at a time.
  
  t1= Thread(target=convert, args=(clips1))
  .
  .
  .
  t10= Thread(target=convert, args=(clips2))
  </code></pre>
  <p><strong>Any Ideas?</strong></p>