obs-gstreamer

obs-gstreamer 0.4.0

Tuna

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
That pipeline is bogus. You try to connect the audio path from an element named "bin" but you have not given any element such name. You probably want to add "name=bin" to the "rtspsrc" element. Eventually you also want to add queues for each branch..
 

Tuna

Member

rahammanna

New Member
Hello everyone!
I run OBS on jetson nano and want to use nvvideo4linux as encoder for OBS RTSP Server plugin, but there are only x264, OpenMAX (Tegra and Raspberry Pi). What should I do? Can I use specific pipeline in "Extra encoder options" field to use nvvideo4linux as encoder for publishing RTSP?
 

LeeHockHin

New Member
I was happily using OBS GStreamer Plugin 0.3.1 with GStreamer Mingw-x86_64-1.18.4
Today I updated the Plugin to version 0.4.0 and installed GStreamer Mingw-x86_64-1.22.0 and
.... (1) simple cmd run "gst-launch-1.0 videotestsrc ! videoconvert ! autovideosink" don't work anymore
.... (2) OBS crashes

I downgraded mingw to 1.21.90 still same problem.
After some troubleshooting, I have the following results (all using Plugin 0.4.0)
>> mingw-x86_64-1.18.4 : gst-launch works, GStreamer source available in OBS
>> mingw-x86_64-1.22.0 : gst-launch don't work, OBS crashes
>> mingw-x86_64-1.21.90 : gst-launch don't work, OBS crashes
>> mvsc-x86_64-1.22.0: gst-launch works, but GStreamer source not available in OBS

Any recommendations on what I can try? (other than just sticking to mingw-1.18.4)

====================================================================================
Illegear Rogue Ryzen laptop (AMD Ryzen 7 4800H with Radeon Graphics, and NVIDIA GeForce GTX 1650Ti)
32 GB RAM
2 SSDs

Windows 10 Home 64 bit Version 22H2 - all recommended Microsoft updates done
OS build 19045.2546
 

LeeHockHin

New Member
I was happily using OBS GStreamer Plugin 0.3.1 with GStreamer Mingw-x86_64-1.18.4
Today I updated the Plugin to version 0.4.0 and installed GStreamer Mingw-x86_64-1.22.0 and
.... (1) simple cmd run "gst-launch-1.0 videotestsrc ! videoconvert ! autovideosink" don't work anymore
.... (2) OBS crashes

I downgraded mingw to 1.21.90 still same problem.
After some troubleshooting, I have the following results (all using Plugin 0.4.0)
>> mingw-x86_64-1.18.4 : gst-launch works, GStreamer source available in OBS
>> mingw-x86_64-1.22.0 : gst-launch don't work, OBS crashes
>> mingw-x86_64-1.21.90 : gst-launch don't work, OBS crashes
>> mvsc-x86_64-1.22.0: gst-launch works, but GStreamer source not available in OBS

Any recommendations on what I can try? (other than just sticking to mingw-1.18.4)

====================================================================================
Illegear Rogue Ryzen laptop (AMD Ryzen 7 4800H with Radeon Graphics, and NVIDIA GeForce GTX 1650Ti)
32 GB RAM
2 SSDs

Windows 10 Home 64 bit Version 22H2 - all recommended Microsoft updates done
OS build 19045.2546
On another laptop, using plugin 0.4.0

>> mingw-x86_64-1.22.0 : gst-launch works, but GStreamer source not available in OBS

