Multiple threads

Eduardo Oliva dutche at gmail.com
Wed Nov 16 08:48:16 EST 2011


Hello, I have a py script that reads for all "m2ts" video files and convert them to "mpeg" using ffmpeg with command line.

What I want to do is:

  I need my script to run 2 separated threads, and then when the first has finished, starts the next one....but no more than 2 threads.
  I know that Semaphores would help with that.
  But the problem here is to know when the thread has finished its job, to release the semaphore and start another thread.

Any help would be great.

Thank you in advance



More information about the Python-list mailing list