It's not frame jumping, it is jitter...Delay is consistent. Having no buffer is visible sometimes, some frames do lag a little (frame jumping?), see example here, between 59:09 - 59:24.
Next test will be with 1-3 frame buffer (+40-120ms delay).
It's not frame jumping, it is jitter...Delay is consistent. Having no buffer is visible sometimes, some frames do lag a little (frame jumping?), see example here, between 59:09 - 59:24.
Next test will be with 1-3 frame buffer (+40-120ms delay).
Do you have any idea if there a resource that show how to construct the Gstreamer pipeline for OBS? i know the rtsp url for myy camera already but i cant seem to get it to stream when using gstreamer source. Please help.Found a reference to GStreamer on a VLC bugreport, tried it today. RTSP camera latency went from 1140ms (with built-in Media source) through 400ms (with VLC Video Source) to 60ms!!!!!!!!!! with GStreamer Source!!!! Just came here to spread the good news!
Project:
obs-gstreamer
An OBS Studio source plugin to feed GStreamer launch pipelines into OBS Studio. This plugin has interesting use cases but may be difficult to understand and is clunky use if you are not familiar with GStreamer. Experimental prebuilt 64 Bit...obsproject.com
My steps:
Copy obs-gstreamer.dll from https://github.com/fzwoch/obs-gstreamer/releases/download/v0.1.0/obs-gstreamer.zip (\windows) to PathToOpenBroadcasterSoftware\obs-plugins\64bit\
Get https://gstreamer.freedesktop.org/d...0/mingw/gstreamer-1.0-mingw-x86_64-1.18.0.msi and install. Put PathTo\gstreamer\1.0\mingw_x86_64\bin\ into PATH (or copy libglib-2.0-0.dll, libgobject-2.0-0.dll, libgstapp-1.0-0.dll, libgstaudio-1.0-0.dll, libgstreamer-1.0-0.dll, libgstvideo-1.0-0.dll to PathToOpenBroadcasterSoftware\bin\64bit\, based on https://github.com/fzwoch/obs-gstreamer/issues/13#issuecomment-711106142 but this I have not tried yet...)
Start OBS and add GStreamer Source. We use HikVision IP cameras, my Pipeline looks like this:
Important to uncheck Sync appsinks to clock, and to my surprise the feed in OBS is lower latency than the feed in Internet Explorer.Code:uridecodebin uri=rtsp://username:password@ipaddress/Streaming/Channels/1 name=bin ! queue ! video.
Live test on Sunday.
Maybe it helps, our HikVision camera streams h264, maybe that is why uridecodebin is used and no other elements are required in the pipeline...I'm trying to get my Dahua rtsp feed into OBS with gstreamer but so far I haven't been able to figure out the correct pipeline. Anybody can provide an example code that works with Dahua?
The following works fine in VLC, but cannot make it work with gstreamer.
rtsp://USERNAME:PW@IP:PORT/cam/realmonitor?channel=1&subtype=2
Thanks, I did set my Dahua camera yesterday to stream h264 to make sure that's not the issue, however it didn't help.
Hi, I did exactly as you said but stil couldn see the gstreamer source in OBS. What version of OBS are you using?Found a reference to GStreamer on a VLC bugreport, tried it today. RTSP camera latency went from 1140ms (with built-in Media source) through 400ms (with VLC Video Source) to 60ms!!!!!!!!!! with GStreamer Source!!!! Just came here to spread the good news!
Project:
obs-gstreamer
An OBS Studio source plugin to feed GStreamer launch pipelines into OBS Studio. This plugin has interesting use cases but may be difficult to understand and is clunky use if you are not familiar with GStreamer. Experimental prebuilt 64 Bit...obsproject.com
My steps:
Copy obs-gstreamer.dll from https://github.com/fzwoch/obs-gstreamer/releases/download/v0.1.0/obs-gstreamer.zip (\windows) to PathToOpenBroadcasterSoftware\obs-plugins\64bit\
Get https://gstreamer.freedesktop.org/d...0/mingw/gstreamer-1.0-mingw-x86_64-1.18.0.msi and install. Put PathTo\gstreamer\1.0\mingw_x86_64\bin\ into PATH (or copy libglib-2.0-0.dll, libgobject-2.0-0.dll, libgstapp-1.0-0.dll, libgstaudio-1.0-0.dll, libgstreamer-1.0-0.dll, libgstvideo-1.0-0.dll to PathToOpenBroadcasterSoftware\bin\64bit\, based on https://github.com/fzwoch/obs-gstreamer/issues/13#issuecomment-711106142 but this I have not tried yet...)
Start OBS and add GStreamer Source. We use HikVision IP cameras, my Pipeline looks like this:
Important to uncheck Sync appsinks to clock, and to my surprise the feed in OBS is lower latency than the feed in Internet Explorer.Code:uridecodebin uri=rtsp://username:password@ipaddress/Streaming/Channels/1 name=bin ! queue ! video.
Live test on Sunday.
Looks like either gstreamer path is not present or required libraries are not in obs directory.Hi, I did exactly as you said but stil couldn see the gstreamer source in OBS. What version of OBS are you using?
In the OBS log i always get:
17:10:29.284: LoadLibrary failed for '../../obs-plugins/64bit/obs-gstreamer.dll': (null) (126)
17:10:29.284: Module '../../obs-plugins/64bit/obs-gstreamer.dll' not loaded
Put PathTo\gstreamer\1.0\mingw_x86_64\bin\ into PATH
Open Run or CMD and execute "SystemPropertiesAdvanced", then click on "Environment Variables". There are 2 sections: User and System variables. I updated in both the Path variable.What does this mean? Add that string to something called PATH? A path in OBS? Please help. I followed your detailed instructions and got to this last part and am stuck.
uridecodebin uri=rtsp://linktostream name=bin ! queue ! video.
rtspsrc location=rtsp://linktostream ! rtpjitterbuffer ! rtph264depay ! h264parse ! avdec_h264 ! queue ! video.
Found a reference to GStreamer on a VLC bugreport, tried it today. RTSP camera latency went from 1140ms (with built-in Media source) through 400ms (with VLC Video Source) to 60ms!!!!!!!!!! with GStreamer Source!!!! Just came here to spread the good news!
Project:
obs-gstreamer
An OBS Studio source plugin to feed GStreamer launch pipelines into OBS Studio. This plugin has interesting use cases but may be difficult to understand and is clunky use if you are not familiar with GStreamer. Experimental prebuilt 64 Bit...obsproject.com
My steps:
Copy obs-gstreamer.dll from https://github.com/fzwoch/obs-gstreamer/releases/download/v0.1.0/obs-gstreamer.zip (\windows) to PathToOpenBroadcasterSoftware\obs-plugins\64bit\
Get https://gstreamer.freedesktop.org/d...0/mingw/gstreamer-1.0-mingw-x86_64-1.18.0.msi and install. Put PathTo\gstreamer\1.0\mingw_x86_64\bin\ into PATH (or copy libglib-2.0-0.dll, libgobject-2.0-0.dll, libgstapp-1.0-0.dll, libgstaudio-1.0-0.dll, libgstreamer-1.0-0.dll, libgstvideo-1.0-0.dll to PathToOpenBroadcasterSoftware\bin\64bit\, based on https://github.com/fzwoch/obs-gstreamer/issues/13#issuecomment-711106142 but this I have not tried yet...)
Start OBS and add GStreamer Source. We use HikVision IP cameras, my Pipeline looks like this:
Important to uncheck Sync appsinks to clock, and to my surprise the feed in OBS is lower latency than the feed in Internet Explorer.Code:uridecodebin uri=rtsp://username:password@ipaddress/Streaming/Channels/1 name=bin ! queue ! video.
Live test on Sunday.
rtspsrc location=rtspt://url latency=0 ! rtph264depay ! h264parse ! avdec_h264 ! video.
rtspsrc location=rtspt://url latency=120 ! rtph264depay ! h264parse ! avdec_h264 ! video.
If you want to delay audio stream and be able to hear it through monitoring it is best to use VST plugin for sound delay, than it works. I recomend ReaDelay
It is free and works fine. Just turn down the dry fader and the feedback fader and set your delay time.
Using pipeline timestamps will make video-audio sync unreliable over time if I'm using low latency. My new issue is 3 x h264 stream decode will saturate my graphics card, and interestingly the 3D part gets high and the decode part is not used at all. More weird behaviour is, that it will get high when OBS window lost the window focus. This results in lagging frames...Hello Stephanvs, may be playing a bit around with the sync options can stabilise the latency ?
Nevermind, downgrading to 26.0.2 fixed the issue.Using pipeline timestamps will make video-audio sync unreliable over time if I'm using low latency. My new issue is 3 x h264 stream decode will saturate my graphics card, and interestingly the 3D part gets high and the decode part is not used at all. More weird behaviour is, that it will get high when OBS window lost the window focus. This results in lagging frames...
gst-inspect-1.0.exe d3d11
Plugin Details:
Name d3d11
Description Direct3D11 plugin
Filename D:\Programok\gstreamer\1.0\mingw_x86_64\lib\gstreamer-1.0\libgstd3d11.dll
Version 1.18.0
License LGPL
Source module gst-plugins-bad
Source release date 2020-09-08
Binary package GStreamer Bad Plug-ins source release
Origin URL Unknown package origin
d3d11upload: Direct3D11 uploader
d3d11download: Direct3D11 downloader
d3d11convert: Direct3D11 colorspace converter and scaler
d3d11videosinkelement: Direct3D11 video sink
d3d11videosink: Direct3D11 video sink bin
d3d11h264dec: Direct3D11 H.264 NVIDIA GeForce GT 640 Decoder
d3d11h265dec: Direct3D11 H.265 NVIDIA GeForce GT 640 Decoder
7 features:
+-- 7 elements
rtspsrc location=rtspt://url latency=100 ! rtpjitterbuffer latency=0 ! rtph264depay ! h264parse ! d3d11h264dec ! video.
Nevermind again... d3d11h264dec uses MORE CPU than avdec_h264... Weird...While at this issue, I found this. Basically:
shows me the following:Code:gst-inspect-1.0.exe d3d11
(in a more colored way...)Code:Plugin Details: Name d3d11 Description Direct3D11 plugin Filename D:\Programok\gstreamer\1.0\mingw_x86_64\lib\gstreamer-1.0\libgstd3d11.dll Version 1.18.0 License LGPL Source module gst-plugins-bad Source release date 2020-09-08 Binary package GStreamer Bad Plug-ins source release Origin URL Unknown package origin d3d11upload: Direct3D11 uploader d3d11download: Direct3D11 downloader d3d11convert: Direct3D11 colorspace converter and scaler d3d11videosinkelement: Direct3D11 video sink d3d11videosink: Direct3D11 video sink bin d3d11h264dec: Direct3D11 H.264 NVIDIA GeForce GT 640 Decoder d3d11h265dec: Direct3D11 H.265 NVIDIA GeForce GT 640 Decoder 7 features: +-- 7 elements
Anyway, my current pipeline:
This removes decoding overhead from the CPU and adds it to the GPU.Code:rtspsrc location=rtspt://url latency=100 ! rtpjitterbuffer latency=0 ! rtph264depay ! h264parse ! d3d11h264dec ! video.
Still not sure about the rtpjitterbuffer option, so it stays there until further testing.