Giter Site home page Giter Site logo

media-utils's Introduction

流媒体工具使用说明

安装

  1. media-utils-source.zip中解压出指定操作系统的压缩包,再次解压, 放到服务器任意目录,并将可执行文件ffmpegffmpeg.exe绝对路径配置 到application.yml中(linux服务器请注意给ffmpeg文件执行权限)。
  2. 项目目录执行mvn clean package -Dmaven.skip.test=true打包成jar包
  3. 将jar包放到服务器目录,并执行java -jar media-utils-1.0.jar即可 开启RESTful接口服务。

使用

需要将jar运行到流媒体文件所在的服务器,通过请求RESTful接口,即可在 目标流媒体文件的同级目录生成转码后的文件。如需要部署在非同一服务器, 可通过fastdfs实现远程目录

RESTful接口

  • 视频转码接口(替换或删除源文件)异步

请求

POST /v1/video/_transferReplace HTTP/1.1
Content-Type: application/json

{
    "videoPath": "/home/media/34a9b0ad099f4d299fe1541c008629ba.wmv",
    "targetFormat": "mp4"
}

响应

{
    "code": 200,
    "data": null,
    "msg": "success"
}
  • 视频转码接口(保留源文件,生成指定名称的文件)异步

请求

POST /v1/video/_transferRename HTTP/1.1
Content-Type: application/json

{
    "videoPath": "/home/media/34a9b0ad099f4d299fe1541c008629ba.wmv",
    "newName": "sp2.mp4"
}

响应

{
    "code": 200,
    "data": null,
    "msg": "success"
}

media-utils's People

Contributors

jianrongfeng 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.