Library wrapper over ffmpeg.
import "github.com/rosberry/ffmpeg"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) errorGet 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) errorThis 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.
This project is available under the MIT license. See the LICENSE file for more info.
