Multiprocessing | Multithreading ffmpeg in python
<p>I am developing a <a href="https://github.com/lordcantide/Alien-FFMPEG-Transcoder-Framework-for-HDHomeRun-PRIME" rel="nofollow">python WSGI script</a> to interface with an HDHomeRun Prime. In a perfect world it will pass URI values as commands to FFMPEG and display the resulting stream in a browser. I have the "show stuff in browser" and the "pass instructions to FFMPEG" parts working fine, but I do not have them working simultaneously.</p>

<p>1) Given that this middleware is being used to transcode MPEG-2 to h.264, does it make more sense to use multiprocessing or multithread to start and stop the respective processes?</p>

<p>2) If the WSGI script is brokering the initiation of FFMPEG feeds (if the input feed isn't already brokered) and connecting clients to the associated FFServer streams, does mean I'll need to use some sort of pool to keep track of the middleware's activities?</p>