obs-gstreamer

obs-gstreamer 0.4.1

Tuna

Member
GStreamer uses FFMPEG for AAC decoding iirc (most common decoder at least). If the FFMPEG is compiled without AAC support (most likely licensing reasons) it cannot be found.
 

wa2flq

New Member
I am using a PTZoptics Camera as well. For a a while I was chasing audio distortion (sample rate or decode bug?) in OBS. I decided to refresh my entire software set. We only use OBS to record and stream with Zoom. Platform is Windows 10 Pro with a NVIDIA Quadro K2200.
This works:

GStreamer 1.18.5 - Complete Installation
ffmpeg N-105871-ge645a1ddb9-20220307
obs-gstreamer v0.3.3
OBS 27.2.3

Gstreamer Source - uridecodebin uri="rtsp://admin:admin@10.1.10.215:554/1" name=bin ! queue ! video. bin. ! queue ! audio. (or rtspt)
No options selected.

Notes:
We tried to use the Media Source in OBS at first. The latency drifted and we also had problems keeping the audio and video synchronized.
Still trying to understand Properties for the Gstreamer source and what they actually do (or not).
Next step is to look into element settings that affect latency.
So many knobs, still on the learning curve
 

cr0ybot

New Member
I attempted to use the pipeline below as I try to display video & audio from MonaServer:

Code:
playbin uri=srt://127.0.0.1:1234 latency=50000000 audio-sink=audio video-sink=video


But I'm getting this error:

Code:
Cannot start GStreamer: could not set property "audio-sink" in element "playbin1" to "audio"


