全志D1-H芯片 如何在tina使用tplayerdemo 进行rtsp拉流说明?

2024-02-02 16:18:12 浏览数 (1)

make menuconfig 选项rtsp

代码语言:javascript复制
Allwinner                                                                                                                                                                                                                         
 libcedarx....................................... libcedarx  for allwinner (PACKAGE_libcedarx [=y])                                                                                                                                              
  Select cedarx configuration options    
   [*] Support rtsp stream

打上附件的 "support_rtsp.patch"补丁(主要是开启rtsp依赖的模块, 后续会加宏配置好,只选rtsp就好) 附件补丁在文章底部阅读原文获得

代码语言:javascript复制
diff --git a/allwinner/tina_multimedia/libcedarx/libcore/parser/Makefile.am b/allwinner/tina_multimedia/libcedarx/libcore/parser/Makefile.am
index f33af3743..5d1aeaf0c 100755
--- a/allwinner/tina_multimedia/libcedarx/libcore/parser/Makefile.am
    b/allwinner/tina_multimedia/libcedarx/libcore/parser/Makefile.am
@@ -72,4  72,7 @@ if PLS_PARSER_ENABLE
 SUBDIRS  = pls
 endif
 
-SUBDIRS  = base
 No newline at end of file
 SUBDIRS  = remux
 
 SUBDIRS  = base
 
diff --git a/allwinner/tina_multimedia/libcedarx/libcore/parser/base/CdxParser.c b/allwinner/tina_multimedia/libcedarx/libcore/parser/base/CdxParser.c
index 44305f3c6..a24273fbc 100755
--- a/allwinner/tina_multimedia/libcedarx/libcore/parser/base/CdxParser.c
    b/allwinner/tina_multimedia/libcedarx/libcore/parser/base/CdxParser.c
@@ -50,7  50,7 @@ static struct ParserUriKeyInfoS asfKeyInfo =
 };
 #endif
 
-#if 0
 #if 1
 extern CdxParserCreatorT remuxParserCtor;
 static struct ParserUriKeyInfoS remuxKeyInfo =
 {
@@ -460,7  460,7 @@ void AwParserInit(void)
     AwParserRegister(&movParserCtor, CDX_PARSER_MOV, &movKeyInfo);
 #endif
 
-#if 0
 #if 1
     AwParserRegister(&remuxParserCtor, CDX_PARSER_REMUX, &remuxKeyInfo);
 #endif
 
diff --git a/allwinner/tina_multimedia/libcedarx/libcore/parser/base/Makefile.am b/allwinner/tina_multimedia/libcedarx/libcore/parser/base/Makefile.am
index 9dbb73590..86174f94e 100755
--- a/allwinner/tina_multimedia/libcedarx/libcore/parser/base/Makefile.am
    b/allwinner/tina_multimedia/libcedarx/libcore/parser/base/Makefile.am
@@ -65,6  65,8 @@ libcdx_parser_la_LIBADD  = $(top_srcdir)/libcore/parser/avi/libcdx_avi_parser.la
 libcdx_parser_la_CFLAGS  = -DAVI_PARSER_ENABLE
 endif
 
 libcdx_parser_la_LIBADD  = $(top_srcdir)/libcore/parser/remux/libcdx_remux_parser.la
 
 if TS_PARSER_ENABLE
 libcdx_parser_la_LIBADD  = $(top_srcdir)/libcore/parser/ts/libcdx_ts_parser.la
 libcdx_parser_la_CFLAGS  = -DTS_PARSER_ENABLE

使用ffmpeg 进行推流

代码语言:javascript复制
sudo ffmpeg -stream_loop -1 -i 720x480.mp4 -vcodec copy -acodec aac -rtsp_transport tcp -f rtsp rtsp://1.116.32.155/media/test.mp4

拉流

代码语言:javascript复制
4.1 wifi联网
4.2 tplayerdemo rtsp://1.116.32.155/media/test.mp4

rtsp 播放效果:

在这里插入图片描述在这里插入图片描述

原贴链接:https://bbs.aw-ol.com/topic/1318

0 人点赞