obs-gstreamer

obs-gstreamer 0.4.1

Hello JohnPW, we have a very comparable setup. We use a NVidia card to off load the CPU. Here is one of our pipelines :

rtspsrc location=rtspt://url latency=100 ! rtph264depay ! h264parse ! nvh264dec ! video.

Mind the rtspt , it means we use tcp instead of udp. Gives a lot better stability in our setup. Please let us know if this helps you !
Hi,
I'm having the same issue, your url shows my cams in the source but the "freeze and catch ups" still appear. I use GStreamer as source and also as Video Encoder "GSTream Encoder H.264" with Encoder Type "NVIDIA (NVENC)" at 2500 bitrate 1280x720 25fps.
My upload speed is 35mbps so pretty fast.
Any suggestion?

live: https://www.vrijeradiobelsele.be/
 
Hi,
I'm having the same issue, your url shows my cams in the source but the "freeze and catch ups" still appear. I use GStreamer as source and also as Video Encoder "GSTream Encoder H.264" with Encoder Type "NVIDIA (NVENC)" at 2500 bitrate 1280x720 25fps.
My upload speed is 35mbps so pretty fast.
Any suggestion?

live: https://www.vrijeradiobelsele.be/
Hello, sorry for the late reply... my setup works with very little problems so i am not very active anymore on this forum.

I am sure other people may be able to help better, but i give it a try. Please correct me where necessary..

1. is the problem in the decoding of the source in OBS or in the coding ? Try watching the stream within OBS to check on freeze and catch up, without the encoding enabled.
2. is the problem in the coding section ? Try to play a known mp4 file as source to have 'unsuspected' input.
3. is the pc too busy ? If workload of the PC gets too high, strange effects can occur
4. should not matter but are input and output framerates and resolutions matched correctly ?
5. doe the problem occur if you work with half the resolution or framerate ? If not, workload might be too high given the PC capabilities
6. try rtsp instead of rtspt , may be this helps.
7. try inserting a buffer function in the pipeline to see if this might help

I stated this before, streamer has some steep learning curve, and i am still learning ...
 
Great plug in, I was wondering, is there a way to use it to accelerate media source and stinger transition ? I am running on an NVIDIA Jetson and have successfully managed to get hardware encode going with the plug in but all medias are still decoded in software at the moment.
 
Great plug in, I was wondering, is there a way to use it to accelerate media source and stinger transition ? I am running on an NVIDIA Jetson and have successfully managed to get hardware encode going with the plug in but all medias are still decoded in software at the moment.
Not with existing plugins. You can use the source as a very simple media player though.
 
sumtingwong.png


I like to believe this is not happening by design, stream opens on external window as still image.

Running stream from Raspberry pi with: gst-launch-1.0 -v v4l2src device=/dev/video0 ! videoconvert ! videoscale ! video/x-raw,width=640,height=480 ! x264enc tune=zerolatency ! rtph264pay name=pay0 pt=96 config-interval=1 ! udpsink host=192.168.0.100 port=5000

on obs I setup:

gst-launch-1.0 -v udpsrc port=5000 ! application/x-rtp, encoding-name=H264, payload=96 ! rtph264depay ! avdec_h264 ! autovideosink

which (obs side) now when mentioned I think might not be correct...


Please send help.
 
View attachment 97626

I like to believe this is not happening by design, stream opens on external window as still image.

Running stream from Raspberry pi with: gst-launch-1.0 -v v4l2src device=/dev/video0 ! videoconvert ! videoscale ! video/x-raw,width=640,height=480 ! x264enc tune=zerolatency ! rtph264pay name=pay0 pt=96 config-interval=1 ! udpsink host=192.168.0.100 port=5000

on obs I setup:

gst-launch-1.0 -v udpsrc port=5000 ! application/x-rtp, encoding-name=H264, payload=96 ! rtph264depay ! avdec_h264 ! autovideosink

which (obs side) now when mentioned I think might not be correct...


Please send help.
Please check the README how to construct the pipeline. You propbably don´t want an autovideosink there.
 
The 0.4.0 plugin is causing OBS to crash. I am using a string similar to

rtspsrc location=rtsp://Operator:Sh3k1nah_@192.168.4.94:554/Streaming/channels/101 latency=400 ! queue ! rtph265depay ! h265parse ! d3d11h265dec ! video.

No problem running a similar string via gst-launch-1.0
gst-launch-1.0 rtspsrc location=rtsp://Operator:Sh3k1nah_@192.168.4.94:554/Streaming/channels/101 latency=400 ! queue ! rtph265depay ! h265parse ! d3d11h265dec ! autovideosink

Running on Windows 11.
Attaching the crash report.
OBS crashes a few seconds after loading if the selected scenes in Studio Mode has any of the GStreamer sources in them

1695435813661.png
 

Attachments

The 0.4.0 plugin is causing OBS to crash. I am using a string similar to

rtspsrc location=rtsp://Operator:Sh3k1nah_@192.168.4.94:554/Streaming/channels/101 latency=400 ! queue ! rtph265depay ! h265parse ! d3d11h265dec ! video.

No problem running a similar string via gst-launch-1.0
gst-launch-1.0 rtspsrc location=rtsp://Operator:Sh3k1nah_@192.168.4.94:554/Streaming/channels/101 latency=400 ! queue ! rtph265depay ! h265parse ! d3d11h265dec ! autovideosink

