title: How to install libx265 for ffmpeg on Mac OSX
body: <p>I have tried multiple guides <a href="https://hexeract.wordpress.com/2009/04/12/how-to-compile-ffmpegmplayer-for-macosx/" rel="noreferrer">here</a> (search for "Building libx265") and <a href="http://sinclairmediatech.com/building-ffmpeg-with-libx265/" rel="noreferrer">here</a> with no success.  Both times I made sure I uninstalled ffmpeg first, went through the guides, then ran</p>
  
  <p><code>brew install ffmpeg --with-fdk-aac --with-freetype --with-libass --with-libvpx --enable-libx265</code></p>
  
  <p>No matter what when I go to run a command like</p>
  
  <p><code>ffmpeg -i source.mkv -c:v libx265 test1.mkv</code></p>
  
  <p>I get the error:</p>
  
  <p><code>Unknown encoder 'libx265'</code></p>
  
  <p>Has anyone had success building libx265 for use with ffmpeg on OSX and can you please share how you did it?</p>
  
  <p>P.S. I am running OSX 10.11.3</p>