=============================================================================
Asus TUF i-7 (Intel i7 8750H
16 GB RAM
1 SSD + 1 HDD

Windows 11 Home Single Language (64bit)
OS build 22621.1105
 

LeeHockHin

New Member
On another laptop, using plugin 0.4.0

>> mingw-x86_64-1.22.0 : gst-launch works, but GStreamer source not available in OBS

=============================================================================
Asus TUF i-7 (Intel i7 8750H
16 GB RAM
1 SSD + 1 HDD

Windows 11 Home Single Language (64bit)
OS build 22621.1105
I experienced a similar situation on the Illegear laptop with Davinci Resolve. Could not render output in H.265 for a long time. I suspect that it is because of the drivers for NVIDIA GeForce GTX 1650Ti. The Ti version seems to be different from the non Ti version
 

Dukercan

New Member
That pipeline is bogus. You try to connect the audio path from an element named "bin" but you have not given any element such name. You probably want to add "name=bin" to the "rtspsrc" element. Eventually you also want to add queues for each branch..
I still cannot get audio.
I get sound from the rtsp feed at :

rtsp://service:*******@10.0.0.***/rtsp-tunnel/?enableaudio=1

When I use this pipeline it gives me video:

rtspsrc location=rtspt://service:*******@10.0.0.***/?enableaudio=1 name=bin ! queue ! rtph264depay ! h264parse ! d3d11h264dec ! video.

but when I change it and add audio... nothing:

rtspsrc location=rtspt://service:*******@10.0.0.***/?enableaudio=1 name=bin ! queue ! rtph264depay ! h264parse ! d3d11h264dec ! video. bin. ! queue ! audio.

Any help would be appreciated.
 

MattyS02

New Member
Hi all,

New to OBS and Gstreamer, mostly got it working to where I need it, but just one little issue that I can't figure out....

Background info: I'm broadcasting for RC car racing with a follow camera (Panasonic UX90) into a capture card. That all works fine. Then I'm using IP cameras (Reolink RLC-811A) around the track for tight close up shots to switch to for some flavour. Works great as I only need to run a single ethernet cable, rather than signal/power for other camera types.

The issue is that there is a very small amount of latency that gradually accumulates over time. Not a large amount (maybe 2sec per hour or so) but makes a difference when filming fast moving objects.

Pipeline I'm currently using is:
rtspsrc location=rtspt://xxxx:xxxx@192.168.x.x:554 latency=100 ! rtph265depay ! h265parse ! nvh265dec ! videoconvert ! video.
I've tried raising and lowering the latency value to no effect (latency changes as expected but doesn't solve the issue), and I've also pulled the resolution down (4K isn't really needed) and changed all the 265 values to 264.

Any ideas as to why I'm still getting this accumulated latency?

Cheers!
 

azafeiros

New Member
Hi people,
I am trying to use the gstreamer plugin (gstreamer-1.0-mingw-x86_64-1.22.1) in OBS and I am amazed. I have connected 3 android phone broacasting in srt with larix and they work flawlessly!! Perfect sync video and audio. I must give my congratulations to the authors.
My next step is to use the gstreamer to connect also my DSLR through UVC adapter (USB) connection. (720p/60 and audio). Can you suggest to me a pipeline for this purpose?
I have tried "gst-launch-1.0.exe -v ksvideosrc do-stats=TRUE ! videoconvert ! autovideosink" it opens the stream but in a separate window, not in OBS
Thanks in advance
Alex
 

Tuna

Member
Hi people,
I am trying to use the gstreamer plugin (gstreamer-1.0-mingw-x86_64-1.22.1) in OBS and I am amazed. I have connected 3 android phone broacasting in srt with larix and they work flawlessly!! Perfect sync video and audio. I must give my congratulations to the authors.
My next step is to use the gstreamer to connect also my DSLR through UVC adapter (USB) connection. (720p/60 and audio). Can you suggest to me a pipeline for this purpose?
I have tried "gst-launch-1.0.exe -v ksvideosrc do-stats=TRUE ! videoconvert ! autovideosink" it opens the stream but in a separate window, not in OBS
Thanks in advance
Alex
As the README and examples suggest, you should push the decoded data into an element called "video." not an extra "autovideosink".
 

azafeiros

New Member
A followup from last night. (windows 11, OBS 29.0.2, gstreamer-1.0-mingw-x86_64-1.22.1, gstreamer obs pluggin 0.4)
the pipeline "gst-launch-1.0.exe -v ksvideosrc do-stats=TRUE ! videoconvert ! autovideosink"
when run from CMD opens a new window video player and seems to work fine.
the same pipeline when run from OBS gstreamer , it opens the same external window but the video is not running (seems paused)
the same pipeline but replacing the "autovideosink" with "video." when run from OBS gstreamer does nothing, although the USB camera seems engaged (blue light on) during active pipeline.
I would greatly appreciate if you have any idea why it is not working.

