提交
This commit is contained in:
parent
6e440900e8
commit
0c6869f6b2
25
README.cn.md
25
README.cn.md
@ -1,11 +1,6 @@
|
||||
<!-- Easy-FLV: Java RTSP/RTMP to FLV Converter -->
|
||||
# 📺 Easy-FLV: Java 实现的 RTSP/RTMP 到 FLV 转换器
|
||||
|
||||
[](https://github.com/javpower/easy-flv)
|
||||
[](https://github.com/javpower/easy-flv/issues)
|
||||
[](https://opensource.org/licenses/Apache-2.0)
|
||||
[](https://adoptopenjdk.net/)
|
||||
[](https://spring.io/projects/spring-boot)
|
||||
|
||||
## 🌟 关于 Easy-FLV
|
||||
Easy-FLV 是一个用 Java 实现的库,它能够将 RTSP 或 RTMP 视频流转换为 FLV 格式,以便在浏览器中播放。它为实时视频监控、直播和视频流处理提供了一个高效、稳定且易于集成的解决方案。
|
||||
@ -16,11 +11,6 @@ Easy-FLV 是一个用 Java 实现的库,它能够将 RTSP 或 RTMP 视频流
|
||||
- **现代浏览器支持**:支持所有主流浏览器,无需额外插件。
|
||||
- **实时流处理**:适用于实时视频流的转换,如安防监控和直播。
|
||||
|
||||
## 📄 效果图
|
||||
以下是 Easy-FLV 在行动的效果图:
|
||||
|
||||

|
||||

|
||||
|
||||
## 🚀 快速开始
|
||||
|
||||
@ -29,9 +19,9 @@ Easy-FLV 是一个用 Java 实现的库,它能够将 RTSP 或 RTMP 视频流
|
||||
|
||||
```xml
|
||||
<dependency>
|
||||
<groupId>io.github.javpower</groupId>
|
||||
<artifactId>rtsp-converter-flv-spring-boot-starter</artifactId>
|
||||
<version>1.5.9.1</version>
|
||||
<groupId>me.zhengjie</groupId>
|
||||
<artifactId>eladmin-flv</artifactId>
|
||||
<version>1.1</version>
|
||||
</dependency>
|
||||
```
|
||||
|
||||
@ -45,7 +35,7 @@ public class RtspDataService implements IOpenFLVService {
|
||||
@Override
|
||||
public String getUrl(Integer channel) {
|
||||
// 根据 channel 获取 RTSP 视频流地址
|
||||
return "rtsp://10.11.9.251:554/openUrl/16HV8mA";
|
||||
return "rtsp://xx.xx.xx.xx/openUrl/16HV8mA";
|
||||
}
|
||||
}
|
||||
```
|
||||
@ -83,9 +73,4 @@ public static void main(String[] args) throws UnsupportedEncodingException {
|
||||
我们欢迎任何形式的贡献,包括但不限于报告 bug、提交修复、添加新功能、改进文档等。
|
||||
|
||||
## 📄 许可证
|
||||
Easy-FLV 根据 [Apache License 2.0](LICENSE) 发布。
|
||||
|
||||
## 📧 联系
|
||||
- Email: [javpower@163.com](mailto:your-email@example.com)
|
||||
- GitHub: [https://github.com/javpower/easy-flv](https://github.com/javpower/easy-flv)
|
||||
- Gitee: [https://gitee.com/giteeClass/easy-flv](https://gitee.com/giteeClass/easy-flv)
|
||||
Easy-FLV 根据 [Apache License 2.0](LICENSE) 发布。
|
@ -1,30 +1,30 @@
|
||||
package com.gc.easy.flv.controller;
|
||||
|
||||
import com.gc.easy.flv.config.FlvConfig;
|
||||
import me.zhengjie.annotation.rest.AnonymousGetMapping;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.Model;
|
||||
|
||||
import java.io.UnsupportedEncodingException;
|
||||
|
||||
/**
|
||||
* FLV流转换
|
||||
*
|
||||
* @author gc.x
|
||||
*/
|
||||
@Controller
|
||||
public class FLVPlayController {
|
||||
@Autowired
|
||||
private FlvConfig flvConfig;
|
||||
|
||||
@AnonymousGetMapping(value = "/flv/hls/stream")
|
||||
public String getAppHtml1(String url, Model model) throws UnsupportedEncodingException {
|
||||
String decodedUrl = java.net.URLDecoder.decode(url, "UTF-8");
|
||||
String videoPath="/api/front/flv/get/stream?url="+decodedUrl;
|
||||
model.addAttribute("videoPath", videoPath);
|
||||
model.addAttribute("wight", flvConfig.getWight());
|
||||
model.addAttribute("height", flvConfig.getHeight());
|
||||
return "video";
|
||||
}
|
||||
}
|
||||
//package com.gc.easy.flv.controller;
|
||||
//
|
||||
//import com.gc.easy.flv.config.FlvConfig;
|
||||
//import me.zhengjie.annotation.rest.AnonymousGetMapping;
|
||||
//import org.springframework.beans.factory.annotation.Autowired;
|
||||
//import org.springframework.stereotype.Controller;
|
||||
//import org.springframework.ui.Model;
|
||||
//
|
||||
//import java.io.UnsupportedEncodingException;
|
||||
//
|
||||
///**
|
||||
// * FLV流转换
|
||||
// *
|
||||
// * @author gc.x
|
||||
// */
|
||||
//@Controller
|
||||
//public class FLVPlayController {
|
||||
// @Autowired
|
||||
// private FlvConfig flvConfig;
|
||||
//
|
||||
// @AnonymousGetMapping(value = "/flv/hls/stream")
|
||||
// public String getAppHtml1(String url, Model model) throws UnsupportedEncodingException {
|
||||
// String decodedUrl = java.net.URLDecoder.decode(url, "UTF-8");
|
||||
// String videoPath="/api/front/flv/get/stream?url="+decodedUrl;
|
||||
// model.addAttribute("videoPath", videoPath);
|
||||
// model.addAttribute("wight", flvConfig.getWight());
|
||||
// model.addAttribute("height", flvConfig.getHeight());
|
||||
// return "video";
|
||||
// }
|
||||
//}
|
||||
|
Loading…
Reference in New Issue
Block a user