title: Is it possible to be notified each time ffmpeg finish processing one of multiple outputs?
body: <p>I am trying to use a single ffmpeg command to encode a streaming url and generate many output files. In this example, ffmpeg will output three files of duration 5, 10 and 15 seconds:</p>
  
  <pre><code>ffmpeg -i &lt;url&gt; \
   -t  5 output_5.wav \
   -t 10 output_10.wav \
   -t 15 output_15.wav \
  </code></pre>
  
  <p>The command works as expected, but I need to know when each one of the output files is available, in order to start further processing as soon as possible.</p>
  
  <p>Is there any way to be notified of each one of the events "file output_XX.wav is ready"?</p>
  
  <p>One approach I have tried is to use inotifywatch to listen for CLOSE events, but I have found that ffmpeg only closes the files when the last one ends. </p>
  
  <p>I could also listen for MODIFY events but there is no way to know when ffmpeg is done, I can only guess it by testing against a hardcoded maximum file size (very nasty solution!).</p>