1、添加maven依赖

<dependency>

   <groupId>io.github.javpower</groupId>

   <artifactId>rtsp-converter-flv-spring-boot-starter</artifactId>

   <version>1.5.9.2</version>

</dependency>

2、在配置application.yml,加上项目ip端口

easy.flv.host=http://localhost:8081

3、url编码

String stspUrl = "rtsp://10.11.8.251:553/openUrl/dddd";//stsp视频流地址

String encodedUrl = java.net.URLEncoder.encode(url, "UTF-8");//编码后的地址

4、浏览器预览

因为rtsp-converter-flv-spring-boot-starter添加的jar包里有FLVController控制器类,直接可以请求它的地址获取播放流

浏览器直接播放地址可参考:http://www.yayihouse.com/yayishuwu/chapter/4509

Logo

魔乐社区(Modelers.cn) 是一个中立、公益的人工智能社区,提供人工智能工具、模型、数据的托管、展示与应用协同服务,为人工智能开发及爱好者搭建开放的学习交流平台。社区通过理事会方式运作,由全产业链共同建设、共同运营、共同享有,推动国产AI生态繁荣发展。

更多推荐