transcoder

module
v0.4.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 23, 2022 License: Apache-2.0

README

muxable/transcoder

This package implements a transcoding server. It accepts WebRTC signalled over gRPC and will respond with a transcoded track for each received track.

Are you interested in livestreaming video with WebRTC? Join us at Muxable!

Client SDK

For convenience if you don't want to deal with signalling and reconnection semantics, a lightweight client SDK is provided.

Example usage
import "github.com/muxable/transcoder/pkg/transcoder"

...

conn, err := grpc.Dial("localhost:50051", grpc.WithTransportCredentials(insecure.NewCredentials()))
if err != nil {
    return err
}

client, err := transcoder.NewClient(context.Background(), conn)
if err != nil {
    return err
}

transcoded, err := client.Transcode(track)
if err != nil {
    return err
}

Here, client.Transcode() accepts a TrackLocal and returns a TrackRemote. The mime type of the output track can also be specified, for example:

transcoded, err := client.Transcode(track, transcode.ToMimeType(webrtc.MimeTypeVP9))

Cloud hosting

If you are interested in using this service pre-deployed, please email kevin@muxable.com. We are exploring offering endpoints as a paid service.

Debugging

The transcoding server uses GStreamer under the hood. To view debug messages from GStreamer, set GST_DEBUG=3.

Directories

Path Synopsis
examples
internal/signal
Package signal contains helpers to exchange the SDP session description between examples.
Package signal contains helpers to exchange the SDP session description between examples.
internal
pkg

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL