title: Capturing terminal output into pandas dataframe without creating external text file
body: <p>I am using ffmpeg's extract_mvs file to generate some text information. I would use a command like this in the terminal:</p>
  
  <pre><code>/extract_mvs input.mp4 &gt; output.txt
  </code></pre>
  
  <p>I would like to use this command with <code>Popen</code> or other subprocess in python such that instead of output.txt, the data is passed straight to a pandas data frame without actually generating the text file.</p>
  
  <p>The idea is to automate this multiple times, so, I am trying to avoid many .txt files from being generated and thus having to <code>open()</code> them one by one. </p>
  
  <p>I thought of something like this: </p>
  
  <pre><code>import subprocess
  cmd = ['./extract_mvs', 'input.mp4']
  a = subprocess.Popen(cmd, stdout=subprocess.PIPE)
  df = pd.read_csv(a.communicate()[0], sep=',')
  </code></pre>
  
  <p>But then I get an error: <code>OSError: Expected file path name or file-like object, got &lt;class 'bytes'&gt; type</code></p>
  
  <p>Can it be fixed and extended so as to read straight from subprocess to pandas?</p>