I have also tried "
gst-launch-1.0 -v ksvideosrc do-stats=TRUE ! image/jpeg, width=640, height=480 ! jpegdec ! videoconvert ! video." (in OBS)
and
gst-launch-1.0 -v ksvideosrc do-stats=TRUE ! image/jpeg, width=640, height=480 ! jpegdec ! videoconvert ! autovideosink (in CMD)

with exactly the same results as above
 

azafeiros

New Member
although the obs streamer plugin seems to work nicely with the reference pipeline
"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."
 

Tuna

Member
Is "gst-launch-1.0 -v" part of the thing you have put in OBS as pipeline string? I hope not.
Perhaps the log gives some more info?
 

azafeiros

New Member
Excellent, I have now 3 SRT sources (Larix android phones) and one USB(UVC) -HDMI-DSLR through GSTREAMER. It seems very stable (run for more than 3 hours)
The latency of the SRT sources has decreased by 50% (down to 1000ms) as compared to previous setup (through OBS media source)!!!
They are also better synchronised between them , 30ms range (SRTs not perfect but definitely a lot better than before 1000ms differences changing all the time).

Larix can introduce SEI metadata -timecode to the feed. Is there a way for Gstreamer to utilise the SEI timecode and synchonise the different feeds? (as the srtminiserver does). As I understand Gstreamer uses the time of entry to OBS for synchronisation video/audio. I found this in info but i do not know if it is relevant/useful in this situation (https://gstreamer.freedesktop.org/documentation/videoparsersbad/h264parse.html?gi-language=c) - update-timecode (If the stream contains Picture Timing SEI, update their timecode values using upstream GstVideoTimeCodeMeta)

 

Tuna

Member
Excellent, I have now 3 SRT sources (Larix android phones) and one USB(UVC) -HDMI-DSLR through GSTREAMER. It seems very stable (run for more than 3 hours)
The latency of the SRT sources has decreased by 50% (down to 1000ms) as compared to previous setup (through OBS media source)!!!
They are also better synchronised between them , 30ms range (SRTs not perfect but definitely a lot better than before 1000ms differences changing all the time).

Larix can introduce SEI metadata -timecode to the feed. Is there a way for Gstreamer to utilise the SEI timecode and synchonise the different feeds? (as the srtminiserver does). As I understand Gstreamer uses the time of entry to OBS for synchronisation video/audio. I found this in info but i do not know if it is relevant/useful in this situation (https://gstreamer.freedesktop.org/documentation/videoparsersbad/h264parse.html?gi-language=c) - update-timecode (If the stream contains Picture Timing SEI, update their timecode values using upstream GstVideoTimeCodeMeta)

This plugin is more a one-size-fits-all approach. There is no easy way to sync multiple OBS sources to each other. And there is only one audio/video endpoint here..
 

MauriceD

New Member
Hello, I am currently trying to use the obs gstreamer plugin for using a rtmp stream from a GoPro inside of OBS (hoping for lower latency than with the VLC plugin). The RTMP stream is running on a localhost mona server (port 1935) and is accessible via rtmp://127.0.0.1 or via the local network IP of the machine.

So far I tried the following pipelines, but couldn't get the stream to work (no video, no audio):

uridecodebin uri=rtmp://127.0.0.1 name=bin ! queue ! video. bin. ! queue ! audio. (also with local IP and port)

rtmpsrc location="rtmp://127.0.0.1" ! decodebin name=src src. ! audioconvert ! audio. src. ! videoconvert ! video. (also with local IP and port)

Could you tell me what i am doing wrong and/or provide me with a working pipeline?


Best regards
Maurice
 

Fil Leo

New Member
Great plugin. I use it for mobile multi-camera broadcasts via bonding. There is a task to record all incoming streams, not just the mix.
But there are problems, in different variations, either writing or output to .

in the version below, if you remove the last line, then both video recording (still without sound) and output to the OBS work. But if you return, then nothing works (
Any ideas?

srtsrc uri="srt://192.168.3.218:9011?mode=caller&latency=1000" ! decodebin name=t1
t1. ! queue! x264enc ! flvmux! filesink location=output.flv
t1. ! queue! video.
t1. ! queue! audio.
 
Top