obs-gstreamer

obs-gstreamer 0.4.1

Tuna

Member
It is always recommended to compile your own version to the GStreamer SDK of your choice. The pre-built one is compiled to the SDK installed via macports. Copying other runtime files around may or may not work.

When compiling on your own the correct locations should be set in your final library. It will also build for the native architecture of your system (x86_64 or arm64).
 

rdagijones

New Member
I am reading and trying to get a gstreamer instance in OBS working from an IP camera but keep getting a black screen. Here are some stats:
  • Windows 10 pc
  • gstreamer installed
  • path variable is set (checked this on this forum and youtube)
  • plugin installed on OBS and get the test patern.
  • I can get an rstp stream from VLC with the following URL
Code:
rtsp://admin:pass1234@192.168.1.81:554/ch0_0.264

I am fairly certain that my pipeline is the issue but I cannot figure it out. Here are some examples of what I have tried.
Code:
uridecodebin uri=rtsp://admin:pass1234@192.168.1.81:554/ ! queue ! video.

rtspsrt location-rtspt://admin:pass1234@192.168.1.81:554/ch0_0.264 ! rtph264depay ! h264parse ! nvh264dec ! videoconvert ! video.

rtspsrc location=rtspt://admin:pass1234@192.168.1.81:554/ch0_0.264latency=100 ! rtpjitterbuffer latency=0 ! rtph264depay ! h264parse ! d3d11h264dec ! video.

Attached is a screenshot of Video settings on the camera (if that helps).

Any suggestions on how to troubleshoot this on a Windows PC?
 

Attachments

  • 2025-03-06 12_44_01-IPcamera.png
    2025-03-06 12_44_01-IPcamera.png
    20.1 KB · Views: 59

Tuna

Member
.264 but H.265 in profile would make me suspicious. But as always - make it work with gst-launch-1.0 first. If that does not work it is not a fault of the plugin.
 

alba4k

New Member
Hey, I'm, having some issues when trying to use my camera in OBS (since v4l2 and pipewire both don't work). It used to work, but now I removed the source by mistake and am struggling to add it again as I can't remember what I used

I think this should work, but it doesn't
Code:
libcamerasrc ! video/x-raw,format=RGBA ! videoconvert ! video

using this in a terminal works
Code:
gst-launch-1.0 libcamerasrc ! video/x-raw,format=RGBA ! videoconvert ! waylandsink

no luck even with something as simple as
Code:
libcamerasrc ! video

All that happens is I see the camera LED turn on for a second and then off again (instead of staying on)
 

STEPHANVS

Member
Hey, I'm, having some issues when trying to use my camera in OBS (since v4l2 and pipewire both don't work). It used to work, but now I removed the source by mistake and am struggling to add it again as I can't remember what I used

I think this should work, but it doesn't
Code:
libcamerasrc ! video/x-raw,format=RGBA ! videoconvert ! video

using this in a terminal works
Code:
gst-launch-1.0 libcamerasrc ! video/x-raw,format=RGBA ! videoconvert ! waylandsink

no luck even with something as simple as
Code:
libcamerasrc ! video

All that happens is I see the camera LED turn on for a second and then off again (instead of staying on)
Don't forget the "." after video.
 

haris2887

New Member
I have been really strugling with this plugin.
I cant get my CCTV camera RTSP stream to launch using the GST-launch commands from CLI,
However if I put the same command in OBS it does not want to load.
i have found that "appsink" command at the end causes issues but is required .



If i replace "appsink" with "autovideosink" THe stream loads up but it is in a new window not in the OBS window.

Code:
rtspsrc location=rtsp://admin:password@192.168.20.10:554/h264Preview_01_main latency=200 ! rtph264depay ! h264parse ! avdec_h264 ! videoconvert ! videoscale ! appsink

My camera stream specs are :
Code:
    Video Codec: H.264 (MPEG-4 AVC part 10)

    Video Resolution: 2560x1440

    Buffer Dimensions: 2560x1440

    Frame Rate: ~29.97 fps

    Audio Codec: MPEG AAC (mp4a)

    Sample Rate: 32 kHz, 32 bits per sample, stereo

Running 64-bit version of OBS, version 32.0.2
Plugin version pre complied latest from Github (0.4.1)
 
True, streamer has a steep learning curve... took me quite a while to get it working perfectly. The reward, though, is high ;-)

so a few suggestions :

rtspsrc location=rtspt://admin:password@192.168.20.10:554/h264Preview_01_main latency=200 ! rtph264depay ! h264parse ! nvh264dec ! video.

rtspt instead of rtsp , to use TCP for UDP
latency 200 seems a bit high.... my setup is happy with 30
nvh264dec is much faster for avdec_h264 , if you happen to have an NVIDEA video card this unloads your CPU

but most important : try just , and mind the dot : video.
(my setup does only the video from camera, i have a separate audio feed)

i use gstreamer with 7 hikvision IP camera's, 4 of which are PTZ controlled for our local church. Nicely lip sync, so no expensive NDI cameras needed....

good luck !
 

STEPHANVS

Member
i use gstreamer with 7 hikvision IP camera's, 4 of which are PTZ controlled for our local church. Nicely lip sync, so no expensive NDI cameras needed....

Which of the checkboxes do you have checked in the configuration window?

1763551790012.png


If I enable the Use pipeline time stamps (video) / Sync appsink to clock (videol), the video will start to slowly lag behind until it reaches around 4-500ms. Without them the latency parameters are not taken into account, the video feed will sometimes drop some frames. We accepted the dropped frames in favor of realtime video, but if I can do something to fix it, I would.

Also I noticed, that avdec_h264 is more stable, than nvh264dec, video frames are far less jumpy...
 
So here are my gstreamer settings. I noticed no lagging , our use is max 1 to 1,5 hour so maybe a bit too short to develop this problem.

any suggestions are welcome of course !
 

Attachments

  • gstreamer_1_anoniem.jpg
    gstreamer_1_anoniem.jpg
    43.6 KB · Views: 17
  • gstreamer_2.jpg
    gstreamer_2.jpg
    43.6 KB · Views: 14
Top