更新README
This commit is contained in:
parent
1aba8c1014
commit
f960667ff4
2
.gitignore
vendored
2
.gitignore
vendored
@ -1,4 +1,4 @@
|
|||||||
README.md
|
README.cn.md
|
||||||
target/
|
target/
|
||||||
!.mvn/wrapper/maven-wrapper.jar
|
!.mvn/wrapper/maven-wrapper.jar
|
||||||
!**/src/main/**/target/
|
!**/src/main/**/target/
|
||||||
|
91
README.cn.md
Normal file
91
README.cn.md
Normal file
@ -0,0 +1,91 @@
|
|||||||
|
<!-- 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 格式,以便在浏览器中播放。它为实时视频监控、直播和视频流处理提供了一个高效、稳定且易于集成的解决方案。
|
||||||
|
|
||||||
|
### 为什么选择 Easy-FLV?
|
||||||
|
- **高效转换**:快速将视频流转换为 FLV 格式,无需复杂配置。
|
||||||
|
- **易于集成**:作为 Spring Boot Starter 使用,轻松集成到任何 Java 项目。
|
||||||
|
- **现代浏览器支持**:支持所有主流浏览器,无需额外插件。
|
||||||
|
- **实时流处理**:适用于实时视频流的转换,如安防监控和直播。
|
||||||
|
|
||||||
|
## 📄 效果图
|
||||||
|
以下是 Easy-FLV 在行动的效果图:
|
||||||
|
|
||||||
|

|
||||||
|

|
||||||
|
|
||||||
|
## 🚀 快速开始
|
||||||
|
|
||||||
|
### 添加 Maven 依赖
|
||||||
|
在你的 Spring Boot 项目中,添加以下 Maven 依赖:
|
||||||
|
|
||||||
|
```xml
|
||||||
|
<dependency>
|
||||||
|
<groupId>io.github.javpower</groupId>
|
||||||
|
<artifactId>rtsp-converter-flv-spring-boot-starter</artifactId>
|
||||||
|
<version>1.5.9.1</version>
|
||||||
|
</dependency>
|
||||||
|
```
|
||||||
|
|
||||||
|
### 实现接口
|
||||||
|
创建一个服务类来实现 `IOpenFLVService` 接口,并提供流地址:
|
||||||
|
|
||||||
|
```java
|
||||||
|
@Service
|
||||||
|
public class RtspDataService implements IOpenFLVService {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getUrl(Integer channel) {
|
||||||
|
// 根据 channel 获取 RTSP 视频流地址
|
||||||
|
return "rtsp://10.11.9.251:554/openUrl/16HV8mA";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### 配置 YAML
|
||||||
|
在 `application.yml` 中配置 Easy-FLV:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
easy:
|
||||||
|
flv:
|
||||||
|
host: http://localhost:8200
|
||||||
|
```
|
||||||
|
|
||||||
|
### 使用接口
|
||||||
|
通过以下接口获取转换后的流地址,并在浏览器中播放:
|
||||||
|
|
||||||
|
- 转换地址:`GET http://ip:port/get/flv/hls/stream_{channel}.flv`
|
||||||
|
- 播放地址:`GET http://ip:port/flv/hls/stream_{channel}.flv`
|
||||||
|
|
||||||
|
### 直接使用
|
||||||
|
如果不使用接口,可以直接编码流地址并转换:
|
||||||
|
|
||||||
|
```java
|
||||||
|
public static void main(String[] args) throws UnsupportedEncodingException {
|
||||||
|
String url = "rtsp://XXXXXXXX";
|
||||||
|
String encodedUrl = java.net.URLEncoder.encode(url, "UTF-8");
|
||||||
|
System.out.println("Encoded Stream URL: " + encodedUrl);
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
- 转换地址:`GET http://ip:port/get/flv/hls/stream?url=编码后的地址`
|
||||||
|
- 播放地址:`GET http://ip:port/flv/hls/stream?url=编码后的地址`
|
||||||
|
|
||||||
|
## 🛠️ 贡献
|
||||||
|
我们欢迎任何形式的贡献,包括但不限于报告 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)
|
91
README.en.md
91
README.en.md
@ -1,91 +0,0 @@
|
|||||||
<!-- Easy-FLV: Java RTSP/RTMP to FLV Converter -->
|
|
||||||
# 📺 Easy-FLV: Java RTSP/RTMP to FLV Converter
|
|
||||||
|
|
||||||
[](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)
|
|
||||||
|
|
||||||
## 🌟 About Easy-FLV
|
|
||||||
Easy-FLV is a Java library that converts RTSP or RTMP video streams into FLV format for playback in web browsers. It provides an efficient, stable, and easily integrable solution for real-time video monitoring, live streaming, and video stream processing.
|
|
||||||
|
|
||||||
### Why Choose Easy-FLV?
|
|
||||||
- **Efficient Conversion**: Quickly converts video streams to FLV format with no complex configuration required.
|
|
||||||
- **Easy Integration**: Used as a Spring Boot Starter, it can be easily integrated into any Java project.
|
|
||||||
- **Modern Browser Support**: Supports all major modern browsers without the need for additional plugins.
|
|
||||||
- **Real-time Stream Processing**: Suitable for the conversion of real-time video streams, such as security monitoring and live broadcasting.
|
|
||||||
|
|
||||||
## 📄 Screenshots
|
|
||||||
Below are screenshots of Easy-FLV in action:
|
|
||||||
|
|
||||||

