如何使用libsrt(安全可靠传输)协议配置ffmpeg?

问题描述 投票:2回答:1

我想在linux-Ubuntu OS上使用libsrt(安全可靠传输)协议配置ffmpeg,我按照这个link的步骤

但是当运行$./configure --enable-libsrt命令时它会给我一个错误:

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

我修改了配置文件,它执行了上面的命令,但是当我运行$ make命令时,它最终出现以下错误:

LD  ffmpeg_g
libavformat/libavformat.so: undefined reference to `srt_socket'
libavformat/libavformat.so: undefined reference to `srt_bind'
libavformat/libavformat.so: undefined reference to `srt_getsockopt'
libavformat/libavformat.so: undefined reference to `srt_close'
libavformat/libavformat.so: undefined reference to `srt_epoll_add_usock'
libavformat/libavformat.so: undefined reference to `srt_startup'
libavformat/libavformat.so: undefined reference to `srt_connect'
libavformat/libavformat.so: undefined reference to `srt_epoll_release'
libavformat/libavformat.so: undefined reference to `srt_listen'
libavformat/libavformat.so: undefined reference to `srt_getlasterror'
libavformat/libavformat.so: undefined reference to `srt_getlasterror_str'
libavformat/libavformat.so: undefined reference to `srt_cleanup'
libavformat/libavformat.so: undefined reference to `srt_setsockopt'
libavformat/libavformat.so: undefined reference to `srt_sendmsg'
libavformat/libavformat.so: undefined reference to `srt_clearlasterror'
libavformat/libavformat.so: undefined reference to `srt_epoll_wait'
libavformat/libavformat.so: undefined reference to `srt_epoll_remove_usock'
libavformat/libavformat.so: undefined reference to `srt_epoll_create'
libavformat/libavformat.so: undefined reference to `srt_recvmsg'
libavformat/libavformat.so: undefined reference to `srt_accept'
collect2: error: ld returned 1 exit status
Makefile:108: recipe for target 'ffmpeg_g' failed
make: *** [ffmpeg_g] Error 1

使用ffmpeg启用libsrt的确切步骤是什么?我错过了什么吗?是否有任何补丁我必须添加到现有的ffmpeg源?

提前致谢 !!!

ffmpeg protocols configuration-files patch pkg-config
1个回答
2
投票

answer you referred假设提问者跟随Ubuntu compile guide on the FFmpeg Wiki(因为他们声称这样做)。编译指南将外部库“安装”到~/ffmpeg_build中以获取variety of reasons。该答案中的libsrt指令与wiki文章相同。因此,在编译ffmpeg时,您应该使用wiki中显示的其他编译选项来处理此问题。

  1. 撤消您对configure所做的任何更改。
  2. 如果您还没有,请按照链接的答案编译libsrt。
  3. 现在编译ffmpegmake distclean PKG_CONFIG_PATH="$HOME/ffmpeg_build/lib/pkgconfig" ./configure --enable-libsrt --pkg-config-flags="--static"

或者,如果您不想使用大多数这些额外选项,则在编译libsrt时省略-DCMAKE_INSTALL_PREFIX="$HOME/ffmpeg_build"

© www.soinside.com 2019 - 2024. All rights reserved.