Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.7k views
in Technique[技术] by (71.8m points)

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

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...