Skip to content

Commit 26b6b0a

Browse files
authored
Merge pull request #1 from m1k1o/module-support
Module support
2 parents 552ee69 + e2d1904 commit 26b6b0a

31 files changed

+1035
-555
lines changed

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM golang:1.15-buster
1+
FROM golang:1.17-bullseye
22

33
WORKDIR /app
44

build

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
#!/bin/sh
22

3-
go build -o bin/transcode -i cmd/transcode/main.go
3+
go build -o bin/transcode cmd/transcode/main.go

cmd/root.go

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,17 @@ import (
99
"github.com/spf13/cobra"
1010
"github.com/spf13/viper"
1111

12-
"m1k1o/transcode"
12+
"github.com/m1k1o/go-transcode"
1313
)
1414

15-
1615
func Execute() error {
1716
return root.Execute()
1817
}
1918

2019
var root = &cobra.Command{
21-
Use: "transcode",
22-
Short: "transcode server",
23-
Long: `transcode server`,
20+
Use: "transcode",
21+
Short: "transcode server",
22+
Long: `transcode server`,
2423
}
2524

2625
func init() {

cmd/serve.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ import (
44
"github.com/rs/zerolog/log"
55
"github.com/spf13/cobra"
66

7-
"m1k1o/transcode"
8-
"m1k1o/transcode/internal/config"
7+
"github.com/m1k1o/go-transcode"
8+
"github.com/m1k1o/go-transcode/internal/config"
99
)
1010

1111
func init() {

cmd/transcode/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package main
33
import (
44
"github.com/rs/zerolog/log"
55

6-
"m1k1o/transcode/cmd"
6+
"github.com/m1k1o/go-transcode/cmd"
77
)
88

99
func main() {

data/hls-test.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/sh
22

3-
ffmpeg -re -r 30 -f lavfi -i testsrc -vf scale=1280:960 -vcodec libx264 -profile:v baseline -pix_fmt yuv420p \
3+
exec ffmpeg -re -r 30 -f lavfi -i testsrc -vf scale=1280:960 -vcodec libx264 -profile:v baseline -pix_fmt yuv420p \
44
-f hls \
55
-hls_time 2 \
66
-hls_list_size 5 \
@@ -9,4 +9,4 @@ ffmpeg -re -r 30 -f lavfi -i testsrc -vf scale=1280:960 -vcodec libx264 -profile
99
-hls_flags delete_segments \
1010
-hls_start_number_source datetime \
1111
-hls_segment_filename "live_%03d.ts" \
12-
-;
12+
-

data/http-test.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
#!/bin/sh
22

3-
ffmpeg -r 30 -f lavfi -i testsrc -vf scale=1280:960 -vcodec libx264 -profile:v baseline -pix_fmt yuv420p -f mpegts -
3+
exec ffmpeg -r 30 -f lavfi -i testsrc -vf scale=1280:960 -vcodec libx264 -profile:v baseline -pix_fmt yuv420p -f mpegts -

docker-compose.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
version: "3"
2+
3+
services:
4+
go-transcode:
5+
build: .
6+
container_name: go-transcode
7+
restart: unless-stopped
8+
ports:
9+
- "8080:8080"
10+
volumes:
11+
- ./streams.yaml:/app/streams.yaml
12+
command: serve -d

go.mod

Lines changed: 24 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,30 @@
1-
module m1k1o/transcode
1+
module github.com/m1k1o/go-transcode
22

3-
go 1.15
3+
go 1.17
44

55
require (
6-
github.com/fsnotify/fsnotify v1.4.9 // indirect
7-
github.com/go-chi/chi v4.1.0+incompatible
8-
github.com/mitchellh/mapstructure v1.2.2 // indirect
9-
github.com/pelletier/go-toml v1.7.0 // indirect
10-
github.com/rs/zerolog v1.18.0
11-
github.com/spf13/afero v1.2.2 // indirect
12-
github.com/spf13/cast v1.3.1 // indirect
13-
github.com/spf13/cobra v0.0.7
6+
github.com/fsnotify/fsnotify v1.5.1 // indirect
7+
github.com/go-chi/chi v4.1.2+incompatible
8+
github.com/mitchellh/mapstructure v1.4.1 // indirect
9+
github.com/pelletier/go-toml v1.9.4 // indirect
10+
github.com/rs/zerolog v1.24.0
11+
github.com/spf13/afero v1.6.0 // indirect
12+
github.com/spf13/cast v1.4.1 // indirect
13+
github.com/spf13/cobra v1.2.1
1414
github.com/spf13/jwalterweatherman v1.1.0 // indirect
1515
github.com/spf13/pflag v1.0.5 // indirect
16-
github.com/spf13/viper v1.6.2
17-
github.com/stretchr/testify v1.5.1 // indirect
18-
golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e // indirect
19-
golang.org/x/sys v0.0.0-20200831180312-196b9ba8737a // indirect
20-
golang.org/x/text v0.3.2 // indirect
21-
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 // indirect
22-
gopkg.in/ini.v1 v1.55.0 // indirect
23-
gopkg.in/yaml.v2 v2.2.8
16+
github.com/spf13/viper v1.8.1
17+
golang.org/x/net v0.0.0-20210903162142-ad29c8ab022f // indirect
18+
golang.org/x/sys v0.0.0-20210903071746-97244b99971b // indirect
19+
golang.org/x/text v0.3.7 // indirect
20+
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect
21+
gopkg.in/ini.v1 v1.62.1 // indirect
22+
gopkg.in/yaml.v2 v2.4.0
23+
)
24+
25+
require (
26+
github.com/hashicorp/hcl v1.0.0 // indirect
27+
github.com/inconshreveable/mousetrap v1.0.0 // indirect
28+
github.com/magiconair/properties v1.8.5 // indirect
29+
github.com/subosito/gotenv v1.2.0 // indirect
2430
)

go.sum

Lines changed: 531 additions & 137 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)