how to compile ffmpeg with enabling libsrt

2019-07-25 08:56发布

问题:

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

回答1:

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.



标签: ffmpeg