user3828398
user3828398

Reputation: 565

how to compile ffmpeg with enabling libsrt

I'm trying to compile ffmpeg following this guide, it doesn't show how to enable libsrt, I tried the following configuration, but got error libavformat/libsrt.c:24:10: fatal error: srt/srt.h: No such file or directory.

./configure --prefix=/home/hao/repo/Transcoder/Release/ffmpeg --enable-shared --enable-demuxer='mpegts,mpegvideo,image2' --enable-muxer=mpegts --enable-protocol='file,udp,rtp,srt' --enable-filter=overlay --enable-zlib --enable-libsrt --disable-doc

Upvotes: 4

Views: 14716

Answers (2)

user19252331
user19252331

Reputation: 21

You will need to add --pkg-config-flags="--static" to your FFMpeg configure line, otherwise pkg-config can't find the static libs.

Upvotes: 0

llogan
llogan

Reputation: 133853

It does not appear you are following the compile guide, but if you were to do so then compiling instructions for Haivision SRT could look like:

sudo apt-get install libssl-dev
cd ~/ffmpeg_sources
git clone --depth 1 https://github.com/Haivision/srt.git
mkdir srt/build
cd srt/build
cmake -DCMAKE_INSTALL_PREFIX="$HOME/ffmpeg_build" -DENABLE_C_DEPS=ON -DENABLE_SHARED=OFF -DENABLE_STATIC=ON ..
make
make install

Then continue with the guide. When you get to the ffmpeg section make sure to add --enable-libsrt to the configure line.

Upvotes: 10

Related Questions