go-gst-launch

module
v0.0.10 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2020 License: MIT

README

go-gst-launch

A go package for creating piped gstreamer pipelines using libgstreamer and cgo.

go.dev reference

This package was originally written to aid the audio support in kvdi. But it made sense to turn it into an independent, consumable package.

See the go.dev reference for documentation and examples.

For other examples see the command line implementation here and the examples folder.

TODO: Write examples on programatically building the pipeline yourself

Requirements

For building applications with this library you need the following:

  • cgo: You must set CGO_ENABLED=1 in your environment when building
  • libgstreamer-1.0-dev: This package name may be different depending on your OS. You need the gst.h header files.

For running applications with this library you'll need to have libgstreamer-1.0 installed. Again, this package may be different depending on your OS.

CLI

There is a CLI utility included with this package that demonstrates some of the things you can do.

For now the functionality is limitted to GIF encoing and other arbitrary pipelines. If I extend it further I'll publish releases, but for now, you can retrieve it with go get.

go get github.com/tinyzimmer/go-gst-launch/cmd/go-gst-launch

The usage is described below:

Go-gst-launch is a CLI utility that can encode and decode both video and audio
to and from various formats. It's primary purpose is to showcase the functionality of 
the underlying go-gst-launch library.

Usage:
  go-gst-launch [command]

Available Commands:
  completion  Generate completion script
  gif         Encodes the given video to GIF format
  help        Help about any command
  pipeline    Run a generic pipeline
  websocket   Run a websocket audio proxy for streaming audio from a pulse server 
              and optionally recording to a virtual mic.

Flags:
  -I, --from-stdin      Write to the pipeline from stdin. If this is specified, then -i is ignored.
  -h, --help            help for go-gst-launch
  -i, --input string    An input file, defaults to the first element in the pipeline.
  -o, --output string   An output file, defaults to the last element in the pipeline.
  -O, --to-stdout       Writes the results from the pipeline to stdout. If this is specified, then -o is ignored.
  -v, --verbose         Verbose output. This is ignored when used with --to-stdout.

Use "go-gst-launch [command] --help" for more information about a command.

Directories

Path Synopsis
cmd
Package gst provides wrappers for building gstreamer pipelines and then reading and/or writing from either end of the pipeline.
Package gst provides wrappers for building gstreamer pipelines and then reading and/or writing from either end of the pipeline.

Jump to

Keyboard shortcuts

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