From 7d6d7341d581016a8cb982a3901f0f0bf497edd6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Boulanouar?= Date: Thu, 15 Dec 2022 18:40:36 +0100 Subject: [PATCH 01/18] doc: update readme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index edee65d..685a5ad 100644 --- a/README.md +++ b/README.md @@ -64,7 +64,7 @@ At the end of the road this section should either disappear or be full of `Yes` | Clip | scale | Yes ✅| | | Clip | position | Yes ✅ | | | Clip | offset | Not yet | | -| Clip | transition | Not yet | | +| Clip | transition | Yes ✅ | | | Clip | effect | Not yet | | | Clip | filter | Not yet | | | Clip | opacity | Not yet | | From 8e96bd4755f92e7fb388c21ef1d3bd3ddf635e56 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Boulanouar?= Date: Thu, 15 Dec 2022 18:41:06 +0100 Subject: [PATCH 02/18] fix: add Fast & Slow possible values --- go/model_transition.go | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/go/model_transition.go b/go/model_transition.go index 1ea3e53..45e92f0 100644 --- a/go/model_transition.go +++ b/go/model_transition.go @@ -51,13 +51,19 @@ func NewTransition(m map[string]interface{}) *Transition { } func (s *Transition) checkEnumValues() error { - inValues := []string{"fade", "reveal", "wipeLeft", "wipeRight", "slideLeft", "slideRight", "slideUp", "slideDown", "carouselLeft", "carouselRight", "carouselUp", "carouselDown", "shuffleTopRight", "shuffleRightTop", "shuffleRightBottom", "shuffleBottomRight", "shuffleBottomLeft", "shuffleLeftBottom", "shuffleLeftTop", "zoom"} - if s.In != "" && !slices.Contains(inValues, s.In) { + values := []string{"fade", "reveal", "wipeLeft", "wipeRight", "slideLeft", "slideRight", "slideUp", "slideDown", "carouselLeft", "carouselRight", "carouselUp", "carouselDown", "shuffleTopRight", "shuffleRightTop", "shuffleRightBottom", "shuffleBottomRight", "shuffleBottomLeft", "shuffleLeftBottom", "shuffleLeftTop", "zoom"} + valuesFast := []string{} + valuesSlow := []string{} + for _, value := range values { + valuesFast = append(valuesFast, value+"Fast") + valuesSlow = append(valuesSlow, value+"Slow") + } + + if s.In != "" && !slices.Contains(values, s.In) && !slices.Contains(valuesFast, s.In) && !slices.Contains(valuesSlow, s.In) { return &EnumError{Schema: "Transition", Field: "In", Value: s.In} } - outValues := []string{"fade", "reveal", "wipeLeft", "wipeRight", "slideLeft", "slideRight", "slideUp", "slideDown", "carouselLeft", "carouselRight", "carouselUp", "carouselDown", "shuffleTopRight", "shuffleRightTop", "shuffleRightBottom", "shuffleBottomRight", "shuffleBottomLeft", "shuffleLeftBottom", "shuffleLeftTop", "zoom"} - if s.Out != "" && !slices.Contains(outValues, s.Out) { + if s.Out != "" && !slices.Contains(values, s.Out) && !slices.Contains(valuesFast, s.Out) && !slices.Contains(valuesSlow, s.Out) { return &EnumError{Schema: "Transition", Field: "Out", Value: s.Out} } From 69425ad3043c3b0f74d0b92aefeab9d1b39f65e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Boulanouar?= Date: Thu, 15 Dec 2022 18:45:04 +0100 Subject: [PATCH 03/18] chore: update cSpell --- .vscode/settings.json | 1 + 1 file changed, 1 insertion(+) diff --git a/.vscode/settings.json b/.vscode/settings.json index 214ee3e..3ee82f1 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -30,6 +30,7 @@ "godox", "gofmt", "goimports", + "golangci", "golint", "goreleaser", "govet", From 2dcd3c4a5a0d8758f8296093be8edbcf2d399f9f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Boulanouar?= Date: Thu, 15 Dec 2022 19:01:48 +0100 Subject: [PATCH 04/18] chore: update go version and dependencies --- .github/workflows/ginkgo.yml | 4 ++-- .github/workflows/golangci-lint.yml | 2 +- .github/workflows/goreleaser.yml | 2 +- .golangci.yml | 6 +++--- Dockerfile | 2 +- README.md | 8 ++++---- go.mod | 15 ++++++++------- go.sum | 26 ++++++++++++++------------ 8 files changed, 34 insertions(+), 31 deletions(-) diff --git a/.github/workflows/ginkgo.yml b/.github/workflows/ginkgo.yml index 72b3857..b6216e5 100644 --- a/.github/workflows/ginkgo.yml +++ b/.github/workflows/ginkgo.yml @@ -16,7 +16,7 @@ jobs: - uses: actions/setup-go@v3 with: - go-version: 1.18 + go-version: 1.19 - name: Checkout uses: actions/checkout@v3 @@ -44,7 +44,7 @@ jobs: - uses: actions/setup-go@v3 with: - go-version: '1.18' + go-version: '1.19' - name: Checkout uses: actions/checkout@v3 diff --git a/.github/workflows/golangci-lint.yml b/.github/workflows/golangci-lint.yml index 340ab19..ff22988 100644 --- a/.github/workflows/golangci-lint.yml +++ b/.github/workflows/golangci-lint.yml @@ -16,7 +16,7 @@ jobs: steps: - uses: actions/setup-go@v3 with: - go-version: 1.18 + go-version: 1.19 - uses: actions/checkout@v3 with: fetch-depth: 2 diff --git a/.github/workflows/goreleaser.yml b/.github/workflows/goreleaser.yml index f8177f8..80c7549 100644 --- a/.github/workflows/goreleaser.yml +++ b/.github/workflows/goreleaser.yml @@ -16,7 +16,7 @@ jobs: - uses: actions/setup-go@v3 with: - go-version: 1.18 + go-version: 1.19 - name: Compile the source uses: goreleaser/goreleaser-action@v2 diff --git a/.golangci.yml b/.golangci.yml index 81d463a..572eb76 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -11,12 +11,12 @@ linters: - staticcheck - unused - gosimple - - structcheck # waiting for compatibility with Go 1.18 + - structcheck # waiting for compatibility with Go 1.19 - varcheck - ineffassign - deadcode - typecheck - - bodyclose # waiting for compatibility with Go 1.18 + - bodyclose # waiting for compatibility with Go 1.19 - revive - stylecheck - gosec @@ -30,7 +30,7 @@ linters: - depguard - misspell - lll - - unparam # waiting for compatibility with Go 1.18 + - unparam # waiting for compatibility with Go 1.19 - dogsled # - funlen - gochecknoinits diff --git a/Dockerfile b/Dockerfile index 322079a..da765cc 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.18 AS build +FROM golang:1.19 AS build WORKDIR /go/src COPY go ./go COPY main.go . diff --git a/README.md b/README.md index 685a5ad..cddff89 100644 --- a/README.md +++ b/README.md @@ -142,7 +142,7 @@ To ensure, the changelog are well generated, please use prefix in your commit me And if you `really` need to commit something that is not working `wip` ou `test` are your friends. ### Install development tools -* [Go 1.18](https://go.dev/doc/install) +* [Go 1.19](https://go.dev/doc/install) * [FFMPEG (v5 or up)](https://ffmpeg.org/download.html) * [gifski](https://github.com/ImageOptim/gifski) (For high quality GIF) * [ginkgo](https://onsi.github.io/ginkgo/#installing-ginkgo) @@ -152,17 +152,17 @@ And if you `really` need to commit something that is not working `wip` ou `test` ### Testing and building To run the tests (solo execution): -```golang +```bash ginkgo -r --randomize-all --randomize-suites --race --trace -cover ``` To run the tests during development: -```golang +```bash ginkgo watch -r --randomize-all --race --trace ``` To build the program: -```golang +```bash go build ``` diff --git a/go.mod b/go.mod index 4104491..d9e71d1 100644 --- a/go.mod +++ b/go.mod @@ -1,21 +1,22 @@ module github.com/DblK/shottower -go 1.18 +go 1.19 require ( github.com/creasty/defaults v1.6.0 github.com/google/uuid v1.3.0 github.com/gorilla/mux v1.7.3 - github.com/onsi/ginkgo/v2 v2.1.4 - github.com/onsi/gomega v1.20.0 + github.com/onsi/ginkgo/v2 v2.6.1 + github.com/onsi/gomega v1.24.2 github.com/spf13/cast v1.5.0 golang.org/x/exp v0.0.0-20220613132600-b0d781184e0d ) require ( - github.com/google/go-cmp v0.5.8 // indirect - golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4 // indirect - golang.org/x/sys v0.0.0-20220422013727-9388b58f7150 // indirect - golang.org/x/text v0.3.7 // indirect + github.com/go-logr/logr v1.2.3 // indirect + github.com/google/go-cmp v0.5.9 // indirect + golang.org/x/net v0.4.0 // indirect + golang.org/x/sys v0.3.0 // indirect + golang.org/x/text v0.5.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/go.sum b/go.sum index 4e051f5..b8e4b15 100644 --- a/go.sum +++ b/go.sum @@ -1,30 +1,32 @@ github.com/creasty/defaults v1.6.0 h1:ltuE9cfphUtlrBeomuu8PEyISTXnxqkBIoQfXgv7BSc= github.com/creasty/defaults v1.6.0/go.mod h1:iGzKe6pbEHnpMPtfDXZEr0NVxWnPTjb1bbDy08fPzYM= github.com/frankban/quicktest v1.14.3 h1:FJKSZTDHjyhriyC81FLQ0LY93eSai0ZyR/ZIkd3ZUKE= +github.com/go-logr/logr v1.2.3 h1:2DntVwHkVopvECVRSlL5PSo9eG+cAkDCuckLubN+rq0= +github.com/go-logr/logr v1.2.3/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= -github.com/google/go-cmp v0.5.8 h1:e6P7q2lk1O+qJJb4BtCQXlK8vWEO8V1ZeuEdJNOqZyg= -github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= +github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/gorilla/mux v1.7.3 h1:gnP5JzjVOuiZD07fKKToCAOjS0yOpj/qPETTXCCS6hw= github.com/gorilla/mux v1.7.3/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= -github.com/onsi/ginkgo/v2 v2.1.4 h1:GNapqRSid3zijZ9H77KrgVG4/8KqiyRsxcSxe+7ApXY= -github.com/onsi/ginkgo/v2 v2.1.4/go.mod h1:um6tUpWM/cxCK3/FK8BXqEiUMUwRgSM4JXG47RKZmLU= -github.com/onsi/gomega v1.20.0 h1:8W0cWlwFkflGPLltQvLRB7ZVD5HuP6ng320w2IS245Q= -github.com/onsi/gomega v1.20.0/go.mod h1:DtrZpjmvpn2mPm4YWQa0/ALMDj9v4YxLgojwPeREyVo= +github.com/onsi/ginkgo/v2 v2.6.1 h1:1xQPCjcqYw/J5LchOcp4/2q/jzJFjiAOc25chhnDw+Q= +github.com/onsi/ginkgo/v2 v2.6.1/go.mod h1:yjiuMwPokqY1XauOgju45q3sJt6VzQ/Fict1LFVcsAo= +github.com/onsi/gomega v1.24.2 h1:J/tulyYK6JwBldPViHJReihxxZ+22FHs0piGjQAvoUE= +github.com/onsi/gomega v1.24.2/go.mod h1:gs3J10IS7Z7r7eXRoNJIrNqU4ToQukCJhFtKrWgHWnk= github.com/rogpeppe/go-internal v1.6.1 h1:/FiVV8dS/e+YqF2JvO3yXRFbBLTIuSDkuC7aBOAvL+k= github.com/spf13/cast v1.5.0 h1:rj3WzYc11XZaIZMPKmwP96zkFEnnAmV8s6XbB2aY32w= github.com/spf13/cast v1.5.0/go.mod h1:SpXXQ5YoyJw6s3/6cMTQuxvgRl3PCJiyaX9p6b155UU= golang.org/x/exp v0.0.0-20220613132600-b0d781184e0d h1:vtUKgx8dahOomfFzLREU8nSv25YHnTgLBn4rDnWZdU0= golang.org/x/exp v0.0.0-20220613132600-b0d781184e0d/go.mod h1:Kr81I6Kryrl9sr8s2FK3vxD90NdsKWRuOIl2O4CvYbA= -golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4 h1:HVyaeDAYux4pnY+D/SiwmLOR36ewZ4iGQIIrtnuCjFA= -golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/sys v0.0.0-20220422013727-9388b58f7150 h1:xHms4gcpe1YE7A3yIllJXP16CMAGuqwO2lX1mTyyRRc= -golang.org/x/sys v0.0.0-20220422013727-9388b58f7150/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk= -golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/net v0.4.0 h1:Q5QPcMlvfxFTAPV0+07Xz/MpK9NTXu2VDUuy0FeMfaU= +golang.org/x/net v0.4.0/go.mod h1:MBQ8lrhLObU/6UmLb4fmbmk5OcyYmqtbGd/9yIeKjEE= +golang.org/x/sys v0.3.0 h1:w8ZOecv6NaNa/zC8944JTU3vz4u6Lagfk4RPQxv92NQ= +golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/text v0.5.0 h1:OLmvp0KP+FVG99Ct/qFiL/Fhk4zp4QQnZ7b2U+5piUM= +golang.org/x/text v0.5.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= google.golang.org/protobuf v1.28.0 h1:w43yiav+6bVFTBQFZX0r7ipe9JQ1QsbMgHwbBziscLw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= From 45b27a8c5dfa658347932a2700a6bf7e0f2e9a9f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Boulanouar?= Date: Fri, 16 Dec 2022 09:31:53 +0100 Subject: [PATCH 05/18] chore: update golangci-lint --- .github/workflows/golangci-lint.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/golangci-lint.yml b/.github/workflows/golangci-lint.yml index ff22988..4bc506f 100644 --- a/.github/workflows/golangci-lint.yml +++ b/.github/workflows/golangci-lint.yml @@ -31,6 +31,6 @@ jobs: - name: golangci-lint if: steps.changed-files.outputs.any_changed == 'true' - uses: golangci/golangci-lint-action@v3.2.0 + uses: golangci/golangci-lint-action@v3.3.1 with: - version: v1.48.0 \ No newline at end of file + version: v1.50.1 \ No newline at end of file From bf153fa606989c3acb0ffbca21498cb3c471bf1b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Boulanouar?= Date: Fri, 16 Dec 2022 09:32:04 +0100 Subject: [PATCH 06/18] chore: add new cSpell --- .vscode/settings.json | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index 3ee82f1..f6acb13 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -35,6 +35,7 @@ "goreleaser", "govet", "greyscale", + "horz", "HTMLAsset", "imageasset", "ineffassign", @@ -49,9 +50,11 @@ "nakedret", "nilerr", "noctx", + "nolint", "openapi", "overfiller", "Pexels", + "pixelize", "prealloc", "Rémy", "scopelint", @@ -79,7 +82,8 @@ "webm", "wipeleft", "xfade", - "yuva" + "yuva", + "zoomin" ], "go.lintTool": "golangci-lint", "go.lintOnSave": "workspace" From caac82a3f0ec5a07930489305b4c3b15952e0c50 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Boulanouar?= Date: Fri, 16 Dec 2022 09:33:46 +0100 Subject: [PATCH 07/18] feat: allow 'chore' in git commit --- .goreleaser.yml | 3 +++ README.md | 1 + 2 files changed, 4 insertions(+) diff --git a/.goreleaser.yml b/.goreleaser.yml index 36e858f..ffa0308 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -33,6 +33,9 @@ changelog: - title: 'Bug fixes' regexp: "^.*fix[(\\w)]*:+.*$" order: 1 + - title: 'Chores' + regexp: "^.*chore[(\\w)]*:+.*$" + order: 2 - title: Others order: 999 sort: asc diff --git a/README.md b/README.md index cddff89..e224b5b 100644 --- a/README.md +++ b/README.md @@ -137,6 +137,7 @@ Check out the `.golangci.yml` to see the specific configuration. To ensure, the changelog are well generated, please use prefix in your commit message as follow: - `feat`, `features`, `feature`: For new features - `fix`: For any fix +- `chore`: For golang updates or dep updates - `doc`, `docs`: For any update in documentation (README, etc...) And if you `really` need to commit something that is not working `wip` ou `test` are your friends. From 6a49f5e6773690e78a85e4cdcc799f99f1dc715f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Boulanouar?= Date: Fri, 16 Dec 2022 10:46:01 +0100 Subject: [PATCH 08/18] doc: add information about missing transitions --- .vscode/settings.json | 1 + README.md | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index f6acb13..6a1f544 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -38,6 +38,7 @@ "horz", "HTMLAsset", "imageasset", + "incpatch", "ineffassign", "kenburns", "lavfi", diff --git a/README.md b/README.md index e224b5b..e53527c 100644 --- a/README.md +++ b/README.md @@ -41,6 +41,7 @@ If you would like to sponsor features, bugs or prioritization, reach out to one * 😎 Add an endpoint `/dl/{version}/renders/:id` to download renders (instead of cdn/s3) * 😎 Add other values for resolution (`360`, `480`, `540`, `720`) all with default `25 fps`. * 😎 Add other values for output quality (`highest`, `lowest`). +* 😎 Add missing transitions from `ffmpeg` (`fadeBlack`, `fadeWhite`, `distance`, `wipeUp`, `wipeDown`, `smoothLeft`, `smoothRight`, `smoothUp`, `smoothDown`, `circleCrop`, `rectCrop`, `circleClose`, `circleOpen`, `horzClose`, `horzOpen`, `vertClose`, `vertOpen`, `diagBottomLeft`, `diagBottomRight`, `diagTopLeft`, `diagTopRight`, `horizontalLeftSlice`, `horizontalRightSlice`, `verticalUpSlice`, `verticalDownSlice`, `dissolve`, `pixelize`, `radial`, `horizontalBlur`, `wipeTopLeft`, `wipeTopRight`, `wipeBottomLeft`, `wipeBottomRight`, `fadeGrays`, `squeezeVertical`, `squeezeHorizontal`) * [`Planned`] Allow to use ftp file from `url` filed (`ftp://user:password@dblk.org/mypath/my_asset`) * [`Planned`] Add destination to Youtube @@ -64,7 +65,7 @@ At the end of the road this section should either disappear or be full of `Yes` | Clip | scale | Yes ✅| | | Clip | position | Yes ✅ | | | Clip | offset | Not yet | | -| Clip | transition | Yes ✅ | | +| Clip | transition | Partial 🛠 | Missing `shuffleXXX` transitions | | Clip | effect | Not yet | | | Clip | filter | Not yet | | | Clip | opacity | Not yet | | From 7e0475bbb0bb5421d0f4c2242dfc799901166d6d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Boulanouar?= Date: Fri, 16 Dec 2022 11:24:50 +0100 Subject: [PATCH 09/18] doc: add available transitions --- api/openapi.yaml | 218 ++++++++++++++++++++++++++++++++++++++++- go/model_transition.go | 63 +++++++++++- 2 files changed, 276 insertions(+), 5 deletions(-) diff --git a/api/openapi.yaml b/api/openapi.yaml index 9ce62c4..da5f590 100644 --- a/api/openapi.yaml +++ b/api/openapi.yaml @@ -1,6 +1,6 @@ openapi: 3.0.0 info: - description: "Shottowwer is the open source version of Shotstack which is a video, image and audio editing service that allows\ + description: "Shottower is the open source version of Shotstack which is a video, image and audio editing service that allows\ \ for the automated\ngeneration of videos, images and audio using JSON and a RESTful\ \ API.\n\nYou arrange and configure an edit and POST it to the API which will\ \ render your media and provide a file \nlocation when complete.\n\nFor more details\ @@ -1402,6 +1402,114 @@ components: - shuffleTopLeftSlow - shuffleTopLeftFast - zoom + - fadeBlack + - fadeBlackSlow + - fadeBlackFast + - fadeWhite + - fadeWhiteSlow + - fadeWhiteFast + - distance + - distanceSlow + - distanceFast + - wipeUp + - wipeUpSlow + - wipeUpFast + - wipeDown + - wipeDownSlow + - wipeDownFast + - smoothLeft + - smoothLeftSlow + - smoothLeftFast + - smoothRight + - smoothRightSlow + - smoothRightFast + - smoothUp + - smoothUpSlow + - smoothUpFast + - smoothDown + - smoothDownSlow + - smoothDownFast + - circleCrop + - circleCropSlow + - circleCropFast + - rectCrop + - rectCropSlow + - rectCropFast + - circleClose + - circleCloseSlow + - circleCloseFast + - circleOpen + - circleOpenSlow + - circleOpenFast + - horzClose + - horzCloseSlow + - horzCloseFast + - horzOpen + - horzOpenSlow + - horzOpenFast + - vertClose + - vertCloseSlow + - vertCloseFast + - vertOpen + - vertOpenSlow + - vertOpenFast + - diagBottomLeft + - diagBottomLeftSlow + - diagBottomLeftFast + - diagBottomRight + - diagBottomRightSlow + - diagBottomRightFast + - diagTopLeft + - diagTopLeftSlow + - diagTopLeftFast + - diagTopRight + - diagTopRightSlow + - diagTopRightFast + - horizontalLeftSlice + - horizontalLeftSliceSlow + - horizontalLeftSliceFast + - horizontalRightSlice + - horizontalRightSliceSlow + - horizontalRightSliceFast + - verticalUpSlice + - verticalUpSliceSlow + - verticalUpSliceFast + - verticalDownSlice + - verticalDownSliceSlow + - verticalDownSliceFast + - dissolve + - dissolveSlow + - dissolveFast + - pixelize + - pixelizeSlow + - pixelizeFast + - radial + - radialSlow + - radialFast + - horizontalBlur + - horizontalBlurSlow + - horizontalBlurFast + - wipeTopLeft + - wipeTopLeftSlow + - wipeTopLeftFast + - wipeTopRight + - wipeTopRightSlow + - wipeTopRightFast + - wipeBottomLeft + - wipeBottomLeftSlow + - wipeBottomLeftFast + - wipeBottomRight + - wipeBottomRightSlow + - wipeBottomRightFast + - fadeGrays + - fadeGraysSlow + - fadeGraysFast + - squeezeVertical + - squeezeVerticalSlow + - squeezeVerticalFast + - squeezeHorizontal + - squeezeHorizontalSlow + - squeezeHorizontalFast type: string out: description: "The transition out. Available transitions are:\n
    \n \ @@ -1486,6 +1594,114 @@ components: - shuffleTopLeftSlow - shuffleTopLeftFast - zoom + - fadeBlack + - fadeBlackSlow + - fadeBlackFast + - fadeWhite + - fadeWhiteSlow + - fadeWhiteFast + - distance + - distanceSlow + - distanceFast + - wipeUp + - wipeUpSlow + - wipeUpFast + - wipeDown + - wipeDownSlow + - wipeDownFast + - smoothLeft + - smoothLeftSlow + - smoothLeftFast + - smoothRight + - smoothRightSlow + - smoothRightFast + - smoothUp + - smoothUpSlow + - smoothUpFast + - smoothDown + - smoothDownSlow + - smoothDownFast + - circleCrop + - circleCropSlow + - circleCropFast + - rectCrop + - rectCropSlow + - rectCropFast + - circleClose + - circleCloseSlow + - circleCloseFast + - circleOpen + - circleOpenSlow + - circleOpenFast + - horzClose + - horzCloseSlow + - horzCloseFast + - horzOpen + - horzOpenSlow + - horzOpenFast + - vertClose + - vertCloseSlow + - vertCloseFast + - vertOpen + - vertOpenSlow + - vertOpenFast + - diagBottomLeft + - diagBottomLeftSlow + - diagBottomLeftFast + - diagBottomRight + - diagBottomRightSlow + - diagBottomRightFast + - diagTopLeft + - diagTopLeftSlow + - diagTopLeftFast + - diagTopRight + - diagTopRightSlow + - diagTopRightFast + - horizontalLeftSlice + - horizontalLeftSliceSlow + - horizontalLeftSliceFast + - horizontalRightSlice + - horizontalRightSliceSlow + - horizontalRightSliceFast + - verticalUpSlice + - verticalUpSliceSlow + - verticalUpSliceFast + - verticalDownSlice + - verticalDownSliceSlow + - verticalDownSliceFast + - dissolve + - dissolveSlow + - dissolveFast + - pixelize + - pixelizeSlow + - pixelizeFast + - radial + - radialSlow + - radialFast + - horizontalBlur + - horizontalBlurSlow + - horizontalBlurFast + - wipeTopLeft + - wipeTopLeftSlow + - wipeTopLeftFast + - wipeTopRight + - wipeTopRightSlow + - wipeTopRightFast + - wipeBottomLeft + - wipeBottomLeftSlow + - wipeBottomLeftFast + - wipeBottomRight + - wipeBottomRightSlow + - wipeBottomRightFast + - fadeGrays + - fadeGraysSlow + - fadeGraysFast + - squeezeVertical + - squeezeVerticalSlow + - squeezeVerticalFast + - squeezeHorizontal + - squeezeHorizontalSlow + - squeezeHorizontalFast type: string type: object Offset: diff --git a/go/model_transition.go b/go/model_transition.go index 45e92f0..7e47e13 100644 --- a/go/model_transition.go +++ b/go/model_transition.go @@ -26,7 +26,11 @@ along with this program. If not, see . package openapi -import "golang.org/x/exp/slices" +import ( + "strings" + + "golang.org/x/exp/slices" +) // Transition - In and out transitions for a clip - i.e. fade in and fade out type Transition struct { @@ -50,13 +54,64 @@ func NewTransition(m map[string]interface{}) *Transition { return transition } +func (s *Transition) ConvertTransitionName(t string) string { + newTransition := t + + // shotstack renamed transitions + if newTransition[0:7] == "carousel" { + newTransition = strings.Replace(newTransition, "carousel", "slide", 1) + } + switch newTransition { + case "reveal": + newTransition = "wipeLeft" + case "zoom": + newTransition = "zoomIn" + // missing ffmpeg transitions + case "diagBottomLeft": + newTransition = "diagBl" + case "diagBottomRight": + newTransition = "diagBr" + case "diagTopLeft": + newTransition = "diagTl" + case "diagTopRight": + newTransition = "diagTr" + case "horizontalLeftSlice": + newTransition = "hlSlice" + case "horizontalRightSlice": + newTransition = "hrSlice" + case "verticalUpSlice": + newTransition = "vuSlice" + case "verticalDownSlice": + newTransition = "vdSlice" + case "horizontalBlur": + newTransition = "hBlur" + case "wipeTopLeft": + newTransition = "wipeTl" + case "wipeTopRight": + newTransition = "wipeTr" + case "wipeBottomLeft": + newTransition = "wipeBl" + case "wipeBottomRight": + newTransition = "wipeBr" + case "squeezeVertical": + newTransition = "squeezeV" + case "squeezeHorizontal": + newTransition = "squeezeH" + } + + return strings.ToLower(newTransition) +} + func (s *Transition) checkEnumValues() error { - values := []string{"fade", "reveal", "wipeLeft", "wipeRight", "slideLeft", "slideRight", "slideUp", "slideDown", "carouselLeft", "carouselRight", "carouselUp", "carouselDown", "shuffleTopRight", "shuffleRightTop", "shuffleRightBottom", "shuffleBottomRight", "shuffleBottomLeft", "shuffleLeftBottom", "shuffleLeftTop", "zoom"} + // TODO: Add unsupported "shuffleTopRight", "shuffleRightTop", "shuffleRightBottom", "shuffleBottomRight", "shuffleBottomLeft", "shuffleLeftBottom", "shuffleLeftTop" + values := []string{"fade", "reveal", "wipeLeft", "wipeRight", "slideLeft", "slideRight", "slideUp", "slideDown", "carouselLeft", "carouselRight", "carouselUp", "carouselDown", "zoom", "fadeBlack", "fadeWhite", "distance", "wipeUp", "wipeDown", "smoothLeft", "smoothRight", "smoothUp", "smoothDown", "circleCrop", "rectCrop", "circleClose", "circleOpen", "horzClose", "horzOpen", "vertClose", "vertOpen", "diagBottomLeft", "diagBottomRight", "diagTopLeft", "diagTopRight", "horizontalLeftSlice", "horizontalRightSlice", "verticalUpSlice", "verticalDownSlice", "dissolve", "pixelize", "radial", "horizontalBlur", "wipeTopLeft", "wipeTopRight", "wipeBottomLeft", "wipeBottomRight", "fadeGrays", "squeezeVertical", "squeezeHorizontal"} valuesFast := []string{} valuesSlow := []string{} for _, value := range values { - valuesFast = append(valuesFast, value+"Fast") - valuesSlow = append(valuesSlow, value+"Slow") + if value != "zoom" { + valuesFast = append(valuesFast, value+"Fast") + valuesSlow = append(valuesSlow, value+"Slow") + } } if s.In != "" && !slices.Contains(values, s.In) && !slices.Contains(valuesFast, s.In) && !slices.Contains(valuesSlow, s.In) { From 68316f6ad3226016d4c3145f2758312a7ed05807 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Boulanouar?= Date: Fri, 16 Dec 2022 11:33:55 +0100 Subject: [PATCH 10/18] doc: improve readme with emojis --- .github/workflows/contributors.yml | 2 +- README.md | 32 ++++++++++++++++-------------- 2 files changed, 18 insertions(+), 16 deletions(-) diff --git a/.github/workflows/contributors.yml b/.github/workflows/contributors.yml index 36e6ca2..aa10b57 100644 --- a/.github/workflows/contributors.yml +++ b/.github/workflows/contributors.yml @@ -24,7 +24,7 @@ jobs: run: git checkout master - uses: BobAnkh/add-contributors@v0.2.2 with: - CONTRIBUTOR: "## Contributors" + CONTRIBUTOR: "## 🤝 Contributors" COLUMN_PER_ROW: "6" ACCESS_TOKEN: ${{secrets.GITHUB_TOKEN}} IMG_WIDTH: "100" diff --git a/README.md b/README.md index e53527c..1e50201 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ An open source, self-hosted implementation of the Shotstack backend server. Join our [Discord](https://discord.gg/GCXCNHRC) server for a chat. -## What is ShotStack +## 🔍 What is ShotStack ShotStack is a video editing API that allow to build dynamic Video Applications at Scale. @@ -21,18 +21,19 @@ Everything in ShotStack is Open Source, except the Dashboard and the backend ser The backend server translate JSON to FFMPEG commands and serve the result. -## Design goal +## 🎯 Design goal `shottower` aims to implement a self-hosted, open source alternative to the Shotstack backend server. `shottower` has a narrower scope and are not built for heavy transcode (but pull request are welcome!). `shottower` uses terms that maps to Shotstack's API, consult the glossary for explanations. -## Support + +## 🙏 Support If you like `shottower` and find it useful, there is a sponsorship and donation buttons available in the repo. If you would like to sponsor features, bugs or prioritization, reach out to one of the maintainers. -## Features (Basic + Exclusive 😎) +## 💡 Features (Basic + Exclusive 😎) * "Basic" (`Track`, `Clip`, `VideoAsset`, ...) support of Shotstack's features (See bellow for progress) * Use only the `stage` endpoint value until all features are implemented (See https://github.com/DblK/shottower/issues/1 for multiple endpoint handling) @@ -45,7 +46,7 @@ If you would like to sponsor features, bugs or prioritization, reach out to one * [`Planned`] Allow to use ftp file from `url` filed (`ftp://user:password@dblk.org/mypath/my_asset`) * [`Planned`] Add destination to Youtube -### Shotstack implementation progress +### 🏃🏻‍♂️ Shotstack implementation progress In the following matrix, there is only components than their implementation have been started. At the end of the road this section should either disappear or be full of `Yes` 😇. @@ -94,7 +95,7 @@ At the end of the road this section should either disappear or be full of `Yes` | Output | destinations | Not yet | | | Callback | | Yes ✅ | | -#### Endpoint implementation +#### 𐫰 Endpoint implementation There are several endpoints that are available but not all of them are implemented. @@ -112,20 +113,21 @@ There are several endpoints that are available but not all of them are implement | Serve | Get Asset | Partial 🛠 | | | Serve | Delete Asset | Not yet | | | Serve | Get Asset by Render ID | Not yet | | -## Running shottower + +## 📄 Running shottower Please have a look at the documentation under `docs/`. -## Disclaimer +## ⚠️ Disclaimer 1. We have nothing to do with shotstack 2. The purpose of ShotTower is maintaining a working, self-hosted Shotstack api compatible backend. -## Contributing +## 👨🏻‍💻 Contributing To contribute to shottower you would need the latest version of Go. -### Code style +### 🏛️ Code style To ensure we have some consistency with contributions, this project has adopted linting and style/formatting rules: @@ -133,7 +135,7 @@ The **Go** code is linted with [`golangci-lint`](https://golangci-lint.run). Check out the `.golangci.yml` to see the specific configuration. -### Commit message +### ✏️ Commit message To ensure, the changelog are well generated, please use prefix in your commit message as follow: - `feat`, `features`, `feature`: For new features @@ -143,7 +145,7 @@ To ensure, the changelog are well generated, please use prefix in your commit me And if you `really` need to commit something that is not working `wip` ou `test` are your friends. -### Install development tools +### 🛠️ Install development tools * [Go 1.19](https://go.dev/doc/install) * [FFMPEG (v5 or up)](https://ffmpeg.org/download.html) * [gifski](https://github.com/ImageOptim/gifski) (For high quality GIF) @@ -151,7 +153,7 @@ And if you `really` need to commit something that is not working `wip` ou `test` * [golangci-lint](https://golangci-lint.run/usage/install/) * (optional) I recommend using [gow](https://github.com/mitranim/gow) -### Testing and building +### 🧪 Testing and 🧱 building To run the tests (solo execution): ```bash @@ -168,7 +170,7 @@ To build the program: go build ``` -### Running the server +### 💻 Running the server To run the server, follow these simple steps: @@ -186,7 +188,7 @@ Once image is built use docker run --rm -it shottower ``` -## Contributors +## 🤝 Contributors From 54322a333f26247b7310f56a2a0690f7c3fd876a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Boulanouar?= Date: Fri, 16 Dec 2022 11:38:11 +0100 Subject: [PATCH 11/18] doc: add more information for docker --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 1e50201..6512af3 100644 --- a/README.md +++ b/README.md @@ -178,12 +178,12 @@ To run the server, follow these simple steps: go run main.go ``` -To run the server in a docker container +To run the server in a docker container (⚠️ Image should not fully work see [#2](https://github.com/DblK/shottower/issues/2)): ``` docker build --network=host -t shottower . ``` -Once image is built use +Once image is built use: ``` docker run --rm -it shottower ``` From 5d8c0466b8e0d4afdc36f05d1320080549d810b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Boulanouar?= Date: Fri, 16 Dec 2022 17:55:18 +0100 Subject: [PATCH 12/18] chore: add tests for ClipSubtitleBurn --- .vscode/settings.json | 1 + go/ffmpeg.go | 3 +-- go/ffmpeg_test.go | 17 +++++++++++++++++ 3 files changed, 19 insertions(+), 2 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index 6a1f544..acf1f58 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -64,6 +64,7 @@ "shottower", "STARTPTS", "staticcheck", + "strack", "structcheck", "stylecheck", "titleasset", diff --git a/go/ffmpeg.go b/go/ffmpeg.go index eb979db..e69ecfd 100644 --- a/go/ffmpeg.go +++ b/go/ffmpeg.go @@ -548,8 +548,7 @@ func (s *FFMPEG) ToFFMPEG(renderQueue *RenderQueue, queue *ProcessingQueue) erro _ = s.AddTrack(trackNumber) for iClip, clip := range track.Clips { - // for cIndex, clip := range track.Clips { - // fmt.Println(cIndex) + // fmt.Println(iClip) if clip.Start > lastStart { // fmt.Println("Add filler clip") diff --git a/go/ffmpeg_test.go b/go/ffmpeg_test.go index 22c12f3..bcfdf23 100644 --- a/go/ffmpeg_test.go +++ b/go/ffmpeg_test.go @@ -276,4 +276,21 @@ var _ = Describe("Ffmpeg", func() { Expect(res).To(Equal("[1:a] atrim=start=5:end=9.96, asetpts=PTS-STARTPTS [atrack0c1p0];[atrack0c1p0] volume=0.5 [atrack0c1p1];[filler] [atrack0c1p1] amix=inputs=2 [atrack0c1];")) }) }) + Describe("ClipSubtitleBurn", func() { + var ff openapi.FFMPEGCommand + BeforeEach(func() { + ff = openapi.NewFFMPEGCommand() + _ = ff.AddSource("/dev/test.mkv", false) + }) + + It("Should merge subtitle track with video", func() { + var sourceClip = 0 + var trackNumber = 0 + var clipNumber = 0 + var index = 0 + + res := ff.ClipSubtitleBurn(sourceClip, trackNumber, clipNumber, index) + Expect(res).To(Equal("subtitles='/dev/test.mkv':stream_index=0[strack0c0]; [0:v] [strack0c0] overlay [vtrack0c0];")) + }) + }) }) From 46b4b092f5bcec1fdcfdfbf25e1daf66b12069ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Boulanouar?= Date: Thu, 5 Jan 2023 09:07:26 +0100 Subject: [PATCH 13/18] Update copyright --- config/config.go | 2 +- go/api.go | 2 +- go/api_download.go | 2 +- go/api_download_service.go | 2 +- go/api_edit.go | 2 +- go/api_edit_service.go | 2 +- go/api_serve.go | 2 +- go/api_serve_service.go | 2 +- go/error.go | 2 +- go/ffmpeg.go | 2 +- go/ffmpeg_test.go | 2 +- go/go_suite_test.go | 2 +- go/helpers.go | 2 +- go/impl.go | 2 +- go/logger.go | 2 +- go/model_asset.go | 2 +- go/model_asset_render_response.go | 2 +- go/model_asset_response.go | 2 +- go/model_asset_response_attributes.go | 2 +- go/model_asset_response_data.go | 2 +- go/model_audio_asset.go | 2 +- go/model_clip.go | 2 +- go/model_crop.go | 2 +- go/model_destinations.go | 2 +- go/model_edit.go | 2 +- go/model_ffmpeg.go | 2 +- go/model_flip_transformation.go | 2 +- go/model_font.go | 2 +- go/model_html_asset.go | 2 +- go/model_image_asset.go | 2 +- go/model_localresource.go | 2 +- go/model_luma_asset.go | 2 +- go/model_merge_field.go | 2 +- go/model_mux_destination.go | 2 +- go/model_mux_destination_options.go | 2 +- go/model_offset.go | 2 +- go/model_output.go | 2 +- go/model_poster.go | 2 +- go/model_probe_response.go | 2 +- go/model_queued_response.go | 2 +- go/model_queued_response_data.go | 2 +- go/model_range.go | 2 +- go/model_render_queue.go | 2 +- go/model_render_response.go | 2 +- go/model_render_response_data.go | 2 +- go/model_rotate_transformation.go | 2 +- go/model_shotstack_destination.go | 2 +- go/model_size.go | 2 +- go/model_skew_transformation.go | 2 +- go/model_soundtrack.go | 2 +- go/model_subtitle.go | 2 +- go/model_template.go | 2 +- go/model_template_data_response.go | 2 +- go/model_template_data_response_data.go | 2 +- go/model_template_list_response.go | 2 +- go/model_template_list_response_data.go | 2 +- go/model_template_list_response_item.go | 2 +- go/model_template_render.go | 2 +- go/model_template_response.go | 2 +- go/model_template_response_data.go | 2 +- go/model_thumbnail.go | 2 +- go/model_timeline.go | 2 +- go/model_title_asset.go | 2 +- go/model_track.go | 2 +- go/model_transformation.go | 2 +- go/model_transition.go | 2 +- go/model_video_asset.go | 2 +- go/queue.go | 2 +- go/routers.go | 2 +- main.go | 2 +- 70 files changed, 70 insertions(+), 70 deletions(-) diff --git a/config/config.go b/config/config.go index b9d3bc0..5a4e412 100644 --- a/config/config.go +++ b/config/config.go @@ -1,6 +1,6 @@ /* shottower -Copyright (C) 2022 Rémy Boulanouar +Copyright (C) 2022-2023 Rémy Boulanouar This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by diff --git a/go/api.go b/go/api.go index 0bab337..6133489 100644 --- a/go/api.go +++ b/go/api.go @@ -1,6 +1,6 @@ /* shottower -Copyright (C) 2022 Rémy Boulanouar +Copyright (C) 2022-2023 Rémy Boulanouar This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by diff --git a/go/api_download.go b/go/api_download.go index 295e67e..fb7ee8f 100644 --- a/go/api_download.go +++ b/go/api_download.go @@ -1,6 +1,6 @@ /* shottower -Copyright (C) 2022 Rémy Boulanouar +Copyright (C) 2022-2023 Rémy Boulanouar This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by diff --git a/go/api_download_service.go b/go/api_download_service.go index 111b132..353ec34 100644 --- a/go/api_download_service.go +++ b/go/api_download_service.go @@ -1,6 +1,6 @@ /* shottower -Copyright (C) 2022 Rémy Boulanouar +Copyright (C) 2022-2023 Rémy Boulanouar This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by diff --git a/go/api_edit.go b/go/api_edit.go index 99e45bb..e74f9e0 100644 --- a/go/api_edit.go +++ b/go/api_edit.go @@ -1,6 +1,6 @@ /* shottower -Copyright (C) 2022 Rémy Boulanouar +Copyright (C) 2022-2023 Rémy Boulanouar This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by diff --git a/go/api_edit_service.go b/go/api_edit_service.go index bdf579d..e73f32b 100644 --- a/go/api_edit_service.go +++ b/go/api_edit_service.go @@ -1,6 +1,6 @@ /* shottower -Copyright (C) 2022 Rémy Boulanouar +Copyright (C) 2022-2023 Rémy Boulanouar This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by diff --git a/go/api_serve.go b/go/api_serve.go index f62982a..17fbf05 100644 --- a/go/api_serve.go +++ b/go/api_serve.go @@ -1,6 +1,6 @@ /* shottower -Copyright (C) 2022 Rémy Boulanouar +Copyright (C) 2022-2023 Rémy Boulanouar This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by diff --git a/go/api_serve_service.go b/go/api_serve_service.go index d645787..10493b0 100644 --- a/go/api_serve_service.go +++ b/go/api_serve_service.go @@ -1,6 +1,6 @@ /* shottower -Copyright (C) 2022 Rémy Boulanouar +Copyright (C) 2022-2023 Rémy Boulanouar This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by diff --git a/go/error.go b/go/error.go index 62bd5bc..91ec633 100644 --- a/go/error.go +++ b/go/error.go @@ -1,6 +1,6 @@ /* shottower -Copyright (C) 2022 Rémy Boulanouar +Copyright (C) 2022-2023 Rémy Boulanouar This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by diff --git a/go/ffmpeg.go b/go/ffmpeg.go index e69ecfd..15cc0f0 100644 --- a/go/ffmpeg.go +++ b/go/ffmpeg.go @@ -1,6 +1,6 @@ /* shottower -Copyright (C) 2022 Rémy Boulanouar +Copyright (C) 2022-2023 Rémy Boulanouar This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by diff --git a/go/ffmpeg_test.go b/go/ffmpeg_test.go index bcfdf23..f87c056 100644 --- a/go/ffmpeg_test.go +++ b/go/ffmpeg_test.go @@ -1,6 +1,6 @@ /* shottower -Copyright (C) 2022 Rémy Boulanouar +Copyright (C) 2022-2023 Rémy Boulanouar This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by diff --git a/go/go_suite_test.go b/go/go_suite_test.go index ce57858..a6f0008 100644 --- a/go/go_suite_test.go +++ b/go/go_suite_test.go @@ -1,6 +1,6 @@ /* shottower -Copyright (C) 2022 Rémy Boulanouar +Copyright (C) 2022-2023 Rémy Boulanouar This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by diff --git a/go/helpers.go b/go/helpers.go index 45036e3..9784b5d 100644 --- a/go/helpers.go +++ b/go/helpers.go @@ -1,6 +1,6 @@ /* shottower -Copyright (C) 2022 Rémy Boulanouar +Copyright (C) 2022-2023 Rémy Boulanouar This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by diff --git a/go/impl.go b/go/impl.go index 9e9ec6c..c8ad107 100644 --- a/go/impl.go +++ b/go/impl.go @@ -1,6 +1,6 @@ /* shottower -Copyright (C) 2022 Rémy Boulanouar +Copyright (C) 2022-2023 Rémy Boulanouar This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by diff --git a/go/logger.go b/go/logger.go index 94f2f3f..5e45b00 100644 --- a/go/logger.go +++ b/go/logger.go @@ -1,6 +1,6 @@ /* shottower -Copyright (C) 2022 Rémy Boulanouar +Copyright (C) 2022-2023 Rémy Boulanouar This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by diff --git a/go/model_asset.go b/go/model_asset.go index 6865080..b226b23 100644 --- a/go/model_asset.go +++ b/go/model_asset.go @@ -1,6 +1,6 @@ /* shottower -Copyright (C) 2022 Rémy Boulanouar +Copyright (C) 2022-2023 Rémy Boulanouar This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by diff --git a/go/model_asset_render_response.go b/go/model_asset_render_response.go index 9d2a8e7..f17d49a 100644 --- a/go/model_asset_render_response.go +++ b/go/model_asset_render_response.go @@ -1,6 +1,6 @@ /* shottower -Copyright (C) 2022 Rémy Boulanouar +Copyright (C) 2022-2023 Rémy Boulanouar This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by diff --git a/go/model_asset_response.go b/go/model_asset_response.go index d901aad..a2ae078 100644 --- a/go/model_asset_response.go +++ b/go/model_asset_response.go @@ -1,6 +1,6 @@ /* shottower -Copyright (C) 2022 Rémy Boulanouar +Copyright (C) 2022-2023 Rémy Boulanouar This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by diff --git a/go/model_asset_response_attributes.go b/go/model_asset_response_attributes.go index 11d30f7..795b0d0 100644 --- a/go/model_asset_response_attributes.go +++ b/go/model_asset_response_attributes.go @@ -1,6 +1,6 @@ /* shottower -Copyright (C) 2022 Rémy Boulanouar +Copyright (C) 2022-2023 Rémy Boulanouar This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by diff --git a/go/model_asset_response_data.go b/go/model_asset_response_data.go index af15c36..8bdaa82 100644 --- a/go/model_asset_response_data.go +++ b/go/model_asset_response_data.go @@ -1,6 +1,6 @@ /* shottower -Copyright (C) 2022 Rémy Boulanouar +Copyright (C) 2022-2023 Rémy Boulanouar This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by diff --git a/go/model_audio_asset.go b/go/model_audio_asset.go index 733fdce..627668f 100644 --- a/go/model_audio_asset.go +++ b/go/model_audio_asset.go @@ -1,6 +1,6 @@ /* shottower -Copyright (C) 2022 Rémy Boulanouar +Copyright (C) 2022-2023 Rémy Boulanouar This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by diff --git a/go/model_clip.go b/go/model_clip.go index a23719c..5c50926 100644 --- a/go/model_clip.go +++ b/go/model_clip.go @@ -1,6 +1,6 @@ /* shottower -Copyright (C) 2022 Rémy Boulanouar +Copyright (C) 2022-2023 Rémy Boulanouar This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by diff --git a/go/model_crop.go b/go/model_crop.go index 08a70d2..1100b54 100644 --- a/go/model_crop.go +++ b/go/model_crop.go @@ -1,6 +1,6 @@ /* shottower -Copyright (C) 2022 Rémy Boulanouar +Copyright (C) 2022-2023 Rémy Boulanouar This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by diff --git a/go/model_destinations.go b/go/model_destinations.go index 761c388..1839586 100644 --- a/go/model_destinations.go +++ b/go/model_destinations.go @@ -1,6 +1,6 @@ /* shottower -Copyright (C) 2022 Rémy Boulanouar +Copyright (C) 2022-2023 Rémy Boulanouar This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by diff --git a/go/model_edit.go b/go/model_edit.go index f0458e6..89db44b 100644 --- a/go/model_edit.go +++ b/go/model_edit.go @@ -1,6 +1,6 @@ /* shottower -Copyright (C) 2022 Rémy Boulanouar +Copyright (C) 2022-2023 Rémy Boulanouar This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by diff --git a/go/model_ffmpeg.go b/go/model_ffmpeg.go index a4612ba..045ebfc 100644 --- a/go/model_ffmpeg.go +++ b/go/model_ffmpeg.go @@ -1,6 +1,6 @@ /* shottower -Copyright (C) 2022 Rémy Boulanouar +Copyright (C) 2022-2023 Rémy Boulanouar This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by diff --git a/go/model_flip_transformation.go b/go/model_flip_transformation.go index ec4d85c..d15b36e 100644 --- a/go/model_flip_transformation.go +++ b/go/model_flip_transformation.go @@ -1,6 +1,6 @@ /* shottower -Copyright (C) 2022 Rémy Boulanouar +Copyright (C) 2022-2023 Rémy Boulanouar This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by diff --git a/go/model_font.go b/go/model_font.go index 3f4bd38..3de5401 100644 --- a/go/model_font.go +++ b/go/model_font.go @@ -1,6 +1,6 @@ /* shottower -Copyright (C) 2022 Rémy Boulanouar +Copyright (C) 2022-2023 Rémy Boulanouar This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by diff --git a/go/model_html_asset.go b/go/model_html_asset.go index 7ec8e6f..2cb88b4 100644 --- a/go/model_html_asset.go +++ b/go/model_html_asset.go @@ -1,6 +1,6 @@ /* shottower -Copyright (C) 2022 Rémy Boulanouar +Copyright (C) 2022-2023 Rémy Boulanouar This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by diff --git a/go/model_image_asset.go b/go/model_image_asset.go index ca167b7..e5255b5 100644 --- a/go/model_image_asset.go +++ b/go/model_image_asset.go @@ -1,6 +1,6 @@ /* shottower -Copyright (C) 2022 Rémy Boulanouar +Copyright (C) 2022-2023 Rémy Boulanouar This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by diff --git a/go/model_localresource.go b/go/model_localresource.go index c57be5b..f7ee2b9 100644 --- a/go/model_localresource.go +++ b/go/model_localresource.go @@ -1,6 +1,6 @@ /* shottower -Copyright (C) 2022 Rémy Boulanouar +Copyright (C) 2022-2023 Rémy Boulanouar This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by diff --git a/go/model_luma_asset.go b/go/model_luma_asset.go index 83a88c6..b6ea0a3 100644 --- a/go/model_luma_asset.go +++ b/go/model_luma_asset.go @@ -1,6 +1,6 @@ /* shottower -Copyright (C) 2022 Rémy Boulanouar +Copyright (C) 2022-2023 Rémy Boulanouar This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by diff --git a/go/model_merge_field.go b/go/model_merge_field.go index 8555ef6..dc6a642 100644 --- a/go/model_merge_field.go +++ b/go/model_merge_field.go @@ -1,6 +1,6 @@ /* shottower -Copyright (C) 2022 Rémy Boulanouar +Copyright (C) 2022-2023 Rémy Boulanouar This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by diff --git a/go/model_mux_destination.go b/go/model_mux_destination.go index e8c548b..d6efdfa 100644 --- a/go/model_mux_destination.go +++ b/go/model_mux_destination.go @@ -1,6 +1,6 @@ /* shottower -Copyright (C) 2022 Rémy Boulanouar +Copyright (C) 2022-2023 Rémy Boulanouar This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by diff --git a/go/model_mux_destination_options.go b/go/model_mux_destination_options.go index 1006d3d..6ce0cbe 100644 --- a/go/model_mux_destination_options.go +++ b/go/model_mux_destination_options.go @@ -1,6 +1,6 @@ /* shottower -Copyright (C) 2022 Rémy Boulanouar +Copyright (C) 2022-2023 Rémy Boulanouar This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by diff --git a/go/model_offset.go b/go/model_offset.go index d8f9219..6598c3c 100644 --- a/go/model_offset.go +++ b/go/model_offset.go @@ -1,6 +1,6 @@ /* shottower -Copyright (C) 2022 Rémy Boulanouar +Copyright (C) 2022-2023 Rémy Boulanouar This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by diff --git a/go/model_output.go b/go/model_output.go index e793f8f..ee7ff27 100644 --- a/go/model_output.go +++ b/go/model_output.go @@ -1,6 +1,6 @@ /* shottower -Copyright (C) 2022 Rémy Boulanouar +Copyright (C) 2022-2023 Rémy Boulanouar This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by diff --git a/go/model_poster.go b/go/model_poster.go index b37fe55..4355f30 100644 --- a/go/model_poster.go +++ b/go/model_poster.go @@ -1,6 +1,6 @@ /* shottower -Copyright (C) 2022 Rémy Boulanouar +Copyright (C) 2022-2023 Rémy Boulanouar This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by diff --git a/go/model_probe_response.go b/go/model_probe_response.go index 37c604d..2481835 100644 --- a/go/model_probe_response.go +++ b/go/model_probe_response.go @@ -1,6 +1,6 @@ /* shottower -Copyright (C) 2022 Rémy Boulanouar +Copyright (C) 2022-2023 Rémy Boulanouar This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by diff --git a/go/model_queued_response.go b/go/model_queued_response.go index 998e35d..482da72 100644 --- a/go/model_queued_response.go +++ b/go/model_queued_response.go @@ -1,6 +1,6 @@ /* shottower -Copyright (C) 2022 Rémy Boulanouar +Copyright (C) 2022-2023 Rémy Boulanouar This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by diff --git a/go/model_queued_response_data.go b/go/model_queued_response_data.go index f881979..2b41f1d 100644 --- a/go/model_queued_response_data.go +++ b/go/model_queued_response_data.go @@ -1,6 +1,6 @@ /* shottower -Copyright (C) 2022 Rémy Boulanouar +Copyright (C) 2022-2023 Rémy Boulanouar This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by diff --git a/go/model_range.go b/go/model_range.go index a10bf0d..4b0e3af 100644 --- a/go/model_range.go +++ b/go/model_range.go @@ -1,6 +1,6 @@ /* shottower -Copyright (C) 2022 Rémy Boulanouar +Copyright (C) 2022-2023 Rémy Boulanouar This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by diff --git a/go/model_render_queue.go b/go/model_render_queue.go index 26d875d..b863433 100644 --- a/go/model_render_queue.go +++ b/go/model_render_queue.go @@ -1,6 +1,6 @@ /* shottower -Copyright (C) 2022 Rémy Boulanouar +Copyright (C) 2022-2023 Rémy Boulanouar This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by diff --git a/go/model_render_response.go b/go/model_render_response.go index fb0ee15..5d95834 100644 --- a/go/model_render_response.go +++ b/go/model_render_response.go @@ -1,6 +1,6 @@ /* shottower -Copyright (C) 2022 Rémy Boulanouar +Copyright (C) 2022-2023 Rémy Boulanouar This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by diff --git a/go/model_render_response_data.go b/go/model_render_response_data.go index dab16f0..70da2a3 100644 --- a/go/model_render_response_data.go +++ b/go/model_render_response_data.go @@ -1,6 +1,6 @@ /* shottower -Copyright (C) 2022 Rémy Boulanouar +Copyright (C) 2022-2023 Rémy Boulanouar This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by diff --git a/go/model_rotate_transformation.go b/go/model_rotate_transformation.go index bd3da6c..39b09c3 100644 --- a/go/model_rotate_transformation.go +++ b/go/model_rotate_transformation.go @@ -1,6 +1,6 @@ /* shottower -Copyright (C) 2022 Rémy Boulanouar +Copyright (C) 2022-2023 Rémy Boulanouar This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by diff --git a/go/model_shotstack_destination.go b/go/model_shotstack_destination.go index 3bbbd6f..344e595 100644 --- a/go/model_shotstack_destination.go +++ b/go/model_shotstack_destination.go @@ -1,6 +1,6 @@ /* shottower -Copyright (C) 2022 Rémy Boulanouar +Copyright (C) 2022-2023 Rémy Boulanouar This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by diff --git a/go/model_size.go b/go/model_size.go index 4af01ae..96f8e8f 100644 --- a/go/model_size.go +++ b/go/model_size.go @@ -1,6 +1,6 @@ /* shottower -Copyright (C) 2022 Rémy Boulanouar +Copyright (C) 2022-2023 Rémy Boulanouar This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by diff --git a/go/model_skew_transformation.go b/go/model_skew_transformation.go index 40f3c67..3c32584 100644 --- a/go/model_skew_transformation.go +++ b/go/model_skew_transformation.go @@ -1,6 +1,6 @@ /* shottower -Copyright (C) 2022 Rémy Boulanouar +Copyright (C) 2022-2023 Rémy Boulanouar This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by diff --git a/go/model_soundtrack.go b/go/model_soundtrack.go index 109b2db..d27f8c4 100644 --- a/go/model_soundtrack.go +++ b/go/model_soundtrack.go @@ -1,6 +1,6 @@ /* shottower -Copyright (C) 2022 Rémy Boulanouar +Copyright (C) 2022-2023 Rémy Boulanouar This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by diff --git a/go/model_subtitle.go b/go/model_subtitle.go index 88369a5..21dda27 100644 --- a/go/model_subtitle.go +++ b/go/model_subtitle.go @@ -1,6 +1,6 @@ /* shottower -Copyright (C) 2022 Rémy Boulanouar +Copyright (C) 2022-2023 Rémy Boulanouar This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by diff --git a/go/model_template.go b/go/model_template.go index 05f3556..f4e3cf7 100644 --- a/go/model_template.go +++ b/go/model_template.go @@ -1,6 +1,6 @@ /* shottower -Copyright (C) 2022 Rémy Boulanouar +Copyright (C) 2022-2023 Rémy Boulanouar This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by diff --git a/go/model_template_data_response.go b/go/model_template_data_response.go index cbd8956..a51ba31 100644 --- a/go/model_template_data_response.go +++ b/go/model_template_data_response.go @@ -1,6 +1,6 @@ /* shottower -Copyright (C) 2022 Rémy Boulanouar +Copyright (C) 2022-2023 Rémy Boulanouar This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by diff --git a/go/model_template_data_response_data.go b/go/model_template_data_response_data.go index 637b919..e6482e2 100644 --- a/go/model_template_data_response_data.go +++ b/go/model_template_data_response_data.go @@ -1,6 +1,6 @@ /* shottower -Copyright (C) 2022 Rémy Boulanouar +Copyright (C) 2022-2023 Rémy Boulanouar This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by diff --git a/go/model_template_list_response.go b/go/model_template_list_response.go index 2061e48..d793fcb 100644 --- a/go/model_template_list_response.go +++ b/go/model_template_list_response.go @@ -1,6 +1,6 @@ /* shottower -Copyright (C) 2022 Rémy Boulanouar +Copyright (C) 2022-2023 Rémy Boulanouar This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by diff --git a/go/model_template_list_response_data.go b/go/model_template_list_response_data.go index 8c42983..abeda93 100644 --- a/go/model_template_list_response_data.go +++ b/go/model_template_list_response_data.go @@ -1,6 +1,6 @@ /* shottower -Copyright (C) 2022 Rémy Boulanouar +Copyright (C) 2022-2023 Rémy Boulanouar This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by diff --git a/go/model_template_list_response_item.go b/go/model_template_list_response_item.go index 1fd6d0d..6fbafcb 100644 --- a/go/model_template_list_response_item.go +++ b/go/model_template_list_response_item.go @@ -1,6 +1,6 @@ /* shottower -Copyright (C) 2022 Rémy Boulanouar +Copyright (C) 2022-2023 Rémy Boulanouar This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by diff --git a/go/model_template_render.go b/go/model_template_render.go index 3c515f8..bc3fa2a 100644 --- a/go/model_template_render.go +++ b/go/model_template_render.go @@ -1,6 +1,6 @@ /* shottower -Copyright (C) 2022 Rémy Boulanouar +Copyright (C) 2022-2023 Rémy Boulanouar This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by diff --git a/go/model_template_response.go b/go/model_template_response.go index 9e8fef1..d5abf73 100644 --- a/go/model_template_response.go +++ b/go/model_template_response.go @@ -1,6 +1,6 @@ /* shottower -Copyright (C) 2022 Rémy Boulanouar +Copyright (C) 2022-2023 Rémy Boulanouar This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by diff --git a/go/model_template_response_data.go b/go/model_template_response_data.go index 13e691d..357f061 100644 --- a/go/model_template_response_data.go +++ b/go/model_template_response_data.go @@ -1,6 +1,6 @@ /* shottower -Copyright (C) 2022 Rémy Boulanouar +Copyright (C) 2022-2023 Rémy Boulanouar This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by diff --git a/go/model_thumbnail.go b/go/model_thumbnail.go index 93bc8df..a4288e7 100644 --- a/go/model_thumbnail.go +++ b/go/model_thumbnail.go @@ -1,6 +1,6 @@ /* shottower -Copyright (C) 2022 Rémy Boulanouar +Copyright (C) 2022-2023 Rémy Boulanouar This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by diff --git a/go/model_timeline.go b/go/model_timeline.go index 8dfc200..f0e2be3 100644 --- a/go/model_timeline.go +++ b/go/model_timeline.go @@ -1,6 +1,6 @@ /* shottower -Copyright (C) 2022 Rémy Boulanouar +Copyright (C) 2022-2023 Rémy Boulanouar This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by diff --git a/go/model_title_asset.go b/go/model_title_asset.go index 965181a..e07c96f 100644 --- a/go/model_title_asset.go +++ b/go/model_title_asset.go @@ -1,6 +1,6 @@ /* shottower -Copyright (C) 2022 Rémy Boulanouar +Copyright (C) 2022-2023 Rémy Boulanouar This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by diff --git a/go/model_track.go b/go/model_track.go index 88a94e4..d04f3c4 100644 --- a/go/model_track.go +++ b/go/model_track.go @@ -1,6 +1,6 @@ /* shottower -Copyright (C) 2022 Rémy Boulanouar +Copyright (C) 2022-2023 Rémy Boulanouar This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by diff --git a/go/model_transformation.go b/go/model_transformation.go index 2b9d347..b209b83 100644 --- a/go/model_transformation.go +++ b/go/model_transformation.go @@ -1,6 +1,6 @@ /* shottower -Copyright (C) 2022 Rémy Boulanouar +Copyright (C) 2022-2023 Rémy Boulanouar This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by diff --git a/go/model_transition.go b/go/model_transition.go index 7e47e13..812d850 100644 --- a/go/model_transition.go +++ b/go/model_transition.go @@ -1,6 +1,6 @@ /* shottower -Copyright (C) 2022 Rémy Boulanouar +Copyright (C) 2022-2023 Rémy Boulanouar This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by diff --git a/go/model_video_asset.go b/go/model_video_asset.go index 43644e6..276a76f 100644 --- a/go/model_video_asset.go +++ b/go/model_video_asset.go @@ -1,6 +1,6 @@ /* shottower -Copyright (C) 2022 Rémy Boulanouar +Copyright (C) 2022-2023 Rémy Boulanouar This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by diff --git a/go/queue.go b/go/queue.go index 7eb8ab8..b20a859 100644 --- a/go/queue.go +++ b/go/queue.go @@ -1,6 +1,6 @@ /* shottower -Copyright (C) 2022 Rémy Boulanouar +Copyright (C) 2022-2023 Rémy Boulanouar This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by diff --git a/go/routers.go b/go/routers.go index 844ef9e..ba72956 100644 --- a/go/routers.go +++ b/go/routers.go @@ -1,6 +1,6 @@ /* shottower -Copyright (C) 2022 Rémy Boulanouar +Copyright (C) 2022-2023 Rémy Boulanouar This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by diff --git a/main.go b/main.go index 9c7ffa0..57993ec 100644 --- a/main.go +++ b/main.go @@ -1,6 +1,6 @@ /* shottower -Copyright (C) 2022 Rémy Boulanouar +Copyright (C) 2022-2023 Rémy Boulanouar This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by From 5d029dcbdd1eca5317ba0e694607e115c216db1d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Boulanouar?= Date: Fri, 5 May 2023 13:52:57 +0200 Subject: [PATCH 14/18] chore: update golangci-lint --- .github/workflows/golangci-lint.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/golangci-lint.yml b/.github/workflows/golangci-lint.yml index 4bc506f..6929fcb 100644 --- a/.github/workflows/golangci-lint.yml +++ b/.github/workflows/golangci-lint.yml @@ -33,4 +33,4 @@ jobs: if: steps.changed-files.outputs.any_changed == 'true' uses: golangci/golangci-lint-action@v3.3.1 with: - version: v1.50.1 \ No newline at end of file + version: v1.52.2 \ No newline at end of file From 84f4c9088bbd1d3f2b7aa36e63fc858e49fc16dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Boulanouar?= Date: Fri, 5 May 2023 14:05:58 +0200 Subject: [PATCH 15/18] fix: lint issue about no timeout http server --- .golangci.yml | 3 --- .vscode/settings.json | 6 ++++++ main.go | 12 +++++++++++- 3 files changed, 17 insertions(+), 4 deletions(-) diff --git a/.golangci.yml b/.golangci.yml index 572eb76..fd11a22 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -11,10 +11,7 @@ linters: - staticcheck - unused - gosimple - - structcheck # waiting for compatibility with Go 1.19 - - varcheck - ineffassign - - deadcode - typecheck - bodyclose # waiting for compatibility with Go 1.19 - revive diff --git a/.vscode/settings.json b/.vscode/settings.json index acf1f58..c1342da 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -25,6 +25,7 @@ "gochecknoglobals", "gochecknoinits", "gocognit", + "goconst", "gocritic", "gocyclo", "godox", @@ -32,7 +33,10 @@ "goimports", "golangci", "golint", + "gomega", "goreleaser", + "gosec", + "gosimple", "govet", "greyscale", "horz", @@ -52,6 +56,7 @@ "nilerr", "noctx", "nolint", + "onsi", "openapi", "overfiller", "Pexels", @@ -62,6 +67,7 @@ "setpts", "Shotstack", "shottower", + "Slowloris", "STARTPTS", "staticcheck", "strack", diff --git a/main.go b/main.go index 57993ec..265de73 100644 --- a/main.go +++ b/main.go @@ -29,6 +29,7 @@ package main import ( "log" "net/http" + "time" "github.com/DblK/shottower/config" openapi "github.com/DblK/shottower/go" @@ -53,5 +54,14 @@ func main() { QueueService := openapi.NewProcessingQueuer(myConfig) QueueService.StartProcessQueue(EditAPIService) - log.Fatal(http.ListenAndServe(":4000", router)) + server := &http.Server{ + Handler: router, + Addr: ":4000", + + // Good practice to set timeouts to avoid Slowloris attacks. + WriteTimeout: time.Second * 60, + ReadTimeout: time.Second * 15, + IdleTimeout: time.Second * 60, + } + log.Fatal(server.ListenAndServe()) } From 597d69dd15e99db88214ab3c84ea49a412fd6138 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Boulanouar?= Date: Fri, 5 May 2023 14:08:38 +0200 Subject: [PATCH 16/18] chore: remove unknown nolint linter --- go/queue.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/go/queue.go b/go/queue.go index b20a859..e8262d5 100644 --- a/go/queue.go +++ b/go/queue.go @@ -406,7 +406,7 @@ func (s *ProcessingQueue) DownloadFile(url string) (string, error) { fmt.Println("----" + file.Name()) // Get the data - resp, err := http.Get(url) // nolint:gosec,G107 + resp, err := http.Get(url) // nolint:gosec if err != nil { return "", err } From b96c1ff01f075165b0b4ba2a9e699db7809a4cc5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Boulanouar?= Date: Fri, 5 May 2023 14:12:00 +0200 Subject: [PATCH 17/18] chore: update workflows --- .github/workflows/ginkgo.yml | 4 ++-- .github/workflows/golangci-lint.yml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ginkgo.yml b/.github/workflows/ginkgo.yml index b6216e5..b15477e 100644 --- a/.github/workflows/ginkgo.yml +++ b/.github/workflows/ginkgo.yml @@ -25,7 +25,7 @@ jobs: - name: Get changed files id: changed-files - uses: tj-actions/changed-files@v14.1 + uses: tj-actions/changed-files@v35.9.2 with: files: | go.* @@ -53,7 +53,7 @@ jobs: - name: Get changed files id: changed-files - uses: tj-actions/changed-files@v14.1 + uses: tj-actions/changed-files@v35.9.2 with: files: | go.* diff --git a/.github/workflows/golangci-lint.yml b/.github/workflows/golangci-lint.yml index 6929fcb..419c996 100644 --- a/.github/workflows/golangci-lint.yml +++ b/.github/workflows/golangci-lint.yml @@ -23,7 +23,7 @@ jobs: - name: Get changed files id: changed-files - uses: tj-actions/changed-files@v14.1 + uses: tj-actions/changed-files@v35.9.2 with: files: | go.* @@ -31,6 +31,6 @@ jobs: - name: golangci-lint if: steps.changed-files.outputs.any_changed == 'true' - uses: golangci/golangci-lint-action@v3.3.1 + uses: golangci/golangci-lint-action@v3.4.0 with: version: v1.52.2 \ No newline at end of file From 2ca46afbd730dc23d4505125f521363767a3c085 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Boulanouar?= Date: Tue, 2 Jan 2024 14:17:05 +0100 Subject: [PATCH 18/18] wip: add transition (I do not know) --- config/config.go | 20 ++++++++++++++++++-- go/ffmpeg.go | 11 +++++++++++ go/ffmpeg_test.go | 20 ++++++++++++++++++++ go/model_clip.go | 8 ++++++++ main.go | 10 +++++++++- 5 files changed, 66 insertions(+), 3 deletions(-) diff --git a/config/config.go b/config/config.go index 5a4e412..93617cf 100644 --- a/config/config.go +++ b/config/config.go @@ -24,6 +24,8 @@ const ( Stage ) +var conf *ShottowerConfig + func (s EndpointType) String() string { switch s { case V1: @@ -48,11 +50,25 @@ type ShottowerConfig struct { endpointType EndpointType } -func NewShottowerConfig(baseURL string, endpointType EndpointType) ShottowerConfiguration { - return &ShottowerConfig{ +func Init(baseURL string, endpointType EndpointType) error { + + // viper.SetConfigName("config") + + // https://github.com/TakasBU/TakasBU/blob/main/initializers/loadEnv.go + // https://github.com/laixhe/goimg/blob/c27cdb95bdf9b09f36589c2d465c7a6ebdd44b92/config/config.go + // https://github.com/Bikram-Gyawali/LearningGoLang/blob/17f5c3a1048f4857e31652d3a139253be68ec9a9/day24_viper/utils/config.go + // https://articles.wesionary.team/environment-variable-configuration-in-your-golang-project-using-viper-4e8289ef664d + + conf = &ShottowerConfig{ rootURL: baseURL, endpointType: endpointType, } + + return nil +} + +func Get() *ShottowerConfig { + return conf } func (s *ShottowerConfig) GetRootURL() string { diff --git a/go/ffmpeg.go b/go/ffmpeg.go index 56b678d..1e6f0ad 100644 --- a/go/ffmpeg.go +++ b/go/ffmpeg.go @@ -642,6 +642,12 @@ func (s *FFMPEG) toStringHandleSource(parameters []string) []string { parameters = append(parameters, s.GenerateFiller("pink@.0")) } + // Add transparent source for transition + parameters = append(parameters, "-f") + parameters = append(parameters, "lavfi") + parameters = append(parameters, "-i") + parameters = append(parameters, s.GenerateFiller("blue@.0")) + // Add background source parameters = append(parameters, "-f") parameters = append(parameters, "lavfi") @@ -689,6 +695,11 @@ func (s *FFMPEG) ToString() []string { "[" + cast.ToString(maxSource+addedSources) + "] concat=n=1:v=1,setpts=PTS-STARTPTS,format=yuva420p [overfiller" + cast.ToString(i) + "];" } } + + // Add transition stream + addedSources = addedSources + 1 + filterComplex = filterComplex + "[" + cast.ToString(maxSource+addedSources) + "] concat=n=1:v=1,setpts=PTS-STARTPTS,format=yuv420p [transition0]; [transition0] trim=start=0:end=" + cast.ToString(s.duration) + " [transition];" + // Add background stream addedSources = addedSources + 1 filterComplex = filterComplex + "[" + cast.ToString(maxSource+addedSources) + "] concat=n=1:v=1,setpts=PTS-STARTPTS,format=yuv420p [bg0]; [bg0] trim=start=0:end=" + cast.ToString(s.duration) + " [bg];" diff --git a/go/ffmpeg_test.go b/go/ffmpeg_test.go index f87c056..8e54639 100644 --- a/go/ffmpeg_test.go +++ b/go/ffmpeg_test.go @@ -293,4 +293,24 @@ var _ = Describe("Ffmpeg", func() { Expect(res).To(Equal("subtitles='/dev/test.mkv':stream_index=0[strack0c0]; [0:v] [strack0c0] overlay [vtrack0c0];")) }) }) + XDescribe("CloseTrack", func() { + var ff openapi.FFMPEGCommand + BeforeEach(func() { + ff = openapi.NewFFMPEGCommand() + _ = ff.AddSource("/dev/test.mkv", false) + }) + + It("Should merge subtitle track with video", func() { + // var sourceClip = 0 + var trackNumber = 0 + // var clipNumber = 0 + // var index = 0 + _ = ff.AddTrack(trackNumber) + _ = ff.AddClip(trackNumber, "[0] concat=n=1:v=1,setpts=PTS-STARTPTS,format=yuva420p [filler1];") + _ = ff.AddClip(trackNumber, "[1] concat=n=1:v=1,setpts=PTS-STARTPTS,format=yuva420p [filler2];") + _ = ff.CloseTrack(trackNumber) + res := ff.ToString() + Expect(res).To(BeNil()) + }) + }) }) diff --git a/go/model_clip.go b/go/model_clip.go index 5c50926..b264917 100644 --- a/go/model_clip.go +++ b/go/model_clip.go @@ -211,6 +211,14 @@ func (s *Clip) ToFFMPEG(FFMPEGCommand FFMPEGCommand, sourceClip int, trackNumber effects = append(effects, FFMPEGCommand.ClipResize(sourceClip, trackNumber, currentClip, 1)) } + // Apply Transition between clip and transparent reference + if s.Transition != nil { + // Use the invisible source "transition" to make the effect based on the current clip and the transparent one + // start = invisible + clip + // end = clip + invisible + fmt.Println("here") + } + _ = FFMPEGCommand.AddClip( trackNumber, FFMPEGCommand.ClipMerge(sourceClip, trackNumber, currentClip, effects), diff --git a/main.go b/main.go index 265de73..6117bf9 100644 --- a/main.go +++ b/main.go @@ -36,10 +36,16 @@ import ( ) func main() { + // TODO: Add test to main + // https://dev.to/techschoolguru/load-config-from-file-environment-variables-in-golang-with-viper-2j2d log.Printf("Server started") - myConfig := config.NewShottowerConfig("http://0.0.0.0:4000", config.Stage) + // Find config file and load it! + // Use config + config.Init("http://0.0.0.0:4000", config.Stage) + myConfig := config.Get() + // TODO: Replace myConfig with call to config Package EditAPIService := openapi.NewEditAPIService(myConfig) EditAPIController := openapi.NewEditAPIController(EditAPIService) @@ -64,4 +70,6 @@ func main() { IdleTimeout: time.Second * 60, } log.Fatal(server.ListenAndServe()) + // TODO: Add graceful shutdown + // https://github.com/miomiora/mio-init/blob/master/main.go }