I've been able to successfully display audio/video via the below pipeline, but uridecodebin doesn't appear to have any latency settings (I am very new to gstreamer so I'm probably wrong about that). I'm getting about 3 seconds of delay, but with another camera using RTSP I've been able to reduce the delay to roughly 1 second.

Code:
uridecodebin uri="srt://127.0.0.1:1234" name=bin ! queue ! video. bin. ! queue ! audio.


I found this blog post which purports to have solved their latency issues using SRT with the first pipeline above, but if I don't specify audio/video sinks then a Direct3D window is opened with the stream instead of passing the sinks to OBS.

 

Tuna

Member
Use srtsrc directly. Something like:

Code:
srtsrc ! decodebin name=bin ! queue ! video. bin. ! queue ! audio.
 

NotKnownPerson

New Member
OK, I'm stuck. My camera source just disappeared randomly last week. (Windows 10) Logs show error: [Cannot start GStreamer: no element "videoconvert"]. Haven't figured it out, paths are good, reinstalled GStreamer, Reinstall plugin, reset camera, nothing. I've spent 20+ hours on this, downgraded things, everything that wasn't reinstalling windows. Fresh OBS with fresh GStreamer install shows same error. I don't get it.

We decided to get a new mac to upgrade our old failing Windows 10 system. All is well, except my OBS M1 build won't accept the prebuilt x86_64 obs-gstreamer build, and I can't figure out how to build an M1-native build. I have meson installed, GStreamer installed via macports, and... It throws an error.

Run-time dependency libobs found: NO (tried pkgconfig, framework and cmake)
meson.build:25:2: ERROR: C header 'obs/obs.h' not found

I have no clue where I'm supposed to find this dependency. Do I have to compile this on a machine with a full OBS build enviroment, or am I doing something wrong? (Like blindly compiling ARM builds of x86_64 plugins or something... )

I really want the speed benefits of running native arm OBS, it's literally the difference between 1080p30 and 4K60 on our system.

EDIT: installed CMake through MacPorts. New error!

Found CMake: /opt/local/bin/cmake (3.22.3)
Traceback (most recent call last):
File "mesonbuild/mesonmain.py", line 151, in run
File "mesonbuild/msetup.py", line 301, in run
File "mesonbuild/msetup.py", line 185, in generate
File "mesonbuild/msetup.py", line 229, in _generate
File "mesonbuild/interpreter/interpreter.py", line 2698, in run
File "mesonbuild/interpreterbase/interpreterbase.py", line 149, in run
File "mesonbuild/interpreterbase/interpreterbase.py", line 174, in evaluate_codeblock
File "mesonbuild/interpreterbase/interpreterbase.py", line 167, in evaluate_codeblock
File "mesonbuild/interpreterbase/interpreterbase.py", line 182, in evaluate_statement
File "mesonbuild/interpreterbase/interpreterbase.py", line 567, in assignment
File "mesonbuild/interpreterbase/interpreterbase.py", line 180, in evaluate_statement
File "mesonbuild/interpreterbase/interpreterbase.py", line 455, in function_call
File "mesonbuild/interpreterbase/decorators.py", line 768, in wrapped
File "mesonbuild/interpreterbase/decorators.py", line 768, in wrapped
File "mesonbuild/interpreterbase/decorators.py", line 768, in wrapped
[Previous line repeated 5 more times]
File "mesonbuild/interpreterbase/decorators.py", line 109, in wrapped
File "mesonbuild/interpreterbase/decorators.py", line 127, in wrapped
File "mesonbuild/interpreterbase/decorators.py", line 277, in wrapper
File "mesonbuild/interpreter/interpreter.py", line 1620, in func_dependency
File "mesonbuild/interpreter/dependencyfallbacks.py", line 352, in lookup
File "mesonbuild/interpreter/dependencyfallbacks.py", line 93, in _do_dependency
File "mesonbuild/dependencies/detect.py", line 112, in find_external_dependency
File "mesonbuild/dependencies/cmake.py", line 135, in __init__
File "mesonbuild/dependencies/cmake.py", line 183, in _get_cmake_info
File "mesonbuild/dependencies/cmake.py", line 614, in _call_cmake
File "mesonbuild/dependencies/cmake.py", line 585, in _setup_cmake_dir
File "importlib/resources.py", line 168, in read_text
File "importlib/resources.py", line 47, in _get_package
File "importlib/__init__.py", line 127, in import_module
File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
File "<frozen importlib._bootstrap>", line 973, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'mesonbuild.dependencies.data'
meson.build:23:0: ERROR: Unhandled python exception
This is a Meson bug and should be reported!
Now I'm just confused. Is there somewhere else I should have gotten CMake?
 

h3y6P

New Member
Got gstreamer and the plugin loaded up in OBS but having trouble with viewing and hearing my PTZ cam once the new source is added

My purpose for moving over to gstreamer in OBS is to minimize the delay/lag that I'm experiencing when using VLC cam links

I'm adding following into the pipeline dialouge when adding a new "GStreamer Source" :


rtspsrc location="rtsp://192.168.185.139:8554/hevc" latency=120 name=src src. ! decodebin ! videoconvert ! video. src. ! decodebin ! audioconvert ! audio.

I've confirmed this is indeed my PTZ camera's address

Am I missing any commands?
 

h3y6P

New Member
Got gstreamer and the plugin loaded up in OBS but having trouble with viewing and hearing my PTZ cam once the new source is added

My purpose for moving over to gstreamer in OBS is to minimize the delay/lag that I'm experiencing when using VLC cam links

I'm adding following into the pipeline dialouge when adding a new "GStreamer Source" :


rtspsrc location="rtsp://192.168.185.139:8554/hevc" latency=120 name=src src. ! decodebin ! videoconvert ! video. src. ! decodebin ! audioconvert ! audio.

I've confirmed this is indeed my PTZ camera's address

Am I missing any commands?
Some more details stream is h265 and the audio is AAC
 

h3y6P

New Member
Do you have a working launch command that works from the command line? Is that behind NAT? If so maybe try rtspt:// as protocol.

My pipe line is now working great for video with unnoticeable delay. But I'm having trouble figuring out how to get audio in my pipeline.

Any help would be appreciated I'm a little overwhelmed.

Here's my current pipeline


rtspsrc location="rtsp://192.168.xxx.xxx:8557/h264" latency=0 buffer-mode=auto ! rtph264depay ! h264parse ! d3d11h264dec ! video.

My options are AAC or G.711 as for audio
 

boblinux12

New Member
Anyone knows how to install and configure v0.3.4 of obs-gstreamer.so plugin for MacOS?
I have made great progress at 90-95% completed , the outstanding issue the GStream Source is not visible in OBS Source List.
I have $PATH included for /Library/Frameworks/GStreamer.framework/Versions/1.0/bin
Is there anything else I need to configure or check or other?
Confirmed the gst-inspect-1.0 is workable and good via Terminal.
Using this reference how-to guide. https://obsproject.com/forum/threads/obs-gstreamer.88517/post-515437
The GStreamer is located at /usr/local whereas the reference guide shows make symlink to /opt/local ?
I've tried both locations perhaps I didn't do this right?

Here are the steps for MacOS obs-gstramer.so plugin.
  1. Download GStream and install. https://gstreamer.freedesktop.org/download/#macos
    I used 1.18.3 runtime installer. It probably won't let you install it and you'll have to go to System Preferences => Security General tab and allow it to install.
  2. Get the prebuilt: https://github.com/fzwoch/obs-gstreamer/releases/tag/v0.3.0 (or whatever the latest version is) download obs-gstreamer.zip and expand
  3. From the terminal window logged in as an administrator create directories needed for the plugin in obs (obs-gstreamer and bin)
    sudo mkdir -p /Library/Application\ Support/obs-studio/plugins/obs-gstreamer/bin
  4. Copy obs.gstreamer.so from expanded directory in step 2. (obs-gstreamer/macos). If you downloaded it and expanded it in your download directory then from the terminal
    sudo cp ~/Downloads/obs-gstreamer/macos/obs-gstreamer.so /Library/Application\ Support/obs-studio/plugins/obs-gstreamer/bin
  5. Create directories and symlink from gstream libraries to where the plugin is expecting them
    sudo mkdir -p /opt/local
    sudo ln -s /Library/Frameworks/GStreamer.framework/Versions/1.0/lib /opt/local/
  6. Open OBS. You may get a message about obs-gstreamer.so not being OK. Cancel. Quit OBS go to System Preferences => Security General tab and allow it. Open OBS again. Now you should see GStreamer Source in the sources.
  7. Add a GStreamer Source. Uncheck both Sync options. Put in a pipeline. For us using PTZOptics camera without audio (we have a separate mixer), it was this:
    uridecodebin uri=rtsp://192.168.2.88/1 name=bin ! queue ! video.
 

ErAzOr

New Member
Are Intel CPUs also supported for the H265 encoder? In the moment only h264 is selectable (with gstreamer 0.3.5)
 

Tuna

Member
Are Intel CPUs also supported for the H265 encoder? In the moment only h264 is selectable (with gstreamer 0.3.5)
There is no runtime check for hardware support. So it should be there. Note that HEVC works for recording only, not for streaming.
 

ErAzOr

New Member
OK thank you for the information.
Than I have to figure out, why it is not working in my case.

Is it possible to output to an URL (like in custom ffmpeg), or rust record to a file?
 

mauibra

New Member
Ciao a tutti. Ho installato il plug-in ma non riesco a farlo funzionare su un notebook con un processore AMD RYZEN. Funziona benissimo su un PC con un processore Intel i5. Vorrei sapere se i processori AMD sono compatibili con questo plugin. Grazie
 

Leebunker321

New Member
hope someone can help
i have 3 pcs that i stream from 2 use gstreamer no problem but the 3rd just won’t pull the feeds
it’s the same obs portable on each so i’m at a bit of a loss any ideas ?
 

Dukercan

New Member
I am having problems getting sound from my OBS GStreamer inputs.
Cameras are Bosch Flexidome IP 4000HD. Audio is on and set to AAC 48kbps
OBS is 28.1.2 (64bit) on Win 11
Pipeline is :
rtspsrc location=rtspt://service:xxxxxx@10.0.0.199:554/?inst=2 latency=0 buffer-mode=auto ! rtph264depay ! h264parse ! nvh264dec ! video.
Video works fine, but when I add bin. ! queue ! audio. to the end, I loose the video and there is no audio.
The cameras work fine as RTSP inputs as a Media Source giving picture and sound streams, but they are lagging and sound/picture are off by 1.5 seconds. Trying GStreamer to see if I can get them more in sync.
Anyone have an answer?
Thanks
 
Top