title: How can I turn libavformat error messages off
body: <p>By default, libavformat writes error messages to <code>stderr</code>, Like:</p>
  
  <p><code>Estimating duration from bitrate, this may be inaccurate</code></p>
  
  <p>How can I turn it off? or better yet, pipe it to my own neat logging function?</p>
  
  <p><strong>Edit:</strong> Redirecting stderr to somewhere else is not acceptable since I need it for other logging purposes, I just want libavformat to not write to it.</p>