Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
xfrr committed Nov 25, 2023
1 parent 2cfc9f1 commit 66506eb
Show file tree
Hide file tree
Showing 54 changed files with 2,770 additions and 1,980 deletions.
31 changes: 20 additions & 11 deletions .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,34 @@
name: Build & Test
on:
push:
branches: [master]
branches:
- v2
pull_request:
branches: [master]
branches:
- v2

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

steps:
- uses: actions/checkout@v4
- name: Install FFmpeg
run: |-
sudo add-apt-repository ppa:ubuntuhandbook1/ffmpeg6 -y
sudo apt-get update -y
sudo apt-get install ffmpeg -y
- 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}'
28 changes: 14 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
# 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)
[![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)
[![V2 Release](https://github.com/xfrr/goffmpeg/actions/workflows/v2.yml/badge.svg?branch=v2&event=push)](https://github.com/xfrr/goffmpeg/actions/workflows/v2.yml)
[![Code Quality](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)
[![Coverage](https://codecov.io/gh/xfrr/goffmpeg/graph/badge.svg?token=LjqrgDKO69)](https://codecov.io/gh/xfrr/goffmpeg)
[![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)
[![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] Execute ffmpeg command and get progress events
- [x] Read file and get metadata with ffprobe
- [x] Pipe Options
- [x] Global Options
- [x] Video Options
- [x] Audio Options

## Dependencies
- [FFmpeg](https://www.ffmpeg.org/)
- [FFmpeg](https://www.ffmpeg.org/) - 4.0 or higher
- [FFProbe](https://www.ffmpeg.org/ffprobe.html)

## Supported platforms
Expand All @@ -31,7 +31,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

0 comments on commit 66506eb

Please sign in to comment.