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

技术共进,成长同行——讯飞AI开发者社区

更多推荐