2018-09-04 14:32:01 +00:00
|
|
|
GStreamer NDI Plugin
|
|
|
|
====================
|
2018-04-09 05:53:04 +00:00
|
|
|
|
2018-09-04 14:32:01 +00:00
|
|
|
*Compiled and tested with Ubuntu 16.04.5 and GStreamer 1.8.3*
|
2018-04-09 05:56:38 +00:00
|
|
|
|
2018-09-04 14:32:01 +00:00
|
|
|
Before compile the element it's necessary install Rust, NDI SDK and the following packages for gstreamer:
|
2018-04-12 13:14:59 +00:00
|
|
|
|
|
|
|
```
|
2018-09-04 14:32:01 +00:00
|
|
|
apt-get install libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev \
|
2018-04-12 13:14:59 +00:00
|
|
|
gstreamer1.0-plugins-base gstreamer1.0-plugins-good \
|
|
|
|
gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly \
|
|
|
|
gstreamer1.0-libav libgstrtspserver-1.0-dev
|
|
|
|
```
|
|
|
|
|
|
|
|
|
2018-09-04 14:32:01 +00:00
|
|
|
Compile NDI element and basic pipelines
|
2018-04-09 05:53:04 +00:00
|
|
|
-------
|
|
|
|
|
|
|
|
```
|
|
|
|
cargo build
|
|
|
|
export GST_PLUGIN_PATH=`pwd`/target/debug
|
2018-04-26 10:30:13 +00:00
|
|
|
|
2018-09-04 14:32:01 +00:00
|
|
|
gst-inspect-1.0 ndi
|
|
|
|
gst-inspect-1.0 ndivideosrc
|
|
|
|
gst-inspect-1.0 ndiaudiosrc
|
2018-05-31 09:19:01 +00:00
|
|
|
|
2018-09-04 14:32:01 +00:00
|
|
|
gst-launch-1.0 ndivideosrc stream-name="GC-DEV2 (OBS)" ! autovideosink
|
|
|
|
gst-launch-1.0 ndiaudiosrc stream-name="GC-DEV2 (OBS)" ! autoaudiosink
|
2018-05-31 09:19:01 +00:00
|
|
|
|
2018-09-04 14:32:01 +00:00
|
|
|
gst-launch-1.0 ndivideosrc stream-name="GC-DEV2 (OBS)" ! autovideosink ndiaudiosrc stream-name="GC-DEV2 (OBS)" ! autoaudiosink
|
2018-07-02 12:08:15 +00:00
|
|
|
|
2018-09-04 14:32:01 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
Debug pipelines:
|
|
|
|
```
|
|
|
|
#Check if the timestamps are correct
|
2018-07-02 12:08:15 +00:00
|
|
|
gst-launch-1.0 -v ndivideosrc name=gc-ndi-src stream-name="GC-DEV2 (OBS)" ! fakesink silent=false
|
2018-09-04 14:32:01 +00:00
|
|
|
|
|
|
|
#Debug sink to check if jitter is correct
|
2018-07-02 12:08:15 +00:00
|
|
|
GST_DEBUG=*basesink*:5 gst-launch-1.0 -v ndivideosrc name=gc-ndi-src stream-name="GC-DEV2 (OBS)" ! autovideosink
|
|
|
|
|
2018-09-04 14:32:01 +00:00
|
|
|
#Add latency when launching the pipeline
|
|
|
|
gst-launch-1.0 -v ndivideosrc name=gc-ndi-src stream-name="GC-DEV2 (OBS)" ! autovideosink ts-offset=1000000000
|
2018-04-09 05:53:04 +00:00
|
|
|
```
|
2018-09-04 14:32:01 +00:00
|
|
|
|
|
|
|
More info about GStreamer plugins and Rust:
|
|
|
|
----------------------------------
|
|
|
|
https://coaxion.net/blog/2018/01/how-to-write-gstreamer-elements-in-rust-part-1-a-video-filter-for-converting-rgb-to-grayscale/
|
|
|
|
https://coaxion.net/blog/2018/02/how-to-write-gstreamer-elements-in-rust-part-2-a-raw-audio-sine-wave-source/
|