title: How to extract audio from a video file using python?
body: <p>I want to write a python program that could extract audio from a video file (e.g. <code>video.avi</code>).
  Is there any good library for it? And where should I start from?
  I tried to use PyMedia, but I couldn't install it on my MacOSX(Mountain Lion).</p>
  
  <p><strong>EDIT:</strong>
  The problem is <code>video.avi</code> is not completely available. Someone is writing on it and adding some frames to it every second. So I wanted to write a code in python to get the video as it comes and extract the audio from it and write it to a file (e.g. <code>audio.mp3</code>, <code>audio.wav</code>). 
  I don't know if <code>ffmpeg</code> can wait for the video to be copied to <code>video.avi</code>. </p>
  
  <p>And I cannot wait for the video to be copied completely and then do the audio extraction. I have to do it as it comes. </p>