Examples - fzwoch/obs-gstreamer GitHub Wiki
Video
RaspberryPi Examples
RaspberryPi with USB WebCam -> OBS Source:
On RaspberryPi:
v4l2src extra-controls="c,gain=50,exposure_auto=1,focus_auto=0,focus_absolute=0,exposure_auto_priority=0,exposure_absolute=600,sharpness=200" do-timestamp=true ! image/jpeg,width=1280,height=720,framerate=30/1 ! mux. matroskamux name=mux ! queue ! tcpclientsink host={obs_ip_address} port={port}
Note: The v4l2 controls specified here may be discovered / listed by running v4l2-ctl --all
from a terminal session on a machine with an attached v4l2 compliant device.
On OBS-Gstreamer plugin:
tcpserversrc host=0.0.0.0 port={port} ! queue ! matroskademux name=demux demux. ! decodebin ! queue ! video.
RaspberryPi Camera -> OBS Source:
On RaspberryPi:
rpicamsrc name=videosrc keyframe-interval=10 shutter-speed=0 iso=600 drc=0 exposure-mode=1 metering-mode=1 awb_mode=6 bitrate=0 quantisation-parameter=22 do-timestamp=true ! h264parse ! video/x-h264,framerate=30/1,width=1280,height=720 ! mux. matroskamux name=mux ! queue ! tcpclientsink host={obs_ip_address} port={port}
Note: This assumes https://github.com/thaytan/gst-rpicamsrc is installed on the RaspberryPi. Please refer to the README.MD in that repository for installation instructions.
On OBS-Gstreamer plugin:
tcpserversrc host=0.0.0.0 port={port} ! queue ! matroskademux name=demux demux. ! decodebin ! queue ! video.
Screencapture on remote machine
On remote machine:
ximagesrc name=videosrc use-damage=false ! videocrop left=1280 ! jpegenc ! image/jpeg,framerate=29/1 ! mux. matroskamux name=mux ! queue ! tcpclientsink host={obs_ip_address} port={port}
On OBS-Gstreamer plugin:
tcpserversrc host=0.0.0.0 port={port} ! queue ! matroskademux name=demux demux. ! decodebin ! queue ! video.
Audio
Allen and Heath QU32 Source Example
On Mixer: Configure "IO Patch" | "USB Routing", and ensure appropriate channel routing. NOTE which buses / channels are mapped to each of the 32 available USB channels.
Note: Prior to mixer firmware version 1.95, USB audio streaming was unreliable.
Forum Link 1
1.95 Release Notes
1.95 Support Forum
For instance, to capture Mix9-10
on USB Channels 1-2, use this config:
On OBS:
videotestsrc pattern=ball ! video. alsasrc name=audiosrc device=hw:1 ! audio/x-raw,channels=32,layout=interleaved,rate=48000 ! queue ! deinterleave name=d interleave name=i d.src_0 ! queue ! audioconvert ! i.sink_0 d.src_1 ! queue ! audioconvert ! i.sink_1 i. ! audio.
Audinate Dante multicast flow
On Dante Controller:
Set up a stereo multicast flow and somehow figure out the multicast address for it. (You can use the snooper script in my standalone project.) I tested this with the trial of Dante Via, we'll see if it works with the expensive stuff. I just hacked this together with netcat and messing with sample rates in aplay since the whole Dante protocol is a black box. If you only get white noise I guess Dante could be using some other sample rate or format too.
On OBS:
udpsrc address=239.255.x.x port=4321 skip-first-bytes=9 ! audio/x-raw,channels=2,rate=48000,format=S24BE ! audio.
RTSP Sources (e.g. an IP camera -> OBS)
On OBS: (h264)
Make note to change the credentials as necessary for your RTSP stream, and the url path, every RTSP device has a little different formatting to it, so find what works in VLC or your devices manual and then adjust at that point. admin:admin is the example of username:password, if you don't need those fields you can remove them.
rtspsrc location="rtsp://admin:[email protected]:554/1" latency=0 buffer-mode=auto ! rtph264depay ! h264parse ! d3d11h264dec ! video.
On OBS: (h265)
Make note to change the credentials as necessary for your RTSP stream, and the url path, every RTSP device has a little different formatting to it, so find what works in VLC or your devices manual and then adjust at that point. admin:admin is the example of username:password, if you don't need those fields you can remove them.
rtspsrc location="rtsp://admin:[email protected]:554/1" latency=0 buffer-mode=auto ! rtph265depay ! h265parse ! d3d11h265dec ! video.