title: Can't install nativescript-ffmpeg-plugin on nativescript
body: <p>Running <code>ns plugin add nativescript-ffmpeg-plugin</code> produces the following error.</p>
  <pre><code>&gt; nativescript-ffmpeg-plugin@0.0.2 postinstall /Users/.../websites/test/ffmpeg/node_modules/nativescript-ffmpeg-plugin
  &gt; node postinstall-hooks.js
  
  internal/modules/cjs/loader.js:638
      throw err;
      ^
  
  Error: Cannot find module 'nativescript-hook'
      at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15)
      at Function.Module._load (internal/modules/cjs/loader.js:562:25)
      at Module.require (internal/modules/cjs/loader.js:692:17)
      at require (internal/modules/cjs/helpers.js:25:18)
      at Object.&lt;anonymous&gt; (/Users/.../websites/test/ffmpeg/node_modules/nativescript-ffmpeg-plugin/postinstall-hooks.js:1:1)
      at Module._compile (internal/modules/cjs/loader.js:778:30)
      at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
      at Module.load (internal/modules/cjs/loader.js:653:32)
      at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
      at Function.Module._load (internal/modules/cjs/loader.js:585:3)
  </code></pre>
  <p>Manually installing nativescript-hook (i.e. <code>npm i nativescript-hook --save-dev</code>) allows this plugin to be installed, but attempting to build the app on iOS fails with the following error:</p>
  <pre><code>Undefined symbols for architecture x86_64:
    &quot;_CVPixelBufferRetain&quot;, referenced from:
        _videotoolbox_decoder_callback in libavcodec.a(videotoolbox.o)
    &quot;_CVPixelBufferRelease&quot;, referenced from:
        _videotoolbox_buffer_release in libavcodec.a(videotoolbox.o)
        _ff_videotoolbox_uninit in libavcodec.a(videotoolbox.o)
        _videotoolbox_decoder_callback in libavcodec.a(videotoolbox.o)
        _videotoolbox_common_end_frame in libavcodec.a(videotoolbox.o)
    &quot;_CVPixelBufferPoolCreatePixelBuffer&quot;, referenced from:
        _vtenc_send_frame in libavcodec.a(videotoolboxenc.o)
    &quot;_kCVImageBufferPixelAspectRatioHorizontalSpacingKey&quot;, referenced from:
        _vtenc_create_encoder in libavcodec.a(videotoolboxenc.o)
    &quot;_kCVImageBufferPixelAspectRatioVerticalSpacingKey&quot;, referenced from:
        _vtenc_create_encoder in libavcodec.a(videotoolboxenc.o)
    &quot;_kCVImageBufferGammaLevelKey&quot;, referenced from:
        _vtenc_create_encoder in libavcodec.a(videotoolboxenc.o)
    &quot;_kCVPixelBufferWidthKey&quot;, referenced from:
        _vtenc_configure_encoder in libavcodec.a(videotoolboxenc.o)
        _videotoolbox_start in libavcodec.a(videotoolbox.o)
    &quot;_kCVPixelBufferHeightKey&quot;, referenced from:
        _vtenc_configure_encoder in libavcodec.a(videotoolboxenc.o)
        _videotoolbox_start in libavcodec.a(videotoolbox.o)
    &quot;_kCVImageBufferTransferFunction_UseGamma&quot;, referenced from:
        _vtenc_configure_encoder in libavcodec.a(videotoolboxenc.o)
    &quot;_kCVImageBufferYCbCrMatrix_ITU_R_709_2&quot;, referenced from:
        _vtenc_configure_encoder in libavcodec.a(videotoolboxenc.o)
    &quot;_kCVImageBufferTransferFunction_SMPTE_240M_1995&quot;, referenced from:
        _vtenc_configure_encoder in libavcodec.a(videotoolboxenc.o)
    &quot;_kCVPixelBufferPixelFormatTypeKey&quot;, referenced from:
        _avf_read_header in libavdevice.a(avfoundation.o)
        _vtenc_configure_encoder in libavcodec.a(videotoolboxenc.o)
        _videotoolbox_start in libavcodec.a(videotoolbox.o)
    &quot;_kCVImageBufferTransferFunction_ITU_R_709_2&quot;, referenced from:
        _vtenc_configure_encoder in libavcodec.a(videotoolboxenc.o)
    &quot;_kCVImageBufferColorPrimaries_ITU_R_709_2&quot;, referenced from:
        _vtenc_configure_encoder in libavcodec.a(videotoolboxenc.o)
    &quot;_kCVImageBufferYCbCrMatrix_SMPTE_240M_1995&quot;, referenced from:
        _vtenc_configure_encoder in libavcodec.a(videotoolboxenc.o)
    &quot;_CVPixelBufferGetDataSize&quot;, referenced from:
        _avf_read_packet in libavdevice.a(avfoundation.o)
    &quot;_CVPixelBufferGetPixelFormatType&quot;, referenced from:
        _videotoolbox_common_end_frame in libavcodec.a(videotoolbox.o)
        _vt_map_frame in libavutil.a(hwcontext_videotoolbox.o)
        _videotoolbox_retrieve_data in MobileFFmpeg.a(libmobileffmpeg_la-fftools_ffmpeg_videotoolbox.o)
    &quot;_kCVPixelBufferOpenGLESCompatibilityKey&quot;, referenced from:
        _videotoolbox_start in libavcodec.a(videotoolbox.o)
    &quot;_CVPixelBufferLockBaseAddress&quot;, referenced from:
        _avf_read_packet in libavdevice.a(avfoundation.o)
        _vtenc_send_frame in libavcodec.a(videotoolboxenc.o)
        _vt_map_frame in libavutil.a(hwcontext_videotoolbox.o)
        _videotoolbox_retrieve_data in MobileFFmpeg.a(libmobileffmpeg_la-fftools_ffmpeg_videotoolbox.o)
    &quot;_kCVImageBufferTransferFunctionKey&quot;, referenced from:
        _vtenc_configure_encoder in libavcodec.a(videotoolboxenc.o)
    &quot;_CVPixelBufferIsPlanar&quot;, referenced from:
        _avf_read_packet in libavdevice.a(avfoundation.o)
        _vtenc_send_frame in libavcodec.a(videotoolboxenc.o)
        _vt_map_frame in libavutil.a(hwcontext_videotoolbox.o)
        _videotoolbox_retrieve_data in MobileFFmpeg.a(libmobileffmpeg_la-fftools_ffmpeg_videotoolbox.o)
    &quot;_kCVImageBufferYCbCrMatrixKey&quot;, referenced from:
        _vtenc_configure_encoder in libavcodec.a(videotoolboxenc.o)
    &quot;_CVPixelBufferGetWidth&quot;, referenced from:
        _avf_read_packet in libavdevice.a(avfoundation.o)
        _videotoolbox_common_end_frame in libavcodec.a(videotoolbox.o)
        _vt_map_frame in libavutil.a(hwcontext_videotoolbox.o)
    &quot;_CVPixelBufferGetBaseAddressOfPlane&quot;, referenced from:
        _avf_read_packet in libavdevice.a(avfoundation.o)
        _vtenc_send_frame in libavcodec.a(videotoolboxenc.o)
        _vt_map_frame in libavutil.a(hwcontext_videotoolbox.o)
        _videotoolbox_retrieve_data in MobileFFmpeg.a(libmobileffmpeg_la-fftools_ffmpeg_videotoolbox.o)
    &quot;_CVPixelBufferGetBytesPerRowOfPlane&quot;, referenced from:
        _avf_read_packet in libavdevice.a(avfoundation.o)
        _vtenc_send_frame in libavcodec.a(videotoolboxenc.o)
        _vt_map_frame in libavutil.a(hwcontext_videotoolbox.o)
        _videotoolbox_retrieve_data in MobileFFmpeg.a(libmobileffmpeg_la-fftools_ffmpeg_videotoolbox.o)
    &quot;_CVPixelBufferGetBytesPerRow&quot;, referenced from:
        _avf_read_packet in libavdevice.a(avfoundation.o)
        _vtenc_send_frame in libavcodec.a(videotoolboxenc.o)
        _vt_map_frame in libavutil.a(hwcontext_videotoolbox.o)
        _videotoolbox_retrieve_data in MobileFFmpeg.a(libmobileffmpeg_la-fftools_ffmpeg_videotoolbox.o)
    &quot;_CVPixelBufferGetBaseAddress&quot;, referenced from:
        _avf_read_packet in libavdevice.a(avfoundation.o)
        _vtenc_send_frame in libavcodec.a(videotoolboxenc.o)
        _vt_map_frame in libavutil.a(hwcontext_videotoolbox.o)
        _videotoolbox_retrieve_data in MobileFFmpeg.a(libmobileffmpeg_la-fftools_ffmpeg_videotoolbox.o)
    &quot;_CVPixelBufferGetHeight&quot;, referenced from:
        _avf_read_packet in libavdevice.a(avfoundation.o)
        _videotoolbox_common_end_frame in libavcodec.a(videotoolbox.o)
        _vt_map_frame in libavutil.a(hwcontext_videotoolbox.o)
    &quot;_CVPixelBufferGetPlaneCount&quot;, referenced from:
        _avf_read_packet in libavdevice.a(avfoundation.o)
        _vtenc_send_frame in libavcodec.a(videotoolboxenc.o)
        _vt_map_frame in libavutil.a(hwcontext_videotoolbox.o)
        _videotoolbox_retrieve_data in MobileFFmpeg.a(libmobileffmpeg_la-fftools_ffmpeg_videotoolbox.o)
    &quot;_kCVImageBufferColorPrimariesKey&quot;, referenced from:
        _vtenc_configure_encoder in libavcodec.a(videotoolboxenc.o)
    &quot;_kCVImageBufferYCbCrMatrix_ITU_R_601_4&quot;, referenced from:
        _vtenc_configure_encoder in libavcodec.a(videotoolboxenc.o)
    &quot;_kCVPixelBufferIOSurfacePropertiesKey&quot;, referenced from:
        _videotoolbox_start in libavcodec.a(videotoolbox.o)
    &quot;_CVPixelBufferUnlockBaseAddress&quot;, referenced from:
        _avf_read_packet in libavdevice.a(avfoundation.o)
        _vtenc_send_frame in libavcodec.a(videotoolboxenc.o)
        _vt_map_frame in libavutil.a(hwcontext_videotoolbox.o)
        _vt_unmap in libavutil.a(hwcontext_videotoolbox.o)
        _videotoolbox_retrieve_data in MobileFFmpeg.a(libmobileffmpeg_la-fftools_ffmpeg_videotoolbox.o)
    &quot;_CVImageBufferGetEncodedSize&quot;, referenced from:
        _avf_read_header in libavdevice.a(avfoundation.o)
  ld: symbol(s) not found for architecture x86_64
  clang: error: linker command failed with exit code 1 (use -v to see invocation)
  </code></pre>
  <p>I tried this on:</p>
  <ul>
  <li>Mac development environment</li>
  <li>iOS 14</li>
  <li>emulator: iPhone 8</li>
  </ul>
  <p>Nativescript details:</p>
  <ul>
  <li>CLI: 7.0.8</li>
  <li>Cross-platform modules: 7.0.5</li>
  <li>Runtime(s): 7.0.0</li>
  <li>Plugin(s):</li>
  </ul>
  <pre><code>  &quot;dependencies&quot;: {
      &quot;@nativescript/core&quot;: &quot;~7.0.0&quot;,
      &quot;@nativescript/theme&quot;: &quot;~2.3.0&quot;,
      &quot;nativescript-ffmpeg-plugin&quot;: &quot;0.0.2&quot;,
      &quot;nativescript-vue&quot;: &quot;~2.8.1&quot;
    },
    &quot;devDependencies&quot;: {
      &quot;@babel/core&quot;: &quot;~7.11.6&quot;,
      &quot;@babel/preset-env&quot;: &quot;~7.11.5&quot;,
      &quot;@nativescript/ios&quot;: &quot;7.0.0&quot;,
      &quot;@nativescript/webpack&quot;: &quot;~3.0.3&quot;,
      &quot;babel-loader&quot;: &quot;~8.1.0&quot;,
      &quot;nativescript-hook&quot;: &quot;^0.2.5&quot;,
      &quot;nativescript-vue-template-compiler&quot;: &quot;~2.8.1&quot;,
      &quot;node-sass&quot;: &quot;^4.14.1&quot;,
      &quot;vue-loader&quot;: &quot;~15.9.3&quot;
    },
  </code></pre>
  <p>You can easily recreate the issue by doing the following:</p>
  <pre><code>ns create ffmpeg --vue
  cd ffmpeg
  npm i nativescript-hook --save-dev
  ns plugin add nativescript-ffmpeg-plugin
  npm run debug-ios
  </code></pre>
  <p>Has anyone successfully installed the plugin recently and have any tips for getting around these issues?</p>