obs-gstreamer

obs-gstreamer 0.4.1

ntoonio

New Member
Hi! Thanks for this great project!

I'm having some problems with using audio.

I have this
Code:
shmsrc socket-path=/tmp/test is-live=true do-timestamp=true ! queue ! audio/x-raw,rate=48000,channels=2,format=S16LE ! audio.

And I'm getting the error

Filter caps do not completely specify the output format

0:00:15.093086703 10535 0x56492dfef6a0 FIXME default gstutils.c:3980:gst_pad_create_stream_id_internal:<shmsrc3:src> Creating random stream-id, consider implementing a deterministic way of creating a stream-id
0:00:15.098204982 10535 0x56492e0329e0 WARN capsfilter gstcapsfilter.c:453:gst_capsfilter_prepare_buf:<capsfilter11> error: Filter caps do not completely specify the output format
0:00:15.098267305 10535 0x56492e0329e0 WARN capsfilter gstcapsfilter.c:453:gst_capsfilter_prepare_buf:<capsfilter11> error: Output caps are unfixed: audio/x-raw, rate=(int)48000, format=(string)S16LE, channels=(int)2, layout=(string){ interleaved, non-interleaved }
0:00:15.098379089 10535 0x56492e0329e0 WARN basetransform gstbasetransform.c:2167:default_generate_output:<capsfilter11> could not get buffer from pool: error
error: Filter caps do not completely specify the output format

Although I can hear it when I change audio. to autoaudiosink. Then it's going though my speakers but not into OBS.

I'm guessing I have to add some field to the caps filter, but I can't figure out what that would be...
 

Tuna

Member
Instead of a caps filter I would try to use "rawaudioparse" element.

But probably it wants to know whether the data is interleaved of not.
 

Noraa

New Member
Can anyone help me with building a Windows 32-bit version of this plugin? To make a very long story short, I have to use the 32-bit version of OBS for my current workflow. Obviously, the prebuilt 64-bit version won’t work for me :/

Any help would be greatly appreciated!
 

momentumv

New Member
Hi everyone, very helpful forum. I have a PTZoptics camera. My main injest into OBS is through an HDMI capture card, which is great, but I would like to add some other network video sources, and I'm testing out gstreamer with what I have.
SO FAR: I've installed the win10 minGW gstreamer added to path, and put the precompiled dll into the OBS plugin folder.
This gives me a gstreamer source option, and the default video source seems to work fine.
I've been able to run:
Code:
C:\gstreamer\1.0\mingw_x86_64\bin>gst-play-1.0 rtsp://192.168.1.65/1
Press 'k' to see a list of keyboard shortcuts.
Now playing rtsp://192.168.1.65/1
Pipeline is live.
Redistribute latency...
Redistribute latency...
Redistribute latency...
Prerolled.
which displays the feed in a Direct3D11 render window (with quite bad (~1s) latency).
However, if I try to use this pipeline (or lots of others) in the OBS source:
uridecodebin uri=rtsp://192.168.1.65/1 name=bin ! queue ! video.
OBS crashes after ~1 sec of windows busy cursor, and will crash on open until I remove obs-gstreamer.dll from the plugins folder.
My OBS log file doesn't give any clues.
I'm just not sure what I'm doing wrong...
 

Tuna

Member
Hi everyone, very helpful forum. I have a PTZoptics camera. My main injest into OBS is through an HDMI capture card, which is great, but I would like to add some other network video sources, and I'm testing out gstreamer with what I have.
SO FAR: I've installed the win10 minGW gstreamer added to path, and put the precompiled dll into the OBS plugin folder.
This gives me a gstreamer source option, and the default video source seems to work fine.
I've been able to run:
Code:
C:\gstreamer\1.0\mingw_x86_64\bin>gst-play-1.0 rtsp://192.168.1.65/1
Press 'k' to see a list of keyboard shortcuts.
Now playing rtsp://192.168.1.65/1
Pipeline is live.
Redistribute latency...
Redistribute latency...
Redistribute latency...
Prerolled.
which displays the feed in a Direct3D11 render window (with quite bad (~1s) latency).
However, if I try to use this pipeline (or lots of others) in the OBS source:
uridecodebin uri=rtsp://192.168.1.65/1 name=bin ! queue ! video.
OBS crashes after ~1 sec of windows busy cursor, and will crash on open until I remove obs-gstreamer.dll from the plugins folder.
My OBS log file doesn't give any clues.
I'm just not sure what I'm doing wrong...
Most likely the camera is not reachable via UDP at that time? Current release blocks at the first connection step, possible that this blocks all other OBS functionality in the meantime. On the latest development version this step is tried to move to another thread where this may improve on the issue.
 

momentumv

New Member
Thank you for the reply, but I don't understand why would the gst-play work still, if the UDP is not working?
Anyway, using portqryui.exe, I get the following:
Code:
=============================================

 Starting portqry.exe -n 192.168.1.65 -e 1259 -p UDP ...


Querying target system called:

 192.168.1.65

Attempting to resolve IP address to a name...

Failed to resolve IP address to name

