├── .gitignore ├── .dockerignore ├── api ├── resource.go ├── go.mod ├── Dockerfile ├── store.go ├── main.go └── go.sum ├── recorder ├── go.mod ├── Dockerfile ├── resource.go ├── watcher.go ├── main.go ├── store.go └── go.sum ├── conf └── nginx │ ├── Dockerfile │ ├── nginx.conf │ └── sites-available │ └── minio.conf ├── Makefile ├── ingest.sh ├── README.md ├── LICENSE ├── frontend ├── nginx.conf └── player │ └── index.html └── docker-compose.yml /.gitignore: -------------------------------------------------------------------------------- 1 | media/* 2 | !media/.keep 3 | bin/* -------------------------------------------------------------------------------- /.dockerignore: -------------------------------------------------------------------------------- 1 | bin 2 | media 3 | README.md 4 | LICENSE 5 | **/.git -------------------------------------------------------------------------------- /api/resource.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "strings" 4 | 5 | type Resource struct { 6 | Path string 7 | } 8 | 9 | func (r *Resource) ObjectName() string { 10 | return strings.Replace(r.Path, "/live/", "", 1) 11 | } 12 | -------------------------------------------------------------------------------- /recorder/go.mod: -------------------------------------------------------------------------------- 1 | module github.com/mauricioabreu/now-live/recorder 2 | 3 | go 1.14 4 | 5 | require ( 6 | github.com/go-ini/ini v1.55.0 // indirect 7 | github.com/minio/minio-go v6.0.14+incompatible 8 | github.com/minio/minio-go/v6 v6.0.55 9 | github.com/rjeczalik/notify v0.9.2 10 | ) 11 | -------------------------------------------------------------------------------- /api/go.mod: -------------------------------------------------------------------------------- 1 | module github.com/mauricioabreu/now-live/api 2 | 3 | go 1.14 4 | 5 | require ( 6 | github.com/go-ini/ini v1.56.0 // indirect 7 | github.com/labstack/echo/v4 v4.1.16 8 | github.com/minio/minio-go v6.0.14+incompatible 9 | github.com/mitchellh/go-homedir v1.1.0 // indirect 10 | ) 11 | -------------------------------------------------------------------------------- /api/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM golang:1.14 as builder 2 | 3 | ENV GO111MODULE=on \ 4 | CGO_ENABLED=0 5 | 6 | WORKDIR /build 7 | 8 | COPY go.mod go.sum ./ 9 | RUN go mod download 10 | 11 | COPY . . 12 | 13 | RUN go build -o api . 14 | 15 | FROM alpine:3.7 16 | 17 | RUN adduser -S -D -H -h /app api 18 | 19 | USER api 20 | 21 | COPY --from=builder /build/api /app/ 22 | 23 | WORKDIR /app 24 | 25 | CMD ["./api"] -------------------------------------------------------------------------------- /recorder/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM golang:1.14 as builder 2 | 3 | ENV GO111MODULE=on \ 4 | CGO_ENABLED=0 5 | 6 | WORKDIR /build 7 | 8 | COPY go.mod go.sum ./ 9 | RUN go mod download 10 | 11 | COPY . . 12 | 13 | RUN go build -o recorder . 14 | 15 | FROM alpine:3.7 16 | 17 | RUN adduser -S -D -H -h /app recorder 18 | 19 | USER recorder 20 | 21 | COPY --from=builder /build/recorder /app/ 22 | 23 | WORKDIR /app 24 | 25 | CMD ["./recorder"] -------------------------------------------------------------------------------- /recorder/resource.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "path/filepath" 5 | "strings" 6 | ) 7 | 8 | type Resource struct { 9 | File string 10 | } 11 | 12 | func (r *Resource) ObjectName(root string) string { 13 | path := strings.Replace(r.File, root, "", 1) 14 | if path[0] == '/' { 15 | return path[1:] 16 | } 17 | return filepath.Dir(path) 18 | } 19 | 20 | func (r *Resource) Path() string { 21 | return filepath.Base(r.File) 22 | } 23 | -------------------------------------------------------------------------------- /conf/nginx/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM nginx:alpine 2 | 3 | RUN apk add --no-cache curl 4 | 5 | RUN \ 6 | rm -f \ 7 | /etc/nginx/sites-available/minio.conf \ 8 | /etc/nginx/sites-enabled/minio.conf \ 9 | /etc/nginx/sites-enabled/default 10 | 11 | ADD sites-available/ /etc/nginx/sites-available 12 | 13 | COPY nginx.conf /etc/nginx/nginx.conf 14 | 15 | RUN \ 16 | mkdir -p /etc/nginx/sites-enabled && \ 17 | ln -s /etc/nginx/sites-available/minio.conf /etc/nginx/sites-enabled/minio.conf -------------------------------------------------------------------------------- /recorder/watcher.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "fmt" 5 | "log" 6 | 7 | "github.com/rjeczalik/notify" 8 | ) 9 | 10 | type Watcher struct { 11 | Path string 12 | EventStream chan notify.EventInfo 13 | } 14 | 15 | func NewWatcher(path string) *Watcher { 16 | return &Watcher{ 17 | Path: fmt.Sprintf("%s/...", path), 18 | EventStream: make(chan notify.EventInfo, 1), 19 | } 20 | } 21 | 22 | func (w *Watcher) Start() { 23 | if err := notify.Watch(w.Path, w.EventStream, notify.InCloseWrite, notify.InMovedTo); err != nil { 24 | log.Fatal(err) 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | .PHONY: help ingest now-live package recorder 2 | 3 | RECORDER_VERSION=0.0.1 4 | 5 | ingest: ## Produce some video and ingest it in the packager 6 | ./ingest.sh 7 | 8 | now-live: ## Run Now Live platform 9 | docker-compose build 10 | docker-compose up 11 | 12 | down-live: ## Stop Now Live platform 13 | docker-compose down 14 | 15 | recorder-build: ## Build recorder image 16 | docker build --tag recorder:${RECORDER_VERSION} -f Dockerfile-recorder . 17 | 18 | help: ## Lists available commands 19 | @grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' -------------------------------------------------------------------------------- /conf/nginx/nginx.conf: -------------------------------------------------------------------------------- 1 | user nginx; 2 | worker_processes auto; 3 | 4 | error_log /var/log/nginx/error.log warn; 5 | pid /var/run/nginx.pid; 6 | 7 | events { 8 | worker_connections 1024; 9 | } 10 | 11 | http { 12 | include /etc/nginx/mime.types; 13 | default_type application/octet-stream; 14 | 15 | log_format main '$remote_addr - $remote_user [$time_local] "$request" ' 16 | '$status $body_bytes_sent "$http_referer" ' 17 | '"$http_user_agent" "$http_x_forwarded_for"'; 18 | 19 | access_log /var/log/nginx/access.log main; 20 | 21 | sendfile on; 22 | keepalive_timeout 65; 23 | 24 | include /etc/nginx/sites-enabled/minio.conf; 25 | } -------------------------------------------------------------------------------- /recorder/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "log" 5 | "regexp" 6 | ) 7 | 8 | var ( 9 | regexTempl = regexp.MustCompile(`^.*\.(m3u8|mp4|aac|ts)$`) 10 | ) 11 | 12 | func main() { 13 | store := NewStore("video") 14 | err := store.CreateBucket("video") 15 | if err != nil { 16 | log.Fatalf("Failed to create bucket:", err) 17 | } 18 | watcher := NewWatcher("/app/media") 19 | watcher.Start() 20 | 21 | done := make(chan struct{}, 1) 22 | 23 | go func() { 24 | for { 25 | select { 26 | case ev := <-watcher.EventStream: 27 | if regexTempl.MatchString(ev.Path()) { 28 | log.Print(ev.Path()) 29 | go store.UploadFile(ev.Path()) 30 | } 31 | } 32 | } 33 | }() 34 | 35 | <-done 36 | log.Println("Done...") 37 | } 38 | -------------------------------------------------------------------------------- /ingest.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | docker run --net="host" --rm -v $(pwd):/files jrottenberg/ffmpeg:4.1 -hide_banner -re -f lavfi -i 'testsrc2=size=1280x720:rate=60,format=yuv420p' \ 4 | -f lavfi -i 'sine=frequency=440:sample_rate=48000:beep_factor=4' \ 5 | -c:a libfdk_aac -b:a 128x \ 6 | -c:v libx264 -x264opts keyint=30:min-keyint=30:scenecut=-1 -tune zerolatency \ 7 | -b:v 626k -g 30 -r 30 -s 512x288 -preset superfast -profile:v high -level 4.1 \ 8 | -c:a aac -b:a 32k -f mpegts udp://127.0.0.1:40001 \ 9 | -c:a libfdk_aac -b:a 128x \ 10 | -c:v libx264 -x264opts keyint=30:min-keyint=30:scenecut=-1 -tune zerolatency \ 11 | -b:v 1485k -g 30 -r 30 -s 768x432 -preset superfast -profile:v high -level 4.1 \ 12 | -c:a aac -b:a 32k -f mpegts udp://127.0.0.1:40002 \ 13 | -------------------------------------------------------------------------------- /conf/nginx/sites-available/minio.conf: -------------------------------------------------------------------------------- 1 | upstream minio_servers { 2 | server minio1:9000 max_fails=3 fail_timeout=15; 3 | server minio2:9000 max_fails=3 fail_timeout=15; 4 | server minio3:9000 max_fails=3 fail_timeout=15; 5 | server minio4:9000 max_fails=3 fail_timeout=15; 6 | } 7 | 8 | server { 9 | listen 80; 10 | 11 | location / { 12 | client_max_body_size 20m; 13 | client_body_buffer_size 5m; 14 | proxy_pass http://minio_servers; 15 | proxy_set_header Host $http_host; 16 | proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; 17 | proxy_set_header X-NginX-Proxy true; 18 | proxy_ssl_session_reuse off; 19 | proxy_redirect off; 20 | } 21 | 22 | location ~ ^/healthcheck$ { 23 | default_type text/html; 24 | return 200 "WORKING"; 25 | expires -1; 26 | } 27 | } -------------------------------------------------------------------------------- /api/store.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "io" 5 | "log" 6 | 7 | "github.com/minio/minio-go" 8 | ) 9 | 10 | type Store struct { 11 | Client *minio.Client 12 | } 13 | 14 | func NewStore() *Store { 15 | endpoint := "minio_proxy:80" 16 | accessKeyID := "minio" 17 | secretAccessKey := "minio123" 18 | client, err := minio.New(endpoint, accessKeyID, secretAccessKey, false) 19 | if err != nil { 20 | log.Fatal(err) 21 | } 22 | 23 | return &Store{Client: client} 24 | } 25 | 26 | func (s *Store) GetObject(resource string) ([]byte, error) { 27 | reader, err := s.Client.GetObject("video", resource, minio.GetObjectOptions{}) 28 | if err != nil { 29 | return nil, err 30 | } 31 | defer reader.Close() 32 | 33 | stat, err := reader.Stat() 34 | if err != nil { 35 | return nil, err 36 | } 37 | 38 | buf := make([]byte, stat.Size) 39 | _, err = reader.Read(buf) 40 | if err != nil { 41 | if err != io.EOF { 42 | return nil, err 43 | } 44 | } 45 | 46 | return buf, nil 47 | } 48 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Now Live - an open streaming platform 2 | 3 | Have some fun streaming videos :-) 4 | 5 | ## What is this? 6 | 7 | I created this project to experiment some video tools. Could this be an open streaming platform in the future? Yes. 8 | 9 | Have you ever used live streaming tools like Youtube, Instagram and Facebook? There is a lot going on behing the scenes. 10 | 11 | *Now Live* assembles some of these tools together, creating a platform where people can stream their videos, packaging it for multiple devices using standard video formats. 12 | 13 | ## How to use? 14 | 15 | `make now-live` will build and run all the tools (packager, storage, frontend servers, etc). 16 | 17 | `make ingest` produce and ingest a sample video so the packager can produce HLS playlists. 18 | 19 | **These two commands must run simultaneously.** 20 | 21 | Now you can point your browser to http://localhost:8080/play and play the sample video. 22 | 23 | ### Components 24 | 25 | #### Packager 26 | 27 | ... 28 | 29 | #### Recorder 30 | 31 | ... 32 | 33 | #### Storage 34 | 35 | ... 36 | 37 | #### Web server 38 | 39 | ... -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 Mauricio Antunes 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /recorder/store.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "log" 5 | 6 | "github.com/minio/minio-go" 7 | ) 8 | 9 | type Store struct { 10 | Client *minio.Client 11 | bucketName string 12 | } 13 | 14 | func NewStore(bucketName string) *Store { 15 | endpoint := "minio_proxy:80" 16 | accessKeyID := "minio" 17 | secretAccessKey := "minio123" 18 | client, err := minio.New(endpoint, accessKeyID, secretAccessKey, false) 19 | if err != nil { 20 | log.Fatal(err) 21 | } 22 | 23 | return &Store{Client: client, bucketName: bucketName} 24 | } 25 | 26 | func (s *Store) UploadFile(filePath string) { 27 | bucketName := "video" 28 | resource := Resource{File: filePath} 29 | 30 | n, err := s.Client.FPutObject(bucketName, resource.ObjectName("/app/media"), filePath, minio.PutObjectOptions{}) 31 | if err != nil { 32 | log.Fatalln(err) 33 | } 34 | 35 | log.Printf("Successfully uploaded %s of size %d\n", filePath, n) 36 | } 37 | 38 | func (s *Store) CreateBucket(bucketName string) error { 39 | err := s.Client.MakeBucket(bucketName, "us-east-1") 40 | if err != nil { 41 | exists, errExists := s.Client.BucketExists(bucketName) 42 | if errExists == nil && exists { 43 | return nil 44 | } 45 | return errExists 46 | } 47 | return err 48 | } 49 | -------------------------------------------------------------------------------- /api/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "mime" 5 | "net/http" 6 | "path/filepath" 7 | "strconv" 8 | 9 | "github.com/labstack/echo/v4" 10 | ) 11 | 12 | func init() { 13 | mime.AddExtensionType(".ts", "video/mp2t") 14 | mime.AddExtensionType(".m3u8", "application/vnd.apple.mpegurl") 15 | mime.AddExtensionType(".mp4", "video/mp4") 16 | } 17 | 18 | type API struct { 19 | *echo.Echo 20 | store *Store 21 | } 22 | 23 | func NewAPI() *API { 24 | return &API{ 25 | echo.New(), 26 | NewStore(), 27 | } 28 | } 29 | 30 | func main() { 31 | api := NewAPI() 32 | api.GET("/live/*", api.GetResource) 33 | api.Logger.Fatal(api.Start(":1323")) 34 | } 35 | 36 | func (a *API) GetResource(c echo.Context) error { 37 | resource := Resource{Path: c.Request().RequestURI} 38 | object, err := a.store.GetObject(resource.ObjectName()) 39 | if len(object) == 0 { 40 | c.Response().WriteHeader(http.StatusNotFound) 41 | return err 42 | } 43 | 44 | if err != nil { 45 | return err 46 | } 47 | 48 | contentType := mime.TypeByExtension(filepath.Ext(resource.Path)) 49 | c.Response().Header().Set(echo.HeaderContentType, contentType) 50 | c.Response().Header().Set(echo.HeaderContentLength, strconv.Itoa(len(object))) 51 | return c.String(http.StatusOK, string(object)) 52 | } 53 | -------------------------------------------------------------------------------- /frontend/nginx.conf: -------------------------------------------------------------------------------- 1 | events { 2 | worker_connections 1024; 3 | } 4 | 5 | error_log stderr; 6 | 7 | http { 8 | resolver 127.0.0.1 ipv6=off; 9 | 10 | upstream backend { 11 | server api:1323; 12 | } 13 | 14 | proxy_cache_path /tmp levels=1:2 keys_zone=now_live_cache:10m max_size=1g inactive=5m use_temp_path=off; 15 | 16 | server { 17 | listen 8080; 18 | 19 | location / { 20 | proxy_cache now_live_cache; 21 | proxy_cache_lock on; 22 | proxy_cache_lock_timeout 2s; 23 | proxy_cache_use_stale error timeout updating invalid_header; 24 | proxy_ignore_headers Cache-Control; 25 | 26 | if ($request_method = 'OPTIONS') { 27 | add_header 'Access-Control-Allow-Origin' '*'; 28 | add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS'; 29 | add_header 'Access-Control-Allow-Headers' 'DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range'; 30 | add_header 'Access-Control-Max-Age' 1728000; 31 | add_header 'Content-Type' 'text/plain; charset=utf-8'; 32 | add_header 'Content-Length' 0; 33 | return 204; 34 | } 35 | 36 | if ($request_method = 'GET') { 37 | add_header 'Access-Control-Allow-Origin' '*'; 38 | add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS'; 39 | add_header 'Access-Control-Allow-Headers' 'DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range'; 40 | add_header 'Access-Control-Expose-Headers' 'Content-Length,Content-Range'; 41 | } 42 | 43 | proxy_pass http://backend; 44 | } 45 | 46 | location /play { 47 | alias /usr/local/openresty/nginx; 48 | } 49 | } 50 | } -------------------------------------------------------------------------------- /frontend/player/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Now Live - an open streaming platform 5 | 6 | 7 |
8 | 49 | 50 | -------------------------------------------------------------------------------- /docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '3.8' 2 | 3 | services: 4 | recorder: 5 | build: 6 | context: ./recorder 7 | dockerfile: Dockerfile 8 | volumes: 9 | - video:/app/media 10 | 11 | packager: 12 | image: google/shaka-packager 13 | command: 14 | - /bin/sh 15 | - -c 16 | - | 17 | packager \ 18 | 'in=udp://0.0.0.0:40001?reuse=1,stream=audio,segment_template=/video/colors/audio/$$Number$$.aac,playlist_name=/video/colors/audio/main.m3u8,hls_group_id=audio,hls_name=ENGLISH' \ 19 | 'in=udp://0.0.0.0:40001?reuse=1,stream=video,segment_template=/video/colors/colors_288p/$$Number$$.ts,playlist_name=/video/colors/colors_288p/main.m3u8,iframe_playlist_name=/video/colors/colors_288p/iframe.m3u8' \ 20 | 'in=udp://0.0.0.0:40002?reuse=1,stream=video,segment_template=/video/colors/colors_432p/$$Number$$.ts,playlist_name=/video/colors/colors_432p/main.m3u8,iframe_playlist_name=/video/colors/colors_432p/iframe.m3u8' \ 21 | --hls_master_playlist_output /video/colors/playlist.m3u8 \ 22 | --hls_playlist_type LIVE 23 | volumes: 24 | - video:/video 25 | ports: 26 | - "40001:40001/udp" 27 | - "40002:40002/udp" 28 | 29 | api: 30 | build: 31 | context: ./api 32 | dockerfile: Dockerfile 33 | ports: 34 | - "1323:1323" 35 | 36 | minio_proxy: 37 | build: ./conf/nginx/ 38 | ports: 39 | - "8081:80" 40 | command: [nginx-debug, "-g", "daemon off;"] 41 | healthcheck: 42 | test: ["CMD", "curl", "-f", "http://localhost:80/healthcheck"] 43 | interval: 30s 44 | timeout: 20s 45 | retries: 3 46 | 47 | frontend: 48 | image: openresty/openresty:alpine 49 | volumes: 50 | - "./frontend/nginx.conf:/usr/local/openresty/nginx/conf/nginx.conf" 51 | - "./frontend/player/index.html:/usr/local/openresty/nginx/index.html" 52 | ports: 53 | - "8080:8080" 54 | 55 | minio1: 56 | image: minio/minio:RELEASE.2020-04-10T03-34-42Z 57 | volumes: 58 | - data1-1:/data1 59 | - data1-2:/data2 60 | ports: 61 | - "9001:9000" 62 | environment: 63 | MINIO_ACCESS_KEY: minio 64 | MINIO_SECRET_KEY: minio123 65 | command: server http://minio{1...4}/data{1...2} 66 | healthcheck: 67 | test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"] 68 | interval: 30s 69 | timeout: 20s 70 | retries: 3 71 | 72 | minio2: 73 | image: minio/minio:RELEASE.2020-04-10T03-34-42Z 74 | volumes: 75 | - data2-1:/data1 76 | - data2-2:/data2 77 | ports: 78 | - "9002:9000" 79 | environment: 80 | MINIO_ACCESS_KEY: minio 81 | MINIO_SECRET_KEY: minio123 82 | command: server http://minio{1...4}/data{1...2} 83 | healthcheck: 84 | test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"] 85 | interval: 30s 86 | timeout: 20s 87 | retries: 3 88 | 89 | minio3: 90 | image: minio/minio:RELEASE.2020-04-10T03-34-42Z 91 | volumes: 92 | - data3-1:/data1 93 | - data3-2:/data2 94 | ports: 95 | - "9003:9000" 96 | environment: 97 | MINIO_ACCESS_KEY: minio 98 | MINIO_SECRET_KEY: minio123 99 | command: server http://minio{1...4}/data{1...2} 100 | healthcheck: 101 | test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"] 102 | interval: 30s 103 | timeout: 20s 104 | retries: 3 105 | 106 | minio4: 107 | image: minio/minio:RELEASE.2020-04-10T03-34-42Z 108 | volumes: 109 | - data4-1:/data1 110 | - data4-2:/data2 111 | ports: 112 | - "9004:9000" 113 | environment: 114 | MINIO_ACCESS_KEY: minio 115 | MINIO_SECRET_KEY: minio123 116 | command: server http://minio{1...4}/data{1...2} 117 | healthcheck: 118 | test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"] 119 | interval: 30s 120 | timeout: 20s 121 | retries: 3 122 | 123 | ## By default this config uses default local driver, 124 | ## For custom volumes replace with volume driver configuration. 125 | volumes: 126 | data1-1: 127 | data1-2: 128 | data2-1: 129 | data2-2: 130 | data3-1: 131 | data3-2: 132 | data4-1: 133 | data4-2: 134 | video: -------------------------------------------------------------------------------- /api/go.sum: -------------------------------------------------------------------------------- 1 | github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8= 2 | github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= 3 | github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= 4 | github.com/go-ini/ini v1.56.0 h1:6HjxSjqdmgnujDPhlzR4a44lxK3w03WPN8te0SoUSeM= 5 | github.com/go-ini/ini v1.56.0/go.mod h1:ByCAeIL28uOIIG0E3PJtZPDL8WnHpFKFOtgjp+3Ies8= 6 | github.com/labstack/echo v1.4.4 h1:1bEiBNeGSUKxcPDGfZ/7IgdhJJZx8wV/pICJh4W2NJI= 7 | github.com/labstack/echo v3.3.10+incompatible h1:pGRcYk231ExFAyoAjAfD85kQzRJCRI8bbnE7CX5OEgg= 8 | github.com/labstack/echo/v4 v4.1.16 h1:8swiwjE5Jkai3RPfZoahp8kjVCRNq+y7Q0hPji2Kz0o= 9 | github.com/labstack/echo/v4 v4.1.16/go.mod h1:awO+5TzAjvL8XpibdsfXxPgHr+orhtXZJZIQCVjogKI= 10 | github.com/labstack/gommon v0.3.0 h1:JEeO0bvc78PKdyHxloTKiF8BD5iGrH8T6MSeGvSgob0= 11 | github.com/labstack/gommon v0.3.0/go.mod h1:MULnywXg0yavhxWKc+lOruYdAhDwPK9wf0OL7NoOu+k= 12 | github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= 13 | github.com/mattn/go-colorable v0.1.6 h1:6Su7aK7lXmJ/U79bYtBjLNaha4Fs1Rg9plHpcH+vvnE= 14 | github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= 15 | github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= 16 | github.com/mattn/go-isatty v0.0.9/go.mod h1:YNRxwqDuOph6SZLI9vUUz6OYw3QyUt7WiY2yME+cCiQ= 17 | github.com/mattn/go-isatty v0.0.12 h1:wuysRhFDzyxgEmMf5xjvJ2M9dZoWAXNNr5LSBS7uHXY= 18 | github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= 19 | github.com/minio/minio-go v1.0.0 h1:ooSujki+Z1PRGZsYffJw5jnF5eMBvzMVV86TLAlM0UM= 20 | github.com/minio/minio-go v6.0.14+incompatible h1:fnV+GD28LeqdN6vT2XdGKW8Qe/IfjJDswNVuni6km9o= 21 | github.com/minio/minio-go v6.0.14+incompatible/go.mod h1:7guKYtitv8dktvNUGrhzmNlA5wrAABTQXCoesZdFQO8= 22 | github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= 23 | github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= 24 | github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= 25 | github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= 26 | github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= 27 | github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk= 28 | github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= 29 | github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw= 30 | github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= 31 | github.com/valyala/fasttemplate v1.0.1/go.mod h1:UQGH1tvbgY+Nz5t2n7tXsz52dQxojPUpymEIMZ47gx8= 32 | github.com/valyala/fasttemplate v1.1.0 h1:RZqt0yGBsps8NGvLSGW804QQqCUYYLsaOjTVHy1Ocw4= 33 | github.com/valyala/fasttemplate v1.1.0/go.mod h1:UQGH1tvbgY+Nz5t2n7tXsz52dQxojPUpymEIMZ47gx8= 34 | golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= 35 | golang.org/x/crypto v0.0.0-20200221231518-2aa609cf4a9d h1:1ZiEyfaQIg3Qh0EoqpwAakHVhecoE5wlSg5GjnafJGw= 36 | golang.org/x/crypto v0.0.0-20200221231518-2aa609cf4a9d/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= 37 | golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= 38 | golang.org/x/net v0.0.0-20200226121028-0de0cce0169b h1:0mm1VjtFUOIlE1SbDlwjYaDxZVDP2S5ou6y0gSgXHu8= 39 | golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= 40 | golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= 41 | golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= 42 | golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 43 | golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 44 | golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 45 | golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae h1:/WDfKMnPU+m5M4xB+6x4kaepxRw6jWvR5iDRdvjHgy8= 46 | golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 47 | golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= 48 | golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs= 49 | golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= 50 | golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= 51 | gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= 52 | gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= 53 | gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw= 54 | gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= 55 | -------------------------------------------------------------------------------- /recorder/go.sum: -------------------------------------------------------------------------------- 1 | github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= 2 | github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= 3 | github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= 4 | github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= 5 | github.com/go-ini/ini v1.55.0 h1:0wVcG9udk2C3TGgmdIGKK9ScOZHZB5nbG+gwji9fhhc= 6 | github.com/go-ini/ini v1.55.0/go.mod h1:ByCAeIL28uOIIG0E3PJtZPDL8WnHpFKFOtgjp+3Ies8= 7 | github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= 8 | github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 h1:EGx4pi6eqNxGaHF6qqu48+N2wcFQ5qg5FXgOdqsJ5d8= 9 | github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= 10 | github.com/json-iterator/go v1.1.9 h1:9yzud/Ht36ygwatGx56VwCZtlI/2AD15T1X2sjSuGns= 11 | github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= 12 | github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo= 13 | github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= 14 | github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= 15 | github.com/minio/minio-go v1.0.0 h1:ooSujki+Z1PRGZsYffJw5jnF5eMBvzMVV86TLAlM0UM= 16 | github.com/minio/minio-go v6.0.14+incompatible h1:fnV+GD28LeqdN6vT2XdGKW8Qe/IfjJDswNVuni6km9o= 17 | github.com/minio/minio-go v6.0.14+incompatible/go.mod h1:7guKYtitv8dktvNUGrhzmNlA5wrAABTQXCoesZdFQO8= 18 | github.com/minio/minio-go/v6 v6.0.55 h1:Hqm41952DdRNKXM+6hCnPXCsHCYSgLf03iuYoxJG2Wk= 19 | github.com/minio/minio-go/v6 v6.0.55/go.mod h1:KQMM+/44DSlSGSQWSfRrAZ12FVMmpWNuX37i2AX0jfI= 20 | github.com/minio/sha256-simd v0.1.1 h1:5QHSlgo3nt5yKOJrC7W8w7X+NFl8cMPZm96iu8kKUJU= 21 | github.com/minio/sha256-simd v0.1.1/go.mod h1:B5e1o+1/KgNmWrSQK08Y6Z1Vb5pwIktudl0J58iy0KM= 22 | github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= 23 | github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= 24 | github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421 h1:ZqeYNhU3OHLH3mGKHDcjJRFFRrJa6eAM5H+CtDdOsPc= 25 | github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= 26 | github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742 h1:Esafd1046DLDQ0W1YjYsBW+p8U2u7vzgW2SQVmlNazg= 27 | github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= 28 | github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= 29 | github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= 30 | github.com/rjeczalik/notify v0.9.2 h1:MiTWrPj55mNDHEiIX5YUSKefw/+lCQVoAFmD6oQm5w8= 31 | github.com/rjeczalik/notify v0.9.2/go.mod h1:aErll2f0sUX9PXZnVNyeiObbmTlk5jnMoCa4QEjJeqM= 32 | github.com/sirupsen/logrus v1.5.0/go.mod h1:+F7Ogzej0PZc/94MaYx/nvG9jOFMD2osvC3s+Squfpo= 33 | github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d h1:zE9ykElWQ6/NYmHa3jpm/yHnI4xSofP+UP6SpjHcSeM= 34 | github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= 35 | github.com/smartystreets/goconvey v0.0.0-20190330032615-68dc04aab96a h1:pa8hGb/2YqsZKovtsgrwcDH1RZhVbTKCjLp47XpqCDs= 36 | github.com/smartystreets/goconvey v0.0.0-20190330032615-68dc04aab96a/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= 37 | github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= 38 | github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= 39 | github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q= 40 | github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= 41 | golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= 42 | golang.org/x/crypto v0.0.0-20190513172903-22d7a77e9e5f h1:R423Cnkcp5JABoeemiGEPlt9tHXFfw5kvc0yqlxRPWo= 43 | golang.org/x/crypto v0.0.0-20190513172903-22d7a77e9e5f/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= 44 | golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= 45 | golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= 46 | golang.org/x/net v0.0.0-20190522155817-f3200d17e092 h1:4QSRKanuywn15aTZvI/mIDEgPQpswuFndXpOj3rKEco= 47 | golang.org/x/net v0.0.0-20190522155817-f3200d17e092/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= 48 | golang.org/x/sys v0.0.0-20180926160741-c2ed4eda69e7/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= 49 | golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= 50 | golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 51 | golang.org/x/sys v0.0.0-20190422165155-953cdadca894 h1:Cz4ceDQGXuKRnVBDTS23GTn/pU5OE2C0WrNTOYK1Uuc= 52 | golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 53 | golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg= 54 | golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= 55 | golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= 56 | gopkg.in/ini.v1 v1.42.0 h1:7N3gPTt50s8GuLortA00n8AqRTk75qOP98+mTPpgzRk= 57 | gopkg.in/ini.v1 v1.42.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= 58 | --------------------------------------------------------------------------------