Skip to content

rosberry/ffmpeg

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FFMPEG

Library wrapper over ffmpeg.

Install

import "github.com/rosberry/ffmpeg"

Usage

Init:

ff := ffmpeg.New().SetPath("lib/ffmpeg")

Functions:

Get duration with encoding

func (f *FFMpeg) Duration(filePath string) (*time.Duration, error)

Get duration without encoding (not for all codecs)

func (f *FFMpeg) SimpleDuration(filePath string) (*time.Duration, error)

Trim video

func (f *FFMpeg) TrimVideo(filePath string, toFilePath string, start int, duration int) error

Get file bitrate

func (f *FFMpeg) Bitrate(filePath string) (*string, error)

Get file title

func (f *FFMpeg) Title(filePath string) (*string, error)

Get file size

func (f *FFMpeg) Size(filePath string) (uint, uint, error)

Create video thumbnail

func (f *FFMpeg) CreateThumbnail(filePath string, toFilePath string, width int, height int) error

About

This project is owned and maintained by Rosberry. We build mobile apps for users worldwide 🌏.

Check out our open source projects, read our blog or give us a high-five on 🐦 @rosberryapps.

License

This project is available under the MIT license. See the LICENSE file for more info.

About

Wrapper over ffmpeg

Topics

Resources

License

Stars

0 stars

Watchers

2 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages