go-gst

module
v0.0.10 Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2020 License: LGPL-2.1

README

go-gst

Go bindings for the gstreamer C library

go.dev reference godoc reference GoReportCard

See the godoc.org or pkg.go.dev references for documentation and examples. As the latter requires published tags, see godoc.org for the latest documentation of master at any point in time.

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

Requirements

For building applications with this library you need the following:

  • cgo: You must set CGO_ENABLED=1 in your environment when building.
  • gcc and pkg-config
  • libgstreamer-1.0-dev: This package name may be different depending on your OS. You need the gst.h header files.
    • In some distributions (such as alpine linux) this is in the gstreamer-dev package.
  • To use the pbutils, app, gstauto/app packages you will need additional dependencies:
    • libgstreamer-app-1.0-dev: This package name may also be different depending on your os. You need the gstappsink.h and gstappsrc.h
      • In some distributions (such as alpine linux) this is in the gst-plugins-base-dev package.
      • In Ubuntu this is in libgstreamer-plugins-base1.0-0.
  • You may need platform specific headers also. For example, in alpine linux, you will most likely also need the musl-dev package.

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, inspection, 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/cmd/go-gst

The usage is described below:

Go-gst is a CLI utility aiming to implement the core functionality
of the core gstreamer-tools. It's primary purpose is to showcase the functionality of 
the underlying go-gst library.

There are also additional commands showing some of the things you can do with the library,
such as websocket servers reading/writing to/from local audio servers and audio/video/image
encoders/decoders.

Usage:
  go-gst [command]

Available Commands:
  completion  Generate completion script
  gif         Encodes the given video to GIF format
  help        Help about any command
  inspect     Inspect the elements of the given pipeline string
  launch      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
  -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 [command] --help" for more information about a command.

Directories

Path Synopsis
cmd
go-gst
There are also additional commands showing some of the things you can do with the library, such as websocket servers reading/writing to/from local audio servers and audio/video/image encoders/decoders.
There are also additional commands showing some of the things you can do with the library, such as websocket servers reading/writing to/from local audio servers and audio/video/image encoders/decoders.
appsink
This example shows how to use the appsink element.
This example shows how to use the appsink element.
appsrc
This example shows how to use the appsrc element.
This example shows how to use the appsrc element.
custom_events
This example demonstrates the use of custom events in a pipeline.
This example demonstrates the use of custom events in a pipeline.
decodebin
This example demonstrates the use of the decodebin element.
This example demonstrates the use of the decodebin element.
discoverer
This example uses gstreamer's discoverer api.
This example uses gstreamer's discoverer api.
plugins/minio Module
gst
Package gst contains bindings for the gstreamer C API.
Package gst contains bindings for the gstreamer C API.
app
Package app contains bindings for the gstreamer-app C API.
Package app contains bindings for the gstreamer-app C API.
gstauto
Package gstauto contains helper methods and objects for building pipelines that satisfy most use cases.
Package gstauto contains helper methods and objects for building pipelines that satisfy most use cases.
gstauto/app
Package app provides interfaces from the gstauto package that use the gstreamer-app library for interacting with either end of the pipeline.
Package app provides interfaces from the gstauto package that use the gstreamer-app library for interacting with either end of the pipeline.
pbutils
Package pbutils contains bindings for libgstpbutils.
Package pbutils contains bindings for libgstpbutils.

Jump to

Keyboard shortcuts

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