Firefly1126中srs-librtmp推流库配置

Deceiver_Ker·2022-04-14 10:36·865 次阅读

Firefly1126中srs-librtmp推流库配置

Firefly1126中srs-librtmp推流库配置#

下载

Copy
https://gitee.com/winlinvip/srs.oschina.git

切换分支

Copy
git checkout -b 3.0release origin/3.0release kxq@ubuntu:~/Desktop/srs.oschina/trunk$ git checkout -b 2.0release origin/2.0release Branch 2.0release set up to track remote branch 2.0release from origin. Switched to a new branch '2.0release'

检查分支命令

Copy
git branch -vv

出现上述显示则切换成功

修改/trunk/auto/options.sh;改为

Copy
SRS_TOOL_CC=arm-linux-gnueabihf-gcc SRS_TOOL_CXX=arm-linux-gnueabihf-g++ SRS_TOOL_AR=arm-linux-gnueabihf-ar SRS_TOOL_LD=arm-linux-gnueabihf-ld SRS_TOOL_RANDLIB=arm-linux-gnueabihf-randlib

之后修改/trunk/research/librtmp/Makefile
1)GCC= arm-linux-gnueabihf-gcc //换成DM8168交叉编译链
2) # for arm.
ifeq ($(GCC), arm-linux-gnueabihf-gcc)

然后执行以下命令编译

Copy
./configure --with-librtmp --arm && make

测试程序文件夹位置

Copy
/home/kxq/Desktop/srs.oschina/trunk/objs/research/librtmp

使用的静态库文件夹位置

Copy
/home/kxq/Desktop/srs.oschina/trunk/objs/lib /home/kxq/Desktop/srs.oschina/trunk/objs/openssl/lib
Copy
#以下为部分编译时打印信息 arm-linux-gnueabihf-gcc srs_publish.c ../../objs/lib/srs_librtmp.a ../../objs/openssl/lib/libssl.a ../../objs/openssl/lib/libcrypto.a -g -O0 -ldl -static -lstdc++ -lm -o objs/srs_publish /home/kxq/Desktop/rv1126_rv1109_linux_release_20210306/prebuilts/gcc/linux-x86/arm/gcc-arm-8.3-2019.03-x86_64-arm-linux-gnueabihf/bin/../lib/gcc/arm-linux-gnueabihf/8.3.0/../../../../arm-linux-gnueabihf/bin/ld: ../../objs/openssl/lib/libcrypto.a(dso_dlfcn.o): in function `dlfcn_globallookup': dso_dlfcn.c:(.text+0x10): warning: Using 'dlopen' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking

测试程序使用,执行以下语句向服务器推流

Copy
./srs_h264_raw_publish ./cuc_ieschool.h264 rtmp://公网rtmp服务器ip:端口/live/livestream 25

拉流

Copy
vlc rtmp://公网rtmp服务器ip:端口/live/livestream
posted @   Deceiver_Ker  阅读(865)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 物流快递公司核心技术能力-地址解析分单基础技术分享
· .NET 10首个预览版发布:重大改进与新特性概览!
· 单线程的Redis速度为什么快?
· 展开说说关于C#中ORM框架的用法!
· Pantheons:用 TypeScript 打造主流大模型对话的一站式集成库
点击右上角即可分享
微信分享提示
目录