Running on Windows 11.
Attaching the crash report.
OBS crashes a few seconds after loading if the selected scenes in Studio Mode has any of the GStreamer sources in them

View attachment 97950
Looks like a GStreamer runtime crash. Do what GStreamer version are you using? But most likely has to be reported upstream.
 
Hello, I'm pretty new on debugging gstreamer obs plugin. I have already set the third level on my environment variables, but I still dont know how to see the logs of the obs-gstreamer plugin. I dont know if I have to use an specific trace for this or if I have to do an additional step. does someone know how could I proceed?. Thanks in advance. (Im using Gstreamer 1.18.5 and OBS 27.1.1)
 
Hi, does the obs-gstreamer plugin support single source multiple sinks display? For example, if my gst-launch-1.0 command is

gst-launch-1.0 -v v4l2src device=/dev/video0 ! tee name=t \
t. ! queue ! videoscale ! video/x-raw,width=640,height=480 ! \
videoconvert ! autovideosink \
t. ! queue ! videoscale ! video/x-raw,width=320,height=240 ! \
videoconvert ! fpsdisplaysink video-sink=ximagesink sync=true text-overlay=false

How can I launch this GStreamer pipeline inside OBS?

inside OBS if I use

v4l2src device=/dev/video0 ! tee name=t \
t. ! queue ! videoscale ! video/x-raw,width=640,height=480 ! \
videoconvert ! video. \
t. ! queue ! videoscale ! video/x-raw,width=320,height=240 ! \
videoconvert ! video.

it doesn't work.

Thank you
 
One source in OBS has always a single video window. Try looking at the ipc plugin of GStreamer.
 
Last edited:
The GStreamer runtime. Please read the README.
Uninstalled OBS and GStreamer, then clean install OBS 30.0.0 Full, gstreamer-1.0-mingw-x86_64-1.22.7.msi and obs-gstreamer.dll (0.4.0) in Windows 11 Asus laptop.
Path added for GStreamer = D:\gstreamer\1.0\mingw_x86_64\bin\

Ran successfully the GStreamer test pipeline in Windows cmd prompt
> gst-launch-1.0 -vvv videotestsrc ! autovideosink

OBS Studio runs but same error in the log
> Module '../../obs-plugins/64bit/obs-gstreamer.dll' not loaded

??? Should I be using older versions of gstreamer-1.0-mingw-x86_64 or obs-gstreamer plugin for Windows 11?
( I have no problems with the OBS/GStreamer setup on my other laptop and Desktop using Windows 10 )

Log file attached - Note that several other dlls not recognised under Windows 11 by OBS Studio
 

Attachments

Last edited:
Uninstalled OBS and GStreamer, then clean install OBS 30.0.0 Full, gstreamer-1.0-mingw-x86_64-1.22.7.msi and obs-gstreamer.dll (0.4.0) in Windows 11 Asus laptop.
Path added for GStreamer = D:\gstreamer\1.0\mingw_x86_64\bin\

Ran successfully the GStreamer test pipeline in Windows cmd prompt
> gst-launch-1.0 -vvv videotestsrc ! autovideosink

OBS Studio runs but same error in the log
> Module '../../obs-plugins/64bit/obs-gstreamer.dll' not loaded

??? Should I be using older versions of gstreamer-1.0-mingw-x86_64 or obs-gstreamer plugin for Windows 11?
( I have no problems with the OBS/GStreamer setup on my other laptop and Desktop using Windows 10 )

Log file attached - Note that several other dlls not recognised under Windows 11 by OBS Studio
I feel like the OBS process still does not know where to find the GStreamer runtime. I see no technical limitation due to different versions why it should not work. If it works on other machines but not on this one I'm afraid you need to figure out what it is. I do not use Windows these days.
 
I am trying to get a series of ancient Foscam IP cameras (models FI9821P V2 and FI9821W V2) to show up in OBS using obs-gstreamer via RTSP. These cameras are pre-H.264/H.265, and that seems to be where most of the examples for configuring IP cameras with obs-gstreamer focus.

I am able to get these cameras to appear in OBS using both the Media Source and the VLC Video Source options, using the following command string:
rtsp://username:password@10.10.10.100:88/videoMain
Unfortunately, the lag when using those two methods is nearly 2000ms, and it is my understanding that Gstreamer may help with the lag.

I have attempted a few variations on the Pipeline field command string of obs-gstreamer's Gstreamer Source ("rtspsrc location=...", "uridecodebin uri=...", etc), and so far only time I've gotten obs-gstreamer to show video from the cameras is using a Pipeline command string of:
playbin uri=rtsp://username:password@10.10.10.100:88/videoMain
However, this does not show the video in OBS, but rather opens an external video window labeled "Direct3D11 renderer" and displays the RTSP stream there.

Since my Foscams are capable of displaying their RTSP streams in OBS via Media Source and VLC Video Source, and since obs-gstreamer is capable of displaying their RTSP stream in an external window (but not in OBS itself), it seems to me that my issue is not a technical limitation but rather a limited understanding of the gstreamer Pipeline configuration options.

Any assistance from users with more gstreamer configuration experience would be welcome.
 
Back
Top