Thank you so much for the quick reply, i have tried the rtspt command as well with no luck. I am on a fully Vlanned network, however I am able to connect using the VLC or the Media Source within OBS using the...Could be anything really. Verify that it works with the gst-launch1.0 command first. Maybe try rtspt:// protocol which tunnels RTP over TCP. Since you hid your ip address it may be that no UDP transmission is not possible due to NAT.
Many thanks for the quick reaction. It shouldn't be network congestion - the ethernet network extends only from the PC, though a gigabit PoE router, to the 4 local cameras over Cat6 ethernet, longest run about 30m. Allowing for the 2nd stream from each camera there should only be around 5-6MBps per camera, 30Mbps tops... The problem is visible on the OBS preview and programme screens so is on the input side. (We are also recording at 4Mbps to SSD and streaming 1.5Mbps over a tethered mobile connection offering 20Mbps upstream but the problem is independent of whether we are recording/streaming). Processor loading is below 10% when not streaming.....Sounds like network congestion to me.
Could also be some weird locking timing issue inside the pipeline.. not tellable unless deep debugging/inspection.
Could also be big I-frames from the encoder side.
It seems like a few people have made this work on a Mac but none of them have really shared how exactly. What little is out there says Macport but then doesn't really say how or what. There is a prebuilt but then people say that doesn't work.
After much trial and mostly error. I did finally make it work with the prebuilt. I had to create a symbolic link from the gstream libraries to where the prebuilt thinks they are. Probably easiest to do from a terminal window.
Good luck. It seems like it shouldn't this hard. I guess is someone were to rebuild the .so with what the current GStream pkg installs into and create the directories above the .so so it can just be plopped in the pluggin directory...
- 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.
- 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
- 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
- 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
- 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/
- 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.
- 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.
Johny Bravo many thanks for sharing your pipeline code... Prompted by your suggestion we have changed to using a similar code which isHello JohnPW, we have a very comparable setup. We use a NVidia card to off load the CPU. Here is one of our pipelines :
rtspsrc location=rtspt://url latency=100 ! rtph264depay ! h264parse ! nvh264dec ! video.
Mind the rtspt , it means we use tcp instead of udp. Gives a lot better stability in our setup. Please let us know if this helps you !