ion-sfu-gstreamer-send

command module
v0.0.0-...-55b4e76 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2022 License: MIT Imports: 7 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

Gstreamer send

Gstreamer-send is a simple application that shows how to send video to your ion-sfu using ion-sdk-go and GStreamer.

Install GStreamer

This example requires you have GStreamer installed, these are the supported platforms

Debian/Ubuntu

sudo apt-get install libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev gstreamer1.0-plugins-good

Windows MinGW64/MSYS2

pacman -S mingw-w64-x86_64-gstreamer mingw-w64-x86_64-gst-libav mingw-w64-x86_64-gst-plugins-good mingw-w64-x86_64-gst-plugins-bad mingw-w64-x86_64-gst-plugins-ugly

macOS

brew install gst-plugins-good gst-plugins-ugly pkg-config && export PKG_CONFIG_PATH="/usr/local/opt/libffi/lib/pkgconfig"

Run the application

go run main.go -addr "localhost:50051" -session "test session"

Customizing your video or audio

Gstreamer send also accepts the command line arguments -video-src and -audio-src allowing you to provide custom inputs.

When prototyping with GStreamer it is highly recommended that you enable debug output, this is done by setting the GST_DEBUG enviroment variable. You can read about that here a good default value is GST_DEBUG=*:3

You can also prototype a GStreamer pipeline by using gst-launch-1.0 to see how things look before trying them with gstreamer-send for the examples below you also may need additional setup to enable extra video codecs like H264. The output from GST_DEBUG should give you hints

These pipelines work on Linux, they may have issues on other platforms. We would love PRs for more example pipelines that people find helpful!

  • a webcam, with computer generated audio.

    go run main.go -addr "localhost:50051" -session "test session" -video-src "autovideosrc ! video/x-raw, width=320, height=240 ! videoconvert ! queue"

  • a pre-recorded video, sintel.mkv is available here

    go run main.go -addr "localhost:50051" -session "test session" -video-src "uridecodebin uri=file:///tmp/sintel.mkv ! videoscale ! video/x-raw, width=320, height=240 ! queue " -audio-src "uridecodebin uri=file:///tmp/sintel.mkv ! queue ! audioconvert"

Raspivid UDP Examples

go run main.go -addr "localhost:50051" -session "test session" -video-src "udpsrc port=9000 ! h264parse ! rtph264pay config-interval=10 pt=96 ! rtph264depay ! avdec_h264 ! videoconvert ! autovideosink sync=false" 
go run main.go -addr "localhost:50051" -session "test session" -video-src "udpsrc port=9000 ! h264parse ! rtph264pay config-interval=10 pt=96 ! rtph264depay ! avdec_h264 ! videoconvert" 

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

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