querying...

UDP port 1259 (unknown service): LISTENING or FILTERED
portqry.exe -n 192.168.1.65 -e 1259 -p UDP exits with return code 0x00000002.
 

Tuna

Member
Don't know for sure, maybe gst-play can revert to fallback transmission like tcp. You could force TCP by using "rtspt://" protocol for uridecodebin for example. Then again you are on a local network. I really have no conclusive idea..
 

momentumv

New Member
Do you have any ideas for generating/testing a "known good" rtsp on my network to test against? Should I attempt to compile the binary for my self?
Any ideas about logs/crash dumps that could be helpful? I'd love to get this to work.
 

Tuna

Member
Do you have any ideas for generating/testing a "known good" rtsp on my network to test against? Should I attempt to compile the binary for my self?
Any ideas about logs/crash dumps that could be helpful? I'd love to get this to work.
As of writing the RTSP example in the README is working for me.
 

momentumv

New Member
On Win10? I'm getting the exact same crashing behavior with the example as with my local network source.
specifically: uridecodebin uri=rtsp://wowzaec2demo.streamlock.net/vod/mp4:BigBuckBunny_115k.mov name=bin ! queue ! video. bin. ! queue ! audio.
 

momentumv

New Member
Well, I did a test install on another machine and it works fine. :/ Wonder if it has something to do with nvenc or something. Will do more experimenting on the target machine (including a re-install) and see if I end up with a working system.
 

momentumv

New Member
after complete reinstallation etc, I kept having the same crashing problem with rtsp. This machine is due for a motherboard replacement anyway, so I think I'll just give up until it's a different machine...
 
Hi

I am using this plugin and it seems to do great - BUT, i cannot make it work with sound. Normal VLC source/Media source is working fine.

Working is:
uridecodebin uri=rtsp://192.168.xxxxx name=bin ! queue ! video.

Not working:
uridecodebin uri=rtsp://192.168.xxxxx name=bin ! queue ! video. bin. ! queue ! audio.

I feel like i have tried all kinds of combinations, can anyone point me in the right direction? :) The source is a Unifi Camera through the NVR.
 

dd_obs21

New Member
I build OBS from source on RPi 4B. I copied the obs-gstreamer.so file to /usr/lib/obs-plugins. But am getting this error, any idea?
Screenshot_20210812_020007.png
 

superdiy

New Member
Ok so after research on my end. The only problem I seem to be having is that Gstreamer will not allow me to input & characters into my src URL is there a way to fix this? maybe a character escape flag or something? %26 ?

I also have a dahua camera with similar issues. I cannot get the rtspsrc pipeline working. If I use the following pipeline in the gstreamer plugin, it works:
uridecodebin uri=rtspt://admin:<password>@<ipaddress>/cam/realmonitor?channel=1&subtype=0 name=bin ! queue ! video.

The following pipeline does not work:
rtspsrc location=rtspt://admin:<password>@<ipaddress>/cam/realmonitor?channel=1&subtype=0 latency=100 ! rtph264depay ! h264parse ! nvh264dec ! videoconvert ! video.

If I use gst-launch-1.0 command line tool with both pipelines, BOTH fail with the same messages.

I'm pretty sure it is the & (ampersand) which causes the issue, but I've tried to escape it in all possible ways and combinations I could find on the net, all without success. I've tried single- and double quotes around rtspt://admin:<password>@<ipaddress>/cam/realmonitor?channel=1&subtype=0
I've tried %26, "%26", '%26', \&, ^& "&", '&', "\&", '\&', "^&", '^&', &&, '&&', "&&", \&& and various combinations thereof including single- and double quotes around rtspt://admin:<password>@<ipaddress>/cam/realmonitor?channel=1&subtype=0
I just always get either one of the following 2 "error messages" reported by gst-launch-1.0

Message 1:
WARNING: erroneous pipeline: No sink-element named "(NULL)" - omitting link

Message 2:
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Progress: (open) Opening Stream
Pipeline is PREROLLED ...
Prerolled, waiting for progress to finish...
Progress: (connect) Connecting to rtspt://admin:<password>@<ipaddress>/cam/realmonitor?channel=1
Progress: (open) Retrieving server options
Progress: (open) Retrieving media info
ERROR: from element /GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0: Not found
Additional debug info:
../gst/rtsp/gstrtspsrc.c(6621): gst_rtspsrc_send (): /GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0:
Not Found (404)
ERROR: pipeline doesn't want to preroll.
Setting pipeline to NULL ...
Freeing pipeline ...
'"subtype=0"' is not recognized as an internal or external command,
operable program or batch file.


Any suggestions?
Thank you
 

bobbytj

New Member
Hi @Tuna , all,
I'm new with OBS and obs-gstreamer too ;-) I wonder if someone faces the same issues trying to run the (to my knowledge) most recent versions of OBS (27.1.3) and obs-gstreamer (v0.3.2).

