https://github.com/rosberry/ffmpeg
Wrapper over ffmpeg
https://github.com/rosberry/ffmpeg
golang library
Last synced: over 1 year ago
JSON representation
Wrapper over ffmpeg
- Host: GitHub
- URL: https://github.com/rosberry/ffmpeg
- Owner: rosberry
- License: mit
- Created: 2020-09-08T06:02:36.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2021-07-01T03:42:36.000Z (about 5 years ago)
- Last Synced: 2025-01-31T13:43:04.542Z (over 1 year ago)
- Topics: golang, library
- Language: Go
- Homepage:
- Size: 80.1 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# FFMPEG
Library wrapper over ffmpeg.
## Install
```golang
import "github.com/rosberry/ffmpeg"
```
## Usage
Init:
```golang
ff := ffmpeg.New().SetPath("lib/ffmpeg")
```
*Functions:*
Get duration with encoding
```golang
func (f *FFMpeg) Duration(filePath string) (*time.Duration, error)
```
Get duration without encoding (not for all codecs)
```golang
func (f *FFMpeg) SimpleDuration(filePath string) (*time.Duration, error)
```
Trim video
```golang
func (f *FFMpeg) TrimVideo(filePath string, toFilePath string, start int, duration int) error
```
Get file bitrate
```golang
func (f *FFMpeg) Bitrate(filePath string) (*string, error)
```
Get file title
```golang
func (f *FFMpeg) Title(filePath string) (*string, error)
```
Get file size
```golang
func (f *FFMpeg) Size(filePath string) (uint, uint, error)
```
Create video thumbnail
```golang
func (f *FFMpeg) CreateThumbnail(filePath string, toFilePath string, width int, height int) error
```
## About

This project is owned and maintained by [Rosberry](http://rosberry.com). We build mobile apps for users worldwide 🌏.
Check out our [open source projects](https://github.com/rosberry), read [our blog](https://medium.com/@Rosberry) or give us a high-five on 🐦 [@rosberryapps](http://twitter.com/RosberryApps).
## License
This project is available under the MIT license. See the LICENSE file for more info.