Giter Club home page Giter Club logo

javacv-transcoding-tool's Introduction

使用说明

推送RTSP,则需mediamtx支持; https://github.com/bluenviron/mediamtx/releases/tag/v1.0.0

推送RTMP、HLS则需安装了nginx-http-flv-module的nginx支持 https://github.com/winshining/nginx-http-flv-module

示例

将rtsp推送为rtmp

VideoPushTool.pushVideo("rtsp://127.0.0.1:8554/test", "rtmp://127.0.0.1:1935/myapp/m1", "rtmp");

将输入流中的视频数据推送为rtmp

VideoPushTool.pushVideo(inputstream, "rtmp://127.0.0.1:1935/myapp/m1", "rtmp");

将byte[]推送到rtmp流

(调用时需要保证在同一线程,否则管道流将关闭)
VideoPushTool.pushVideo(bytes, "rtmp://127.0.0.1:1935/myapp/m1", "rtmp");

支持

流媒体协议方面目前支持RTSP和RTMP;
Nginx方面可将本服务的RTMP转为HLS推送。

依赖

   <dependencies>
        <dependency>
            <groupId>org.bytedeco</groupId>
            <artifactId>javacv-platform</artifactId>
            <version>1.5.</version>
        </dependency>
   <dependency>
        <groupId>org.bytedeco</groupId>
        <artifactId>ffmpeg-platform-gpl</artifactId>
        <version>6.0-1.5.9</version>
    </dependency>

    <dependency>
        <groupId>org.projectlombok</groupId>
        <artifactId>lombok</artifactId>
    </dependency>
    <dependency>
        <groupId>ch.qos.logback</groupId>
        <artifactId>logback-classic</artifactId>
        <version>1.2.3</version>
    </dependency>
    <dependency>
        <groupId>org.apache.logging.log4j</groupId>
        <artifactId>log4j-to-slf4j</artifactId>
        <version>2.13.3</version>
    </dependency>


    <dependency>
        <groupId>net.java.dev.jna</groupId>
        <artifactId>jna</artifactId>
        <version>5.10.0</version>
    </dependency>
    <dependency>
        <groupId>org.projectlombok</groupId>
        <artifactId>lombok</artifactId>
        <version>1.18.26</version>
        <scope>compile</scope>
    </dependency>
</dependencies>

javacv-transcoding-tool's People

Contributors

zhoutian94 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.