title: how to enable libx264 for ffmpeg on macos
body: <p>I am running a code that runs ffmpeg and breaks down because of libx264 with the following error:</p>
  <p>Unknown encoder 'libx264'</p>
  <pre><code>  File &quot;/anaconda3/lib/python3.6/site-packages/imageio/plugins/ffmpeg.py&quot;, line 661, in _append_data
      self._proc.stdin.write(im.tostring())
  BrokenPipeError: [Errno 32] Broken pipe
  </code></pre>
  <p>So I upgrade ffmpeg to the latest and see that libx264 is installed as shown: Using Brew on MacOs</p>
  <pre><code>==&gt; Pouring x264-r3027_1.high_sierra.bottle.tar.gz
  
   /usr/local/Cellar/x264/r3027_1: 11 files, 5.5MB
  </code></pre>
  <p>But when I do</p>
  <pre><code>ffmpeg encoders | grep 264
  </code></pre>
  <p>I get --disable-libx264 on the last line:</p>
  <pre><code>ffmpeg version 4.0 Copyright (c) 2000-2018 the FFmpeg developers
    built with clang version 4.0.1 (tags/RELEASE_401/final)
    configuration: --prefix=/anaconda3 --cc=x86_64-apple-darwin13.4.0-clang --disable-doc --enable-shared --enable-static 
  </code></pre>
  <p>--enable-zlib --enable-pic --enable-gpl
  --enable-version3 --disable-nonfree --enable-hardcoded-tables --enable-avresample --enable-libfreetype --disable-openssl --disable-gnutls --enable-libvpx --enable-pthreads --enable-libopus --enable-postproc <strong>--disable-libx264</strong></p>
  <p>Seems like I have to change --disable-libx264 to --enable-libx264 but not sure where and how it is done. Could not find it under /anaconda3 since: --prefix=/anaconda3</p>