replace rlotiie_go with my own impl
This commit is contained in:
eugene 2025-09-10 23:47:01 +03:00
parent 02d6ad8df8
commit 83663aa9db
4 changed files with 9 additions and 6 deletions

View File

@ -6,6 +6,7 @@ import (
"fmt"
"os"
"strings"
"time"
converter "github.com/yazmeyaa/telegram_sticker_converter"
"github.com/yazmeyaa/telegram_sticker_converter/tgs"
@ -31,7 +32,7 @@ func main() {
inputType := inputParts[0]
var in *os.File
if inputType == "file" {
input, err := os.Open(*input)
input, err := os.Open(inputParts[1])
if err != nil {
fmt.Fprintf(os.Stderr, "error opening file: %v\n", err)
os.Exit(1)
@ -82,11 +83,13 @@ func main() {
}
converter := tgs.NewConverter()
start := time.Now()
if err := converter.Transform(context.Background(), in, out, opts); err != nil {
fmt.Fprintf(os.Stderr, "transform failed: %v\n", err)
os.Exit(1)
}
duration := time.Since(start)
fmt.Printf("Complete in %d ms\n", duration.Milliseconds())
fmt.Println("success:", *outPath)
}

2
go.mod
View File

@ -3,8 +3,8 @@ module github.com/yazmeyaa/telegram_sticker_converter
go 1.24.6
require (
github.com/arugaz/go-rlottie v0.1.0
github.com/u2takey/ffmpeg-go v0.5.0
github.com/yazmeyaa/go-rlottie v1.0.3
golang.org/x/image v0.30.0
)

4
go.sum
View File

@ -1,5 +1,3 @@
github.com/arugaz/go-rlottie v0.1.0 h1:/rQaoBoSEG2T+PW56ANvpkgOHdYYtGZpvxzjI6touZ8=
github.com/arugaz/go-rlottie v0.1.0/go.mod h1:m50xy50q5U9ngFIBJja9m09vFhvfw6cxkRiqIxjKeWQ=
github.com/aws/aws-sdk-go v1.38.20/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro=
github.com/aws/aws-sdk-go v1.55.8 h1:JRmEUbU52aJQZ2AjX4q4Wu7t4uZjOu71uyNmaWlUkJQ=
github.com/aws/aws-sdk-go v1.55.8/go.mod h1:ZkViS9AqA6otK+JBBNH2++sx1sgxrPKcSzPPvQkUtXk=
@ -39,6 +37,8 @@ github.com/u2takey/ffmpeg-go v0.5.0 h1:r7d86XuL7uLWJ5mzSeQ03uvjfIhiJYvsRAJFCW4uk
github.com/u2takey/ffmpeg-go v0.5.0/go.mod h1:ruZWkvC1FEiUNjmROowOAps3ZcWxEiOpFoHCvk97kGc=
github.com/u2takey/go-utils v0.3.1 h1:TaQTgmEZZeDHQFYfd+AdUT1cT4QJgJn/XVPELhHw4ys=
github.com/u2takey/go-utils v0.3.1/go.mod h1:6e+v5vEZ/6gu12w/DC2ixZdZtCrNokVxD0JUklcqdCs=
github.com/yazmeyaa/go-rlottie v1.0.3 h1:md1ptW6ZWEv9U6YpC/kg2QbQQoIhJcHik4U9+WAGNyc=
github.com/yazmeyaa/go-rlottie v1.0.3/go.mod h1:Ci2En07mkAOGiTMq5/js/AkTwH6q/ov/nA4lBkkUoB8=
gocv.io/x/gocv v0.25.0/go.mod h1:Rar2PS6DV+T4FL+PM535EImD/h13hGVaHhnCu1xarBs=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=

View File

@ -12,8 +12,8 @@ import (
"image/png"
"io"
"github.com/arugaz/go-rlottie"
ffmpeg_go "github.com/u2takey/ffmpeg-go"
"github.com/yazmeyaa/go-rlottie"
converter "github.com/yazmeyaa/telegram_sticker_converter"
)