title: Configure and Build OpenCV to Custom FFMPEG Install
body: <p>I cannot seem to configure OpenCV to link to a non-/usr/lib set of <code>FFMPEG</code> libraries.</p>
  
  <p>My LD_LIBRARY_PATH contains a direct link to the folder for the custom install of FFMPEG:</p>
  
  <p><code>LD_LIBRARY_PATH=/pathto/ffmpeg-0.10.2/lib</code></p>
  
  <p>Additionally, I've configured pkgconfig as:</p>
  
  <p><code>PKG_CONFIG_PATH=/samepathto/ffmpeg-0.10.2/lib/pkgconfig/</code></p>
  
  <p>Within CMake however I cannot find any setting for path to FFMPEG - either in basic or custom. The only setting related to FFMPEG appears to be <code>WITH_FFMPEG</code> type setting (set to ON).</p>
  
  <p>I can build OpenCV but it seems to link to the system libraries for libavcodec - this causes a conflict as the system libraries are version .52 and the version in my install of <code>FFMPEG</code> are .53. Linking an app on a machine without the same system libraries seems to NOT link to my custom install of OpenCV (specifically the libavcodec) because of this (I'm installing these libraries on a shared network folder).</p>
  
  <p>I am not sure if my problem is with building and linking to the wrong version of FFMPEG or if it is something with my environment after building (and then linking to the wrong ffmpeg).</p>
  
  <p>I am building on Linux, Redhat 6, OpenCV 2.3.1.</p>