[Open Source] A Java-Based RTSP/RTMP to FLV Converter Featuring Easy Integration and Efficient Conversion

Open SourceClassification Systems
2026-06-28 08:55 11 次浏览 • 0 次下载 0KB
[Open Source] A Java-Based RTSP/RTMP to FLV Converter Featuring Easy Integration and Efficient Conversion

1. Project Overview

Easy-FLV: An RTSP/RTMP to FLV Converter Implemented in Java

Easy-FLV is a Java-based library that converts RTSP or RTMP video streams into FLV format for playback in browsers. It provides an efficient, stable, and easy-to-integrate solution for real-time video surveillance, live streaming, and video stream processing.

2. Open Source License

Licensed under Apache-2.0

3. Screenshots

Effect picture

Here is a demonstration of Easy-FLV in action:

Image

Image

4. Feature Overview

Why Choose Easy-FLV?

  • Efficient Conversion: Quickly converts video streams into FLV format without complicated configuration.

  • Easy Integration: Available as a Spring Boot Starter, making it easy to integrate into any Java project.

  • Modern Browser Support: Compatible with all major browsers without requiring additional plugins.

  • Real-Time Stream Processing: Suitable for converting real-time video streams, such as security surveillance and live broadcasts.

5. Tech Stack

Quick Start

Add the Maven Dependency

Add the following Maven dependency to your Spring Boot project:

<dependency>
    <groupId>io.github.javpower</groupId>
    <artifactId>rtsp-converter-flv-spring-boot-starter</artifactId>
    <version>1.5.9.1</version>
</dependency>

Implement the Interface

Create a service class that implements the IOpenFLVService interface and provides the stream URL:

@Service
public class RtspDataService implements IOpenFLVService {

    @Override
    public String getUrl(Integer channel) {
        // Get the RTSP video stream URL based on the channel
        return "rtsp://10.11.9.251:554/openUrl/16HV8mA";
    }
}

Configure YAML

Configure Easy-FLV in application.yml:

easy:
  flv:
    host: http://localhost:8200

Use the API

Use the following endpoints to obtain the converted stream URL and play it in a browser:

  • Conversion URL: GET http://ip:port/get/flv/hls/stream_{channel}.flv

  • Playback URL: GET http://ip:port/flv/hls/stream_{channel}.flv

Direct Usage

If you do not want to use the API, you can directly encode the stream URL and convert it:

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=encoded_url

  • Playback URL: GET http://ip:port/flv/hls/stream?url=encoded_url

#1
资源直链https://gitee.com/giteeClass/easy-flv
去下载
星河码客

发现和分享优质开源项目,传承互联网精神,为开发者服务。

关于本站

联系我们

微信/广告合作:ITcloub (备注星河码客)

免责声明:本站资源版权归原作者所有,仅供学习与交流。如有侵权,请通过「关于我们 - 侵权投诉」联系删除。

Powered by Nuxt · Deployed on Cloudflare