Giter VIP home page Giter VIP logo

golang_ffmpeg's Introduction

#视频支持

  • 获取视频信息
  • 视频增加图片水印
  • 视频增加文字水印
  • 获取帧图片
  • 视频合并
  • 视频格式转换
  • 视频转化为gif图片
	ffprobe := "/usr/bin/ffprobe"
	ffmpeg := "/usr/bin/ffmpeg"
	Config := golang_ffmpeg.Config{TimeOut:10}
	//获取音视频信息
	new(golang_ffmpeg.Video).Create(Config).Info(ffprobe,"/mnt/d/video/oceans.mp4")
	//给视频添加图片水印
	err,result :=new(golang_ffmpeg.Video).Create(Config).AddImg(ffmpeg,"/mnt/d/video/oceans.mp4","/mnt/d/video/test.mp4","/mnt/d/video/babymarkt-logo.png")
	//给视频添加文本水印
	err,result :=new(golang_ffmpeg.Video).Create(Config).AddText(ffmpeg,"/mnt/d/video/oceans.mp4","/mnt/d/video/test1.mp4","jdjjdjj")
	//获取视频帧图片
	err,result :=new(golang_ffmpeg.Video).Create(Config).GetVideoCover(ffmpeg,"/mnt/d/video/oceans.mp4","/mnt/d/video/test1.jpg","00:00:20")
	//视频合并
	err,result :=new(golang_ffmpeg.Video).Create(Config).Concat(ffmpeg,[]string{"/mnt/d/video/oceans.mp4","/mnt/d/video/big_buck_bunny.mp4"},"/mnt/d/video/con.mp4")

	if err != nil {
		fmt.Println(err.Error())
	}
	fmt.Println(result)

#音频支持

  • 获取音频信息
  • 音频合并
  • 音频格式转换

#图像支持

golang_ffmpeg's People

Contributors

xiaonange avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

ztaozhang

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.