Difference between revisions of "OBS Gstreamer plugin"
Jump to navigation
Jump to search
(42 intermediate revisions by the same user not shown) | |||
Line 7: | Line 7: | ||
#* Copy obs-gstreamer.dll into <strong>C:\Program Files\obs-studio\obs-plugins\64bit</strong> directory (if OBS installed into default destination) | #* Copy obs-gstreamer.dll into <strong>C:\Program Files\obs-studio\obs-plugins\64bit</strong> directory (if OBS installed into default destination) | ||
# Run OBS, open "add source" menu, you'll see <strong>GStreamer Source</strong> | # Run OBS, open "add source" menu, you'll see <strong>GStreamer Source</strong> | ||
[[File:Obs-gst1.jpg| | [[File:Obs-gst1.jpg|500px|none]] | ||
With default pipeline you must see default GStreamer test video | With default pipeline you must see default GStreamer test video | ||
<pre>videotestsrc is-live=true ! video/x-raw, framerate=30/1, width=960, height=540 ! video. audiotestsrc wave=ticks is-live=true ! audio/x-raw, channels=2, rate=44100 ! audio.</pre> | <pre>videotestsrc is-live=true ! video/x-raw, framerate=30/1, width=960, height=540 ! video. audiotestsrc wave=ticks is-live=true ! audio/x-raw, channels=2, rate=44100 ! audio.</pre> | ||
[[File:Obs-gst2.jpg| | [[File:Obs-gst2.jpg|500px|none]] | ||
<br><br> | |||
== For Mac == | |||
<br><br> | |||
[[File:Obs-gst3.jpg| | == For Linux == | ||
<br><br> | |||
== From Cosmostreamer to OBS == | |||
=== UDP Raw H264 === | |||
<strong>It is an incoming UDP stream, it may be blocked by Windows firewall. Disable firewall or add exception rule if not worked.</strong><br> | |||
Enable UDP Raw H264 streaming in Cosmostreamer device settings. <strong>192.168.1.67</strong> it's my laptop IP, in your case use proper IP | |||
[[File:Obs-gst3.jpg|500px|none]] | |||
<br><br> | |||
And use this pipeline for OBS GStreamer source | |||
<pre>udpsrc port=3000 buffer-size=600000000 ! h264parse ! avdec_h264 ! video.</pre> | |||
[[File:Obs-gst4.jpg|500px|none]] | |||
<br><br> | |||
=== TCP Raw H264 === | |||
Use this pipeline for OBS GStreamer source. Only one TCP connection is supported in current Cosmostreamer version. 192.168.1.61 is a my Cosmostreamer IP address, use your own instead. | |||
<pre>tcpclientsrc host=192.168.1.61 port=5252 ! h264parse ! avdec_h264 ! video.</pre> | |||
<br><br> | |||
=== UDP MPEG-TS === | |||
<br><br> | |||
=== RTSP === | |||
#Enable RTSP streaming in Cosmostreamer device settings (Device settings -> Streaming -> RTSP) | |||
#Use this pipeline for OBS GStreamer source. 192.168.1.61 is a my Cosmostreamer IP address, use your own instead. | |||
<pre>rtspsrc location=rtsp://192.168.1.61:554/video ! rtph264depay ! h264parse ! avdec_h264 ! video.</pre> | |||
<pre>rtspsrc location="rtsp://192.168.50.1:554/video" ! rtph264depay ! parsebin ! decodebin ! videoconvert ! video. </pre> | |||
<br><br> | |||
=== RTP === | |||
<strong>It is an incoming UDP stream, it may be blocked by Windows firewall. Disable firewall or add exception rule if not worked.</strong><br> | |||
#Enable RTP streaming in Cosmostreamer device settings. Fill "Clients" field with PC IP and port. For example, <strong>192.168.1.67:5000</strong> | |||
#Use this pipeline for OBS GStreamer source | |||
<pre>udpsrc port=5000 buffer-size=600000000 ! application/x-rtp,payload=96 ! rtph264depay ! h264parse ! avdec_h264 ! video.</pre> | |||
<br><br> | |||
=== SRT === | |||
==== OBS as caller ==== | |||
#Enable SRT streaming in Cosmostreamer device settings (Device settings -> Streaming -> SRT). Enter <strong>srt://:9001</strong> in SRT URL | |||
#Use this pipeline for OBS GStreamer source. 192.168.1.61 is a my Cosmostreamer IP address, use your own instead. | |||
<pre>srtclientsrc uri=srt://192.168.1.61:9001 ! tsdemux ! h264parse ! avdec_h264 ! video.</pre> | |||
==== OBS as listener ==== | |||
#Enable SRT streaming in Cosmostreamer device settings (Device settings -> Streaming -> SRT). Enter <strong>srt://192.168.1.67:9001</strong> in SRT URL, where 192.168.1.67 is a PC IP address. | |||
#Use this pipeline for OBS GStreamer source. | |||
<pre>srtclientsrc uri=srt://:9001 ! tsdemux ! h264parse ! avdec_h264 ! video.</pre> | |||
<br><br> | |||
[[Category:OBS]][[Category:Gstreamer]][[Category:Streaming]] |
Latest revision as of 06:35, 7 November 2024
For Windows
- Download and install OBS https://obsproject.com/download
- Download and install Gstreamer https://gstreamer.freedesktop.org/download/ (MinGW 64-bit runtime installer, use Full installation)
- IMPORTANT! Add gstreamer bin directory into PATH environment variable (System preferenses > Additional system params > Environment variables). Default bin directory location is C:\gstreamer\1.0\mingw_x86_64\bin
- Download OBS Gstreamer plugin https://github.com/fzwoch/obs-gstreamer/releases (latest release, obs-gstreamer.zip file)
- Extract obs-gstreamer.dll file from obs-gstreamer.zip
- Copy obs-gstreamer.dll into C:\Program Files\obs-studio\obs-plugins\64bit directory (if OBS installed into default destination)
- Run OBS, open "add source" menu, you'll see GStreamer Source
With default pipeline you must see default GStreamer test video
videotestsrc is-live=true ! video/x-raw, framerate=30/1, width=960, height=540 ! video. audiotestsrc wave=ticks is-live=true ! audio/x-raw, channels=2, rate=44100 ! audio.
For Mac
For Linux
From Cosmostreamer to OBS
UDP Raw H264
It is an incoming UDP stream, it may be blocked by Windows firewall. Disable firewall or add exception rule if not worked.
Enable UDP Raw H264 streaming in Cosmostreamer device settings. 192.168.1.67 it's my laptop IP, in your case use proper IP
And use this pipeline for OBS GStreamer source
udpsrc port=3000 buffer-size=600000000 ! h264parse ! avdec_h264 ! video.
TCP Raw H264
Use this pipeline for OBS GStreamer source. Only one TCP connection is supported in current Cosmostreamer version. 192.168.1.61 is a my Cosmostreamer IP address, use your own instead.
tcpclientsrc host=192.168.1.61 port=5252 ! h264parse ! avdec_h264 ! video.
UDP MPEG-TS
RTSP
- Enable RTSP streaming in Cosmostreamer device settings (Device settings -> Streaming -> RTSP)
- Use this pipeline for OBS GStreamer source. 192.168.1.61 is a my Cosmostreamer IP address, use your own instead.
rtspsrc location=rtsp://192.168.1.61:554/video ! rtph264depay ! h264parse ! avdec_h264 ! video.
rtspsrc location="rtsp://192.168.50.1:554/video" ! rtph264depay ! parsebin ! decodebin ! videoconvert ! video.
RTP
It is an incoming UDP stream, it may be blocked by Windows firewall. Disable firewall or add exception rule if not worked.
- Enable RTP streaming in Cosmostreamer device settings. Fill "Clients" field with PC IP and port. For example, 192.168.1.67:5000
- Use this pipeline for OBS GStreamer source
udpsrc port=5000 buffer-size=600000000 ! application/x-rtp,payload=96 ! rtph264depay ! h264parse ! avdec_h264 ! video.
SRT
OBS as caller
- Enable SRT streaming in Cosmostreamer device settings (Device settings -> Streaming -> SRT). Enter srt://:9001 in SRT URL
- Use this pipeline for OBS GStreamer source. 192.168.1.61 is a my Cosmostreamer IP address, use your own instead.
srtclientsrc uri=srt://192.168.1.61:9001 ! tsdemux ! h264parse ! avdec_h264 ! video.
OBS as listener
- Enable SRT streaming in Cosmostreamer device settings (Device settings -> Streaming -> SRT). Enter srt://192.168.1.67:9001 in SRT URL, where 192.168.1.67 is a PC IP address.
- Use this pipeline for OBS GStreamer source.
srtclientsrc uri=srt://:9001 ! tsdemux ! h264parse ! avdec_h264 ! video.