Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v2 #88

Closed
wants to merge 1 commit into from
Closed

v2 #88

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 19 additions & 11 deletions .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,33 @@
name: Build & Test
on:
push:
branches: [master]
branches:
- master
- v2
pull_request:
branches: [master]
branches:
- master
- v2

jobs:
build:
build_and_test:
name: Build & Test
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Install FFmpeg
run: sudo apt-get update && sudo apt-get install ffmpeg
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: "1.21.x"
go-version: '1.21.x'
- name: Install dependencies
run: go get .
- name: Install FFmpeg
run: sudo apt-get update && sudo apt-get install ffmpeg
run: go mod download
- name: Build
run: go build -v ./...
- name: Test with the Go CLI
run: go test --failfast -v ./...
run: go build -ldflags="-s -w" -o ./bin/ ./...
- name: Test with coverage
run: go test --failfast -v ./... -coverprofile=coverage.out -covermode=atomic -coverpkg=./...
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
30 changes: 22 additions & 8 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
*.dll
*.so
*.dylib
*.key
*.keyinfo
*.pem
*.pub

# Test binary, build with `go test -c`
*.test
Expand All @@ -16,18 +20,28 @@
# main test
main-test.go

# binary
goffmpeg
coverage.out

# IDE
.DS_Store
.vscode
.idea

# Go
vendor

# Test results
*/test_results/*
!*.gitkeep
bin
build
*.log
*.out
*.test
*.prof
*.cover

# OS
*.DS_Store
*.swp
*.lock
*.tmp
*.bak

# others
**/results
**/*.json
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2018 FlooStack
Copyright (c) 2023 xfrr

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
16 changes: 14 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,19 @@

.PHONY: all
all: test

.PHONY: test build
test:
go test -v ./... -coverprofile=coverage.out -covermode=atomic -coverpkg=./...
go test --failfast -v ./... -coverprofile=coverage.out -covermode=atomic -coverpkg=./...

.PHONY: build
build:
go build -ldflags="-s -w" -o ./bin/ ./...

.PHONY: coverage-html
coverage-html:
go tool cover -html=coverage.out
go tool cover -html=coverage.out

.PHONY: coverage-total
coverage-total:
go tool cover -func=coverage.out | grep total | awk '{print $$3}'
26 changes: 12 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,20 @@
# Goffmpeg
[![Build & Test](https://github.com/xfrr/goffmpeg/actions/workflows/build_and_test.yml/badge.svg)](https://github.com/xfrr/goffmpeg/actions/workflows/build_and_test.yml)
[![Build & Test](https://github.com/xfrr/goffmpeg/v2/actions/workflows/build_and_test.yml/badge.svg)](https://github.com/xfrr/goffmpeg/v2/actions/workflows/build_and_test.yml)
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/93e018e5008b4439acbb30d715b22e7f)](https://www.codacy.com/app/francisco.romero/goffmpeg?utm_source=github.com&utm_medium=referral&utm_content=xfrr/goffmpeg&utm_campaign=Badge_Grade)
[![Go Report Card](https://goreportcard.com/badge/github.com/xfrr/goffmpeg)](https://goreportcard.com/report/github.com/xfrr/goffmpeg)
[![GoDoc](https://godoc.org/github.com/xfrr/goffmpeg?status.svg)](https://godoc.org/github.com/xfrr/goffmpeg)
[![Go Report Card](https://goreportcard.com/badge/github.com/xfrr/goffmpeg/v2)](https://goreportcard.com/report/github.com/xfrr/goffmpeg/v2)
[![GoDoc](https://godoc.org/github.com/xfrr/goffmpeg/v2?status.svg)](https://godoc.org/github.com/xfrr/goffmpeg/v2)
[![License](https://img.shields.io/badge/License-MIT-blue.svg)](./LICENSE)

FFMPEG wrapper written in GO
FFMPEG wrapper written in the Go

## Features
## Supported features

- [x] Transcoding
- [x] Streaming
- [x] Progress
- [x] Filters
- [x] Thumbnails
- [x] Watermark
- [ ] Concatenation
- [ ] Subtitles
- [x] Decode & Output Progress
- [x] Get File Metadata
- [x] Pipe Options
- [x] Global Options
- [x] Video Options
- [x] Audio Options

## Dependencies
- [FFmpeg](https://www.ffmpeg.org/)
Expand All @@ -31,7 +29,7 @@ FFMPEG wrapper written in GO
## Installation
Install the package with the following command:
```shell
go get github.com/xfrr/goffmpeg
go get github.com/xfrr/goffmpeg/v2
```

## Usage
Expand Down
67 changes: 0 additions & 67 deletions config.go

This file was deleted.

18 changes: 0 additions & 18 deletions config_test.go

This file was deleted.

Binary file removed e2e/fixtures/input.3gp
Binary file not shown.
Empty file removed e2e/test_results/.gitkeep
Empty file.
63 changes: 0 additions & 63 deletions e2e/transcoding_test.go

This file was deleted.

Binary file removed examples/fixtures/input.3gp
Binary file not shown.
Loading
Loading