GithubHelp home page GithubHelp logo

videotranscode's Introduction

FFMPEG Go封装

Build

# 本地编译
go build

# 跨平台编译
./build.sh

# MacOS
./VideoTranscode_darwin_amd64
# Windows
./VideoTranscode_windows_amd64.exe

FFMPEG版本

./VideoTranscode version

视频/音频 信息

./VideoTranscode info 123.mp4

视频格式转换

# mp4 -> avi
./VideoTranscode convert video 1234.mp4 1234.avi
# mp4 -> avi 无损
./VideoTranscode convert video 1234.mp4 1234_1.avi true
# mp4 -> mpeg 无损
./VideoTranscode convert video 1234.mp4 1234_1.mpeg true
# mp4 -> m3u8 无损 ts切片20秒
./VideoTranscode convert video 1234.mp4 1234_1.m3u8 20
# mp4 -> mp3
./VideoTranscode convert mp3 1234.mp4 1234.mp3
# mp4 -> mp4缩放
./VideoTranscode convert scale 1234.mp4 1234_1280.mp4 1280 720
# mp4 -> image
./VideoTranscode convert image 1234.mp4
# mp4 视频剪切
./VideoTranscode convert crop 1234.mp4 00:00:00 00:01:00
# 生成ts文件列表input.txt
# input.txt
file '001.ts'
file '002.ts'
file '003.ts'
...
./VideoTranscode convert generate_ts_list /dir/ts input.txt
# ts -> mp4合并
./VideoTranscode convert merge input.txt 1234.mp4

videotranscode's People

Contributors

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