Sign inSign up

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

Open SourceFrameworks & Low-Code
2026-06-28 08:55 12 views • 0 downloads 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
Download