title: How to "fork" a video conversion process into background, in php?
body: <p>I have a batch flash upload script, that uploads video files to a dir. Simple. After the upload completes, it creates a mysql record for that file, and moves on to the next file in the queue.</p>
  
  <p>Just before it does that, I want it invoke a background process that will convert the uploaded avi avi file to an ipod compatible mp4 file, as well as generate some preview thumbs. As you can imagine, it takes some time...... I can simply put the conversion code in the file uploader... but it would hang for every file for a good 10-20 minutes, which is a nono (even thou its an admin-only function). </p>
  
  <p>So I want it to fork the conversion process in the background, and move onto the next upload, while it converts the file. </p>
  
  <p>Would something like this do the job, or will I actually have to use the php fork functions?</p>
  
  <pre><code>exec("/usr/bin/php ./convert.php?id=123 &gt; /dev/null 2&gt;&amp;1 &amp;");
  </code></pre>