Even though I think I did everything correctly trying to intall the obs-gstreamer plugin GStreamer does not show up in the source selection area of OBS. I'v attached the OBS logfile which indicates that obs-gstreamer.dll has NOT been loaded.
Has anything changed in the OBS API so that obs-gstreamer.dll doesn't get loaded by OBS? Can someone point me to how to get the obs-gsteamer to work?

Facts:
- Win10 64bit
- OBS Studio 64bit 27.1.3 (up and running w/o issues)
- GStreamer runtime - mingw_x86_64 (up and running w/o issues)
- obs-gstreamer - prebuilt v0.3.2 (tried also with v0.3.1, v0.3.0)

Thanks a lot!

09:06:05.170: CPU Name: Intel(R) Core(TM) i7-4510U CPU @ 2.00GHz
09:06:05.170: CPU Speed: 2594MHz
09:06:05.170: Physical Cores: 2, Logical Cores: 4
09:06:05.170: Physical Memory: 16314MB Total, 11423MB Free
09:06:05.170: Windows Version: 10.0 Build 19042 (release: 2009; revision: 1348; 64-bit)
09:06:05.170: Running as administrator: false
09:06:05.170: Aero is Enabled (Aero is always on for windows 8 and above)
09:06:05.170: Windows 10 Gaming Features:
09:06:05.170: Game DVR: On
09:06:05.173: Sec. Software Status:
09:06:05.174: Microsoft Defender Antivirus: enabled (AV)
09:06:05.175: Windows-Firewall: enabled (FW)
09:06:05.176: Current Date/Time: 2021-11-25, 09:06:05
09:06:05.176: Browser Hardware Acceleration: true
09:06:05.176: Portable mode: false
09:06:05.929: OBS 27.1.3 (64-bit, windows)
09:06:05.929: ---------------------------------
09:06:06.042: ---------------------------------
09:06:06.042: audio settings reset:
09:06:06.042: samples per sec: 48000
09:06:06.042: speakers: 2
09:06:06.043: ---------------------------------
09:06:06.044: Initializing D3D11...
09:06:06.044: Available Video Adapters:
09:06:06.056: Adapter 0: NVIDIA GeForce GTX 850M
09:06:06.056: Dedicated VRAM: 4252762112
09:06:06.056: Shared VRAM: 4258344960
09:06:06.056: PCI ID: 10de:1391
09:06:06.057: Driver Version: 30.0.14.7196
09:06:06.057: output 0: pos={0, 0}, size={1920, 1080}, attached=true, refresh=60, name=
09:06:06.057: output 1: pos={0, -1080}, size={1920, 1080}, attached=true, refresh=59, name=Medion HDMI
09:06:06.057: Adapter 1: Intel(R) HD Graphics Family
09:06:06.057: Dedicated VRAM: 117964800
09:06:06.057: Shared VRAM: 2147483648
09:06:06.057: PCI ID: 8086:a16
09:06:06.059: Driver Version: 20.19.15.4835
09:06:06.072: Loading up D3D11 on adapter NVIDIA GeForce GTX 850M (0)
09:06:06.175: D3D11 loaded successfully, feature level used: b000
09:06:06.175: DXGI increase maximum frame latency success
09:06:06.175: D3D11 GPU priority setup failed (not admin?)
09:06:06.793: ---------------------------------
09:06:06.793: video settings reset:
09:06:06.793: base resolution: 1920x1080
09:06:06.793: output resolution: 1280x720
09:06:06.793: downscale filter: Bicubic
09:06:06.793: fps: 30/1
09:06:06.793: format: NV12
09:06:06.793: YUV mode: 709/Partial
09:06:06.793: NV12 texture support enabled
09:06:06.795: Audio monitoring device:
09:06:06.795: name: Standard
09:06:06.795: id: default
09:06:06.796: ---------------------------------
09:06:06.796: Skipping module '../../obs-plugins/64bit/chrome_elf.dll', not an OBS plugin
09:06:06.805: [CoreAudio encoder]: CoreAudio AAC encoder not installed on the system or couldn't be loaded
09:06:06.806: Failed to load 'en-US' text for module: 'decklink-captions.dll'
09:06:06.807: Failed to load 'en-US' text for module: 'decklink-ouput-ui.dll'
09:06:06.907: [AMF] Unable to load 'amfrt64.dll', error code 126.
09:06:06.910: [AMF] AMF Test failed due to one or more errors.
09:06:06.910: Failed to initialize module 'enc-amf.dll'
09:06:06.920: Skipping module '../../obs-plugins/64bit/libcef.dll', not an OBS plugin
09:06:06.928: Skipping module '../../obs-plugins/64bit/libEGL.dll', not an OBS plugin
09:06:06.928: Skipping module '../../obs-plugins/64bit/libGLESv2.dll', not an OBS plugin
09:06:06.935: [obs-browser]: Version 2.16.3
09:06:06.935: [obs-browser]: CEF Version 75.1.16+g16a67c4+chromium-75.0.3770.100
09:06:06.940: NVENC supported
09:06:06.942: [noise suppress]: NVIDIA RTX denoiser disabled, redistributable not found
09:06:06.967: Module '../../obs-plugins/64bit/obs-gstreamer.dll' not loaded
 
Top