如何使用 libsrt(安全可靠传输)协议配置 ffmpeg?
How to configure ffmpeg with libsrt (Secure Reliable Transport) protocol?
我想在 linux-Ubuntu OS 上使用 libsrt(安全可靠传输)协议配置 ffmpeg,我按照此 link[=15 中的步骤操作=]
但是当 运行 $./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 源的补丁?
提前致谢!!!
answer you referred to assumes the question asker was following the Ubuntu compile guide on the FFmpeg Wiki (because they claimed to be doing so). The compile guide "installs" external libraries into ~/ffmpeg_build
for a variety of reasons。该答案中的 libsrt 说明与维基文章相同。因此,预计您在编译 ffmpeg
.
时会使用 wiki 中显示的附加编译选项来处理此问题。
- 撤消对
configure
所做的任何更改。
- 如果您还没有编译 libsrt,请按照链接的答案进行编译。
现在编译ffmpeg
.
make distclean
PKG_CONFIG_PATH="$HOME/ffmpeg_build/lib/pkgconfig" ./configure --enable-libsrt --pkg-config-flags="--static"
或者,如果您不想使用这些额外选项中的大部分,那么在编译 libsrt 时省略 -DCMAKE_INSTALL_PREFIX="$HOME/ffmpeg_build"
。
我想在 linux-Ubuntu OS 上使用 libsrt(安全可靠传输)协议配置 ffmpeg,我按照此 link[=15 中的步骤操作=]
但是当 运行 $./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 源的补丁?
提前致谢!!!
answer you referred to assumes the question asker was following the Ubuntu compile guide on the FFmpeg Wiki (because they claimed to be doing so). The compile guide "installs" external libraries into ~/ffmpeg_build
for a variety of reasons。该答案中的 libsrt 说明与维基文章相同。因此,预计您在编译 ffmpeg
.
- 撤消对
configure
所做的任何更改。 - 如果您还没有编译 libsrt,请按照链接的答案进行编译。
现在编译
ffmpeg
.make distclean PKG_CONFIG_PATH="$HOME/ffmpeg_build/lib/pkgconfig" ./configure --enable-libsrt --pkg-config-flags="--static"
或者,如果您不想使用这些额外选项中的大部分,那么在编译 libsrt 时省略 -DCMAKE_INSTALL_PREFIX="$HOME/ffmpeg_build"
。