Compile ffmpeg-4.2.2 on macOS with Haivision-SRT 1.4.1 >>> ERROR: srt >= 1.3.0 not found using pkg-config

0

I got following error while compiling ffmpeg-4.2.2 on MacOS 10.14.6 with the Haivision-SRT 1.4.1 package:

ERROR: srt >= 1.3.0 not found using pkg-config

First, I tried it with the srt package from Homebrew and then I compiled it from source. But both times I got the same error. I compiled the same ffmpeg 4.2.2 package on Ubuntu with SRT 1.4.1 without problems.

From the ffbuild/config.log:

require_pkg_config libsrt srt >= 1.3.0 srt/srt.h srt_socket  
check_pkg_config libsrt srt >= 1.3.0 srt/srt.h srt_socket  
test_pkg_config libsrt srt >= 1.3.0 srt/srt.h srt_socket  
false --exists --print-errors srt >= 1.3.0  
ERROR: srt >= 1.3.0 not found using pkg-config  

Why is it asking for such an old libsrt version?
From where does it get this requirement?

saltarob

Posted 2020-01-10T21:01:39.607

Reputation: 3

"From where does it get this requirement?" The configure file has a requirement for libsrt 1.3.0 or greater. Are you compiling ffmpeg via a homebrew formula? – llogan – 2020-01-10T21:14:12.860

I followed these instructions https://trac.ffmpeg.org/wiki/CompilationGuide/macOS >> Compiling FFmpeg yourself and only installed some dependencies with Homebrew.

– saltarob – 2020-01-10T23:32:20.843

enabled libsrt && require_pkg_config libsrt "srt >= 1.3.0" srt/srt.h srt_socket >> the configure file on Ubuntu has the same line but compiled without errors the 1.4.1 srt package. Does ffmpeg really require this old package or is it a bug? – saltarob – 2020-01-10T23:44:20.797

ffmpeg requires that it not be old. – llogan – 2020-01-11T00:13:59.763

Answers

1

The official homebrew recipe does not support libsrt among some other stuff too.

Try the homebrew-ffmpeg tap:

brew tap homebrew-ffmpeg/ffmpeg
brew install homebrew-ffmpeg/ffmpeg/ffmpeg --with-srt

You can see additional supported options with:

brew options homebrew-ffmpeg/ffmpeg/ffmpeg

llogan

Posted 2020-01-10T21:01:39.607

Reputation: 31 929

Oh, I didn't understand that tap message as I tried it with homebrew. Thank you. Great. I thought all options are gone and I have to compile it myself :-) – saltarob – 2020-01-10T23:54:32.093