Search code examples
ffmpegvideo-toolbox

ffmpeg build on mac with videotoolbox enabled becomes unportable


If i configure ffmpeg this way:

./configure --disable-everything --enable-static --disable-shared \
--enable-gpl --enable-nonfree --enable-encoder=h264_videotoolbox,aac \ 
--enable-muxer=mp4 --enable-protocol=file --enable-libfdk-aac 
--enable-videotoolbox --disable-autodetect

it works for my purposes (allows to encode h264 video with aac audio on Mac's videotoolbox - an Apple QSV toolkit), but if i send it to any other computer except the one it was built on, it fails with something like this:

dyld: Symbol not found: _kCVImageBufferTransferFunction_ITU_R_2100_HLG
  Referenced from: /Users/admin/Downloads/./ffmpeg
  Expected in: /System/Library/Frameworks/CoreVideo.framework/Versions/A/CoreVideo
 in /Users/admin/Downloads/./ffmpeg
Abort trap: 6

if i rebuild it this way:

./configure --disable-everything --enable-static --disable-shared
--enable-gpl --enable-nonfree --enable-encoder=aac 
--enable-muxer=mp4 --enable-protocol=file --enable-libfdk-aac 
--disable-autodetect

so with everything else but videotoolbox removed, it runs successfully on any other computer, so apparently ffmpeg needs to carry along something it doesn't, for videotoolbox to work...

i am actually building a C++ app with ffmpeg's static libraries, but explaining what i do there will be a very long story and error message produced is exactly the same if i run it on different machines, so i better illustrate it on example of ffmpeg console utility itself.

what are the configure switches i need to do to make the ffmpeg build portable please?


Solution

  • Problem turned out to be my macos version (10.14), the API mentioned is since 10.13, so it didn't work on earlier version i tried. Fixed by rebuilding ffmpeg on 10.10.