|
|
||||||

|
|
||||||
|
|
||||||
## 🚀 Quick Start
|
|
||||||
|
|
||||||
### Add Maven Dependency
|
|
||||||
Include the following Maven dependency in your Spring Boot project:
|
|
||||||
|
|
||||||
```xml
|
|
||||||
<dependency>
|
|
||||||
<groupId>io.github.javpower</groupId>
|
|
||||||
<artifactId>rtsp-converter-flv-spring-boot-starter</artifactId>
|
|
||||||
<version>1.5.9.1</version>
|
|
||||||
</dependency>
|
|
||||||
```
|
|
||||||
|
|
||||||
### Implement Interface
|
|
||||||
Create a service class that implements the `IOpenFLVService` interface to provide the stream address:
|
|
||||||
|
|
||||||
```java
|
|
||||||
@Service
|
|
||||||
public class RtspDataService implements IOpenFLVService {
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String getUrl(Integer channel) {
|
|
||||||
// Retrieve the RTSP stream address based on the channel
|
|
||||||
return "rtsp://10.11.9.251:554/openUrl/16HV8mA";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
### Configure YAML
|
|
||||||
Configure Easy-FLV in your `application.yml`:
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
easy:
|
|
||||||
flv:
|
|
||||||
host: http://localhost:8200
|
|
||||||
```
|
|
||||||
|
|
||||||
### Use Interface
|
|
||||||
To get the converted stream address and play it in a browser:
|
|
||||||
|
|
||||||
- Conversion URL: `GET http://ip:port/get/flv/hls/stream_{channel}.flv`
|
|
||||||
- Direct Browser Playback: `GET http://ip:port/flv/hls/stream_{channel}.flv`
|
|
||||||
|
|
||||||
### Direct Usage
|
|
||||||
If you prefer not to implement an interface, you can directly encode the stream address and convert it:
|
|
||||||
|
|
||||||
```java
|
|
||||||
public static void main(String[] args) throws UnsupportedEncodingException {
|
|
||||||
String url = "rtsp://XXXXXXXX";
|
|
||||||
String encodedUrl = java.net.URLEncoder.encode(url, "UTF-8");
|
|
||||||
System.out.println("Encoded Stream URL: " + encodedUrl);
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
- Conversion URL: `GET http://ip:port/get/flv/hls/stream?url=EncodedAddress`
|
|
||||||
- Direct Browser Playback: `GET http://ip:port/flv/hls/stream?url=EncodedAddress`
|
|
||||||
|
|
||||||
## 🛠️ Contribution
|
|
||||||
Contributions of any kind are welcome, including but not limited to reporting bugs, submitting fixes, adding new features, and improving documentation.
|
|
||||||
|
|
||||||
## 📄 License
|
|
||||||
Easy-FLV is released under the [Apache License 2.0](LICENSE).
|
|
||||||
|
|
||||||
## 📧 Contact
|
|
||||||
- Email: [javpower@163.com](mailto:javpower@163.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)
|
|
64
README.md
64
README.md
@ -1,5 +1,5 @@
|
|||||||
<!-- Easy-FLV: Java RTSP/RTMP to FLV Converter -->
|
<!-- Easy-FLV: Java RTSP/RTMP to FLV Converter -->
|
||||||
# 📺 Easy-FLV: Java 实现的 RTSP/RTMP 到 FLV 转换器
|
# 📺 Easy-FLV: Java RTSP/RTMP to FLV Converter
|
||||||
|
|
||||||
[](https://github.com/javpower/easy-flv)
|
[](https://github.com/javpower/easy-flv)
|
||||||
[](https://github.com/javpower/easy-flv/issues)
|
[](https://github.com/javpower/easy-flv/issues)
|
||||||
@ -7,25 +7,25 @@
|
|||||||
[](https://adoptopenjdk.net/)
|
[](https://adoptopenjdk.net/)
|
||||||
[](https://spring.io/projects/spring-boot)
|
[](https://spring.io/projects/spring-boot)
|
||||||
|
|
||||||
## 🌟 关于 Easy-FLV
|
## 🌟 About Easy-FLV
|
||||||
Easy-FLV 是一个用 Java 实现的库,它能够将 RTSP 或 RTMP 视频流转换为 FLV 格式,以便在浏览器中播放。它为实时视频监控、直播和视频流处理提供了一个高效、稳定且易于集成的解决方案。
|
Easy-FLV is a Java library that converts RTSP or RTMP video streams into FLV format for playback in web browsers. It provides an efficient, stable, and easily integrable solution for real-time video monitoring, live streaming, and video stream processing.
|
||||||
|
|
||||||
### 为什么选择 Easy-FLV?
|
### Why Choose Easy-FLV?
|
||||||
- **高效转换**:快速将视频流转换为 FLV 格式,无需复杂配置。
|
- **Efficient Conversion**: Quickly converts video streams to FLV format with no complex configuration required.
|
||||||
- **易于集成**:作为 Spring Boot Starter 使用,轻松集成到任何 Java 项目。
|
- **Easy Integration**: Used as a Spring Boot Starter, it can be easily integrated into any Java project.
|
||||||
- **现代浏览器支持**:支持所有主流浏览器,无需额外插件。
|
- **Modern Browser Support**: Supports all major modern browsers without the need for additional plugins.
|
||||||
- **实时流处理**:适用于实时视频流的转换,如安防监控和直播。
|
- **Real-time Stream Processing**: Suitable for the conversion of real-time video streams, such as security monitoring and live broadcasting.
|
||||||
|
|
||||||
## 📄 效果图
|
## 📄 Screenshots
|
||||||
以下是 Easy-FLV 在行动的效果图:
|
Below are screenshots of Easy-FLV in action:
|
||||||
|
|
||||||

|

|
||||||

|

|
||||||
|
|
||||||
## 🚀 快速开始
|
## 🚀 Quick Start
|
||||||
|
|
||||||
### 添加 Maven 依赖
|
### Add Maven Dependency
|
||||||
在你的 Spring Boot 项目中,添加以下 Maven 依赖:
|
Include the following Maven dependency in your Spring Boot project:
|
||||||
|
|
||||||
```xml
|
```xml
|
||||||
<dependency>
|
<dependency>
|
||||||
@ -35,8 +35,8 @@ Easy-FLV 是一个用 Java 实现的库,它能够将 RTSP 或 RTMP 视频流
|
|||||||
</dependency>
|
</dependency>
|
||||||
```
|
```
|
||||||
|
|
||||||
### 实现接口
|
### Implement Interface
|
||||||
创建一个服务类来实现 `IOpenFLVService` 接口,并提供流地址:
|
Create a service class that implements the `IOpenFLVService` interface to provide the stream address:
|
||||||
|
|
||||||
```java
|
```java
|
||||||
@Service
|
@Service
|
||||||
@ -44,14 +44,14 @@ public class RtspDataService implements IOpenFLVService {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getUrl(Integer channel) {
|
public String getUrl(Integer channel) {
|
||||||
// 根据 channel 获取 RTSP 视频流地址
|
// Retrieve the RTSP stream address based on the channel
|
||||||
return "rtsp://10.11.9.251:554/openUrl/16HV8mA";
|
return "rtsp://10.11.9.251:554/openUrl/16HV8mA";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
### 配置 YAML
|
### Configure YAML
|
||||||
在 `application.yml` 中配置 Easy-FLV:
|
Configure Easy-FLV in your `application.yml`:
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
easy:
|
easy:
|
||||||
@ -59,14 +59,14 @@ easy:
|
|||||||
host: http://localhost:8200
|
host: http://localhost:8200
|
||||||
```
|
```
|
||||||
|
|
||||||
### 使用接口
|
### Use Interface
|
||||||
通过以下接口获取转换后的流地址,并在浏览器中播放:
|
To get the converted stream address and play it in a browser:
|
||||||
|
|
||||||
- 转换地址:`GET http://ip:port/get/flv/hls/stream_{channel}.flv`
|
- Conversion URL: `GET http://ip:port/get/flv/hls/stream_{channel}.flv`
|
||||||
- 播放地址:`GET http://ip:port/flv/hls/stream_{channel}.flv`
|
- Direct Browser Playback: `GET http://ip:port/flv/hls/stream_{channel}.flv`
|
||||||
|
|
||||||
### 直接使用
|
### Direct Usage
|
||||||
如果不使用接口,可以直接编码流地址并转换:
|
If you prefer not to implement an interface, you can directly encode the stream address and convert it:
|
||||||
|
|
||||||
```java
|
```java
|
||||||
public static void main(String[] args) throws UnsupportedEncodingException {
|
public static void main(String[] args) throws UnsupportedEncodingException {
|
||||||
@ -76,16 +76,16 @@ public static void main(String[] args) throws UnsupportedEncodingException {
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
- 转换地址:`GET http://ip:port/get/flv/hls/stream?url=编码后的地址`
|
- Conversion URL: `GET http://ip:port/get/flv/hls/stream?url=EncodedAddress`
|
||||||
- 播放地址:`GET http://ip:port/flv/hls/stream?url=编码后的地址`
|
- Direct Browser Playback: `GET http://ip:port/flv/hls/stream?url=EncodedAddress`
|
||||||
|
|
||||||
## 🛠️ 贡献
|
## 🛠️ Contribution
|
||||||
我们欢迎任何形式的贡献,包括但不限于报告 bug、提交修复、添加新功能、改进文档等。
|
Contributions of any kind are welcome, including but not limited to reporting bugs, submitting fixes, adding new features, and improving documentation.
|
||||||
|
|
||||||
## 📄 许可证
|
## 📄 License
|
||||||
Easy-FLV 根据 [Apache License 2.0](LICENSE) 发布。
|
Easy-FLV is released under the [Apache License 2.0](LICENSE).
|
||||||
|
|
||||||
## 📧 联系
|
## 📧 Contact
|
||||||
- Email: [javpower@163.com](mailto:your-email@example.com)
|
- Email: [javpower@163.com](mailto:javpower@163.com)
|
||||||
- GitHub: [https://github.com/javpower/easy-flv](https://github.com/javpower/easy-flv)
|
- 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)
|
- Gitee: [https://gitee.com/giteeClass/easy-flv](https://gitee.com/giteeClass/easy-flv)
|
||||||
|
Loading…
Reference in New Issue
Block a user