diff --git a/README.md b/README.md index 330b15d3..57e961b9 100644 --- a/README.md +++ b/README.md @@ -30,12 +30,12 @@ Irrespective of method used, when moving between protocols, containers or encodi ## Supported Output -| Egress Type | MP4 File | OGG File | WebM File | HLS (TS Segments) | RTMP(s) Stream | WebSocket Stream | -|-----------------|----------|----------|-----------|-------------------|----------------|------------------| -| Room Composite | ✅ | ✅ | | ✅ | ✅ | | -| Web | ✅ | ✅ | | ✅ | ✅ | | -| Track Composite | ✅ | ✅ | | ✅ | ✅ | | -| Track | ✅ | ✅ | ✅ | | | ✅ | +| Egress Type | MP4 File | OGG File | WebM File | HLS (TS Segments) | RTMP(s) Stream | WebSocket Stream | Thumbnails (JPEGs) | +|-----------------|----------|----------|-----------|-------------------|----------------|------------------|--------------------| +| Room Composite | ✅ | ✅ | | ✅ | ✅ | | ✅ | +| Web | ✅ | ✅ | | ✅ | ✅ | | ✅ | +| Track Composite | ✅ | ✅ | | ✅ | ✅ | | ✅ | +| Track | ✅ | ✅ | ✅ | | | ✅ | | Files can be uploaded to any S3 compatible storage, Azure, or GCP. diff --git a/go.mod b/go.mod index 682fec49..1123143f 100644 --- a/go.mod +++ b/go.mod @@ -19,7 +19,7 @@ require ( github.com/gorilla/websocket v1.5.1 github.com/livekit/livekit-server v1.5.1-0.20231026153736-8b16db227070 github.com/livekit/mageutil v0.0.0-20230125210925-54e8a70427c1 - github.com/livekit/protocol v1.9.10-0.20240226133535-4a97b5832859 + github.com/livekit/protocol v1.9.10-0.20240226212446-6e689b5c3569 github.com/livekit/psrpc v0.5.3-0.20240209001357-380f59f00c58 github.com/livekit/server-sdk-go/v2 v2.0.1 github.com/pion/rtp v1.8.3 diff --git a/go.sum b/go.sum index f1eb6595..15033baf 100644 --- a/go.sum +++ b/go.sum @@ -173,8 +173,8 @@ github.com/livekit/mageutil v0.0.0-20230125210925-54e8a70427c1 h1:jm09419p0lqTkD github.com/livekit/mageutil v0.0.0-20230125210925-54e8a70427c1/go.mod h1:Rs3MhFwutWhGwmY1VQsygw28z5bWcnEYmS1OG9OxjOQ= github.com/livekit/mediatransportutil v0.0.0-20231213075826-cccbf2b93d3f h1:XHrwGwLNGQB3ZqolH1YdMH/22hgXKr4vm+2M7JKMMGg= github.com/livekit/mediatransportutil v0.0.0-20231213075826-cccbf2b93d3f/go.mod h1:GBzn9xL+mivI1pW+tyExcKgbc0VOc29I9yJsNcAVaAc= -github.com/livekit/protocol v1.9.10-0.20240226133535-4a97b5832859 h1:RMCwDi66XgCm3vZsH8cmhBICHLH2tYIiyps/XwVpIf0= -github.com/livekit/protocol v1.9.10-0.20240226133535-4a97b5832859/go.mod h1:Ppvb/6576ksmTTHATnG+73nk65U7CxDnFVsRQ7+zAkc= +github.com/livekit/protocol v1.9.10-0.20240226212446-6e689b5c3569 h1:lVAQS1tF/NMxcmRSAgm7bE4FkAm0gSHrS2skfltZZyo= +github.com/livekit/protocol v1.9.10-0.20240226212446-6e689b5c3569/go.mod h1:Ppvb/6576ksmTTHATnG+73nk65U7CxDnFVsRQ7+zAkc= github.com/livekit/psrpc v0.5.3-0.20240209001357-380f59f00c58 h1:yH55rBGLRO+ict2mu6bKZ5iPwTIrIwU1i0ydgThi4+k= github.com/livekit/psrpc v0.5.3-0.20240209001357-380f59f00c58/go.mod h1:cQjxg1oCxYHhxxv6KJH1gSvdtCHQoRZCHgPdm5N8v2g= github.com/livekit/server-sdk-go/v2 v2.0.1 h1:qwuMK7WUd30DM7IJ2sOqpQcZcHqP02tzs5Y6CRsV4Lg= diff --git a/pkg/config/output.go b/pkg/config/output.go index 7d546ca6..9e001b8d 100644 --- a/pkg/config/output.go +++ b/pkg/config/output.go @@ -17,6 +17,7 @@ package config import ( "github.com/livekit/egress/pkg/errors" "github.com/livekit/egress/pkg/types" + "github.com/livekit/protocol/egress" "github.com/livekit/protocol/livekit" "github.com/livekit/protocol/utils" ) @@ -33,27 +34,7 @@ func (o outputConfig) GetOutputType() types.OutputType { return o.OutputType } -type EncodedOutput interface { - GetFileOutputs() []*livekit.EncodedFileOutput - GetStreamOutputs() []*livekit.StreamOutput - GetSegmentOutputs() []*livekit.SegmentedFileOutput - ImageOutput -} - -type EncodedOutputDeprecated interface { - GetFile() *livekit.EncodedFileOutput - GetStream() *livekit.StreamOutput - GetSegments() *livekit.SegmentedFileOutput - GetFileOutputs() []*livekit.EncodedFileOutput - GetStreamOutputs() []*livekit.StreamOutput - GetSegmentOutputs() []*livekit.SegmentedFileOutput -} - -type ImageOutput interface { - GetImageOutputs() []*livekit.ImageOutput -} - -func (p *PipelineConfig) updateEncodedOutputs(req EncodedOutput) error { +func (p *PipelineConfig) updateEncodedOutputs(req egress.EncodedOutput) error { files := req.GetFileOutputs() streams := req.GetStreamOutputs() segments := req.GetSegmentOutputs() @@ -63,7 +44,7 @@ func (p *PipelineConfig) updateEncodedOutputs(req EncodedOutput) error { var file *livekit.EncodedFileOutput switch len(files) { case 0: - if r, ok := req.(EncodedOutputDeprecated); ok { + if r, ok := req.(egress.EncodedOutputDeprecated); ok { file = r.GetFile() } case 1: @@ -95,7 +76,7 @@ func (p *PipelineConfig) updateEncodedOutputs(req EncodedOutput) error { var stream *livekit.StreamOutput switch len(streams) { case 0: - if r, ok := req.(EncodedOutputDeprecated); ok { + if r, ok := req.(egress.EncodedOutputDeprecated); ok { stream = r.GetStream() } case 1: @@ -135,7 +116,7 @@ func (p *PipelineConfig) updateEncodedOutputs(req EncodedOutput) error { var segment *livekit.SegmentedFileOutput switch len(segments) { case 0: - if r, ok := req.(EncodedOutputDeprecated); ok { + if r, ok := req.(egress.EncodedOutputDeprecated); ok { segment = r.GetSegments() } case 1: @@ -242,7 +223,7 @@ func (p *PipelineConfig) updateImageOutputs(images []*livekit.ImageOutput) error return nil } -func redactEncodedOutputs(out EncodedOutput) { +func redactEncodedOutputs(out egress.EncodedOutput) { if files := out.GetFileOutputs(); len(files) == 1 { redactUpload(files[0]) } @@ -252,7 +233,7 @@ func redactEncodedOutputs(out EncodedOutput) { if segments := out.GetSegmentOutputs(); len(segments) == 1 { redactUpload(segments[0]) } - if o, ok := out.(EncodedOutputDeprecated); ok { + if o, ok := out.(egress.EncodedOutputDeprecated); ok { if file := o.GetFile(); file != nil { redactUpload(file) } else if stream := o.GetStream(); stream != nil {