title: Detecting if a file is a video in Python?
body: <p>Is there any Python library that I can use to detect if a file is a video?  I am letting users upload videos to my site and I want to prevent images and documents and anything except video filetypes.  I my plan right now it to upload any file, test it, if it isn't a video delete it, if it is process it through the normal pipeline.  I'd love to test for corrupt video somehow but that is another matter.</p>
  
  <p>I need to be able to support videos without extensions.  I had thought the mimetypes library could do this but when I do the following:</p>
  
  <pre><code>import mimetypes
  
  url = 'http://thehighlightnetwork.appspot.com/serve/AMIfv94NsD5mUOwE60RnMSsBKVUsgilNyNJZawl30CRqVnLad7HkNeMmdBQCMhiAOXc0N9onNGjAM19TTVENEPjAwpeQZ6dq25CWjD5DzQXoK0c4IaPum_L-83EQS4SeUNqOCEYleHTskfkhfC8BXZJQtlyA99g2nN9lrfCXWrNGYPtjDeZETEQ'
  print mimetypes.guess_type(url)
  </code></pre>
  
  <p>I get:</p>
  
  <pre><code>(None, None)
  </code></pre>
  
  <p>I am using Google App Engine so I have all the built in libraries but can add nearly anything too.</p>