fzwoch / obs-gstreamer Goto Github PK
View Code? Open in Web Editor NEWGStreamer OBS Studio plugin
License: GNU General Public License v2.0
GStreamer OBS Studio plugin
License: GNU General Public License v2.0
Have the developers been able to use this to successfully receive and sync SRT video/audio sources? For example with the Larix mobile app? This works great for me for RTSP, but with SRT, the audio plays for a few seconds and then crashes. I am not an expert so it could I'm doing something wrong.
Downloaded the latest build from gitlab CI/CD but the plugin does not show up in OBS studio v25.
I see you mentioned here there might be some issues with OBS v25 but I couldn't figure out if you meant to say it shouldn't work.
Depending on when the last release was made - I believe OBS v25 did do an breaking API change for plugins so they had to be recompiled. And then again - compiled with v25 do not work with v24 and vice versa.. Not sure if v26 will do the same.. so I guess I will hold of a bit longer doing a release.
Originally posted by @fzwoch in #35 (comment)
Please offer installation via Flatpak so it can be installed when latest OBS is installed via Flatpak. ( See also WarmUpTill/SceneSwitcher#176 )
Hello,
I had a working installation on Ubuntu 18.04, but after an upgrade to 19.10 I'm getting:
ERROR: Caught a segmentation fault while loading plugin file:
/usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstlibav.so
Please either:
- remove it and restart.
- run with --gst-disable-segtrap --gst-disable-registry-fork and debug.
Segmentation fault (core dumped)
I've tried it with with obs-studio packages from Ubuntu and with the one from ppa:obsproject/obs-studio
.
Also I've tried to build obs-gstreamer from source (v0.0.6 and v0.1.0) with the same result.
Even after reinstalling 18.04 I can't get it to work anymore.
The pipeline I'm using is
udpsrc port=5001 ! h264parse ! avdec_h264 ! video.
and launching it with
gst-launch-1.0 udpsrc port=5001 ! h264parse ! avdec_h264 ! autovideosink sync=false
works.
Any ideas on what to do here?
When there is a faulty audio source (tcpclientsrc host=aaaaaa.ath.cx port=55555 timeout=5 ! watchdog timeout=5000 ! oggdemux ! vorbisdec ! audio.
) where the sending gstreamer audio server is offline, whole obs starts to lag heavily.
Is obs-gstreamer blocking it while trying to establish a connection with the server?
sudo ninja -C build install
dumps the resulting gstreamer.so
file at /usr/local/lib/obs-plugins/gstreamer.so
on LinuxMint (Ubuntu).
OBS installed from apt-get
does not look here for plugins; rather, it looks in /usr/lib/obs-plugins
Temp workaround:
sudo mv /usr/local/lib/obs-plugins/gstreamer.so /usr/lib/obs-plugins
While running the gstreamer-encoder function, memory usage of OBS slowly increases until oom murders it.
This does not appear to affect the gstreamer-source function, only the encoder function.
Upon stopping the gstreamer-encoder, memory usage stabilizes, but does not return to normal without closing obs.
I've run the same string with gst-launch and videotestsrc and memory usage is stable, showing the issue is likely in appsrc or appsink.
Memory usage increase is proportional to the data rate, larger resolution or higher bitrates affect the rate of increase.
OBS reports 0 memory leaks upon closing out.
Hello,
I'm having some rather unspecific issues when running a shmsink in obs-gstreamer pipelines. A simple example pipeline is:
videotestsrc is-live=true !
video/x-raw, framerate=30/1, width=960, height=540 !
tee name=t
t. ! queue ! video.
t. ! queue ! shmsink socket-path=/tmp/obs-gstreamer-socket wait-for-connection=0
One symptom that can be observed on the console output of OBS is the following error whenever stopping the pipeline:
error: Failed waiting on fd activity
Specifically, this message pops up as a result of the gst_element_set_state(data->pipe, GST_STATE_NULL);
in stop()
.
I have also observed the following message which popped up quite a bit later:
(obs:116198): GStreamer-CRITICAL **: 21:32:06.429: gst_element_set_state: assertion 'GST_IS_ELEMENT (element)' failed
Now this is where things get a bit fuzzy. While I was playing around with obs-gstreamer, everything seemed quite stable. But when I started using the shmsink elements, activating/deactivating obs-gstreamer sources or switching between scenes or collections (which also cause many pipeline stops) sometimes caused OBS to crash (due to various reasons, double free, source with id XYZ not found – seems like some unspecific memory corruption). This may be harder to reproduce using the simple pipeline above, but in principle I was using multiple similar pipelines, using V4L2 inputs instead of the test input.
My best bet is that the error mentioned in the beginning leads to some bug which will also fix the crashing behavior, otherwise more investigation is needed.
Best regards
Ochi
GStreamer sources on Windows don't seem to connect the audio to the output stream.
I can see the audio sources from my Gstreamer pipelines rendered in the mixer; however, the audio does not actually get output to the stream / recording. If I choose to monitor one of the sources, it will be "picked up" by the OBS capture of my default audio device; but not directly from obs-gstreamer:
It seems that when a gstreamer source is passed into obs and it goes to render that source, the source is always incorrectly rendered in a full range color space. For example, when I use this as my pipeline in obs, it incorrectly renders the source which is sending a partial color space rtsp stream, in a full color space window (leading to a full black on the camera source as a grey on screen) uridecodebin uri=rtsp://10.0.0.57:554/1 ! queue ! videorate ! video/x-raw,framerate=60/1 ! video.
I can verify gstreamer works correctly by running this is command (uridecodebin uri=rtsp://10.0.0.57:554/1 ! queue ! videorate ! video/x-raw,framerate=60/1 ! autovideosink) which correctly shows the black as black, indicating that the color space was interpreted correctly.
Edit: I can get around this bug by converting the format first to YUY2 and then to raw but that is not ideal (like this: uridecodebin uri=rtsp://10.0.0.57:554/1 ! videoconvert ! video/x-raw,format=YUY2 ! queue ! videorate ! video/x-raw,framerate=60/1 ! video.)
Currently, the plugin supports audio as part of the source, but an audio-only plugin would be nice so that when the scene no longer includes the source, the pipeline may still render audio into the mixer.
Specifically, this pipeline comes to mind:
videotestsrc pattern=18 ! video. alsasrc name=audiosrc device=hw:1 ! audio/x-raw,channels=32,layout=interleaved,rate=48000 ! queue ! deinterleave name=d interleave name=i d.src_0 ! queue ! audioconvert ! i.sink_0 d.src_1 ! queue ! audioconvert ! i.sink_1 i. ! audio.
I'd like to not need to map anything to the .video
sink, and allow this pipeline to run regardless of the currently live scene (and whether the obs-gstreamer
source is present on that scene)
A GStreamer Source appears in the OBS audio mixer, even when no GStreamer Source instances have connections to the audio.
pad.
Good Evening,
An issue has been brought to my attention that there is a desync issue when encoding with obs-gstreamer on arm64.
Essentially the video is being encoded much faster than the audio, causing upwards of a 1.5 second delay in audio vs video.
Would it be possible to add the audio stream into the video encode stream to ensure the two remain in sync?
Thanks,
Peter
The macOS pre-built binary probably won't work out of the box. The reason is that it needs to be copied into Contents/Resources/bin/
(?) of OBS.app
or something like that but the rpath for locating libobs.dylib
is not set.
Running the sudo ninja -C build install
on aarch64 installs to /usr/local/lib/aarch64-linux-gnu/obs-plugins
.
When building OBS native on aarch64 the required installation location is the standard /usr/lib/obs-plugins
.
Hello again :)
I've noticed these messages in the syslog when I close OBS. Perhaps you could make use out of them?
Jun 27 02:33:38 ark-MS-7A40 kernel: [100527.780049] CrBrowserMain[783]: segfault at 20 ip 00007f0562b8caac sp 00007f0539bda7e0 error 4 in libgstreamer-1.0.so.0.1405.0[7f0562b2f000+131000]
Jun 27 02:33:38 ark-MS-7A40 kernel: [100527.780058] Code: 5e e9 18 f3 fc ff 0f 1f 84 00 00 00 00 00 41 54 55 41 89 f4 53 48 89 fb e8 e1 bf ff ff 48 85 db 74 3c 48 8b 2b 48 85 ed 74 06 <48> 39 45 00 74 0f 48 89 c6 48 89 df e8 03 f9 fc ff 85 c0 74 1f 48
Jun 27 02:33:38 ark-MS-7A40 systemd[1]: Started Process Core Dump (PID 3371/UID 0).
Jun 27 02:33:38 ark-MS-7A40 systemd-coredump[3373]: Removed old coredump core.obs-main.1000.73ac6c962fd1436cafce14c1bb7e2067.6915.1593079817000000.lz4.
Jun 27 02:33:43 ark-MS-7A40 systemd-coredump[3373]: Process 758 (obs-main) of user 1000 dumped core.#012#012Stack trace of thread 783:#012#0 0x00007f0562b8caac gst_element_set_state (libgstreamer-1.0.so.0)#012#1 0x00007f0562e6ce2d n/a (/home/ark/obs-main/config/obs-studio/plugins/obs-gstreamer/bin/64bit/obs-gstreamer.so)
Jun 27 02:34:51 ark-MS-7A40 kernel: [100600.616448] CrBrowserMain[3416]: segfault at a0 ip 00007f226533daac sp 00007f22417de7e0 error 4 in libgstreamer-1.0.so.0.1405.0[7f22652e0000+131000]
Jun 27 02:34:51 ark-MS-7A40 kernel: [100600.616457] Code: 5e e9 18 f3 fc ff 0f 1f 84 00 00 00 00 00 41 54 55 41 89 f4 53 48 89 fb e8 e1 bf ff ff 48 85 db 74 3c 48 8b 2b 48 85 ed 74 06 <48> 39 45 00 74 0f 48 89 c6 48 89 df e8 03 f9 fc ff 85 c0 74 1f 48
Here is the log and the commands I tried:
➜ obs-gstreamer git:(master) meson --buildtype=release build
The Meson build system
Version: 0.45.1
Source dir: /home/simon/Documents/git-repo/oss/obs-gstreamer
Build dir: /home/simon/Documents/git-repo/oss/obs-gstreamer/build
Build type: native build
Project name: obs-gstreamer
Native C compiler: cc (gcc 7.5.0 "cc (Ubuntu/Linaro 7.5.0-3ubuntu1~18.04) 7.5.0")
Build machine cpu family: aarch64
Build machine cpu: aarch64
Found pkg-config: /usr/bin/pkg-config (0.29.1)
Native dependency libobs found: YES 26.1.2-204-g516ed4458
Native dependency gstreamer-1.0 found: YES 1.14.5
Native dependency gstreamer-video-1.0 found: YES 1.14.5
Native dependency gstreamer-audio-1.0 found: YES 1.14.5
Native dependency gstreamer-app-1.0 found: YES 1.14.5
Build targets in project: 2
Found ninja-1.8.2 at /usr/bin/ninja
➜ obs-gstreamer git:(master) ✗ ninja -C build
ninja: Entering directory `build'
[4/7] Compiling C object 'obs-gstreamer@sha/gstreamer-filter.c.o'.
../gstreamer-filter.c: In function ‘gstreamer_filter_filter_audio’:
../gstreamer-filter.c:287:2: warning: implicit declaration of function ‘gst_buffer_add_audio_meta’; did you mean ‘gst_buffer_add_video_meta’? [-Wimplicit-function-declaration]
gst_buffer_add_audio_meta(buffer, &data->audio_info, audio_data->frames,
^~~~~~~~~~~~~~~~~~~~~~~~~
gst_buffer_add_video_meta
[7/7] Linking target obs-gstreamer.so.
FAILED: obs-gstreamer.so
cc -o obs-gstreamer.so 'obs-gstreamer@sha/meson-generated_.._version.c.o' 'obs-gstreamer@sha/gstreamer.c.o' 'obs-gstreamer@sha/gstreamer-source.c.o' 'obs-gstreamer@sha/gstreamer-encoder.c.o' 'obs-gstreamer@sha/gstreamer-filter.c.o' -Wl,--no-undefined -Wl,--as-needed -Wl,-O1 -shared -fPIC -Wl,--start-group -Wl,-soname,obs-gstreamer.so -L/usr/local/lib -lobs -lrt -lX11 -lgstreamer-1.0 -lgobject-2.0 -lglib-2.0 -Wl,--end-group -lgstvideo-1.0 -lgstbase-1.0 -lgstreamer-1.0 -lgobject-2.0 -lglib-2.0 -lgstaudio-1.0 -lgstbase-1.0 -lgstreamer-1.0 -lgobject-2.0 -lglib-2.0 -lgstapp-1.0 -lgstbase-1.0 -lgstreamer-1.0 -lgobject-2.0 -lglib-2.0
obs-gstreamer@sha/gstreamer-filter.c.o: In function `gstreamer_filter_filter_audio':
gstreamer-filter.c:(.text+0x5fc): undefined reference to `gst_buffer_add_audio_meta'
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.
Tried to compile v0.2.0 and it worked. Please let me know what I need to provide so I can help debug and resolve this issue. Thanks!
Not exactly an "issue," but an example.
On Raspberry Pi Zero:
gst-launch-1.0 rpicamsrc name=videosrc keyframe-interval=10 shutter-speed=0 iso=200 drc=0 exposure-mode=1 metering-mode=1 awb_mode=6 bitrate=0 quantisation-parameter=22 do-timestamp=true ! h264parse ! video/x-h264,framerate=30/1,width=1280,height=720 ! matroskamux ! queue ! tcpserversink host=0.0.0.0 port=8675
On OBS:
tcpclientsrc host=PiZero port=8675 ! queue ! matroskademux ! decodebin ! videoconvert ! videorate ! videoscale ! video/x-raw, framerate=30/1, width=1920, height=1080 ! video.
Hello,
I have a scene with a single gstreamer source: srtsrc poll-timeout=2000 latency=1500 uri=srt://0.0.0.0:3979?mode=listener ! decodebin name=bin ! queue ! video. bin. ! queue ! audio.
It is receiving a 3000kbps HEVC stream using MPEG-TS. The sender is connected over a mobile network and sends SRT in caller mode. The video itself works perfectly and the delay is under 1 second.
I am using OBS 64bit on Windows running in admin-mode.
Crash log mentions bmalloc and an OS breakpoint, so this is probably a leak issue. When I was testing another time I saw memory consumption increasing about 1-2MB/s. Using gst-launch there is no increasing memory use.
Gstreamer version: 1.18.4 mingw 64bit
libsrt version: 1.4.3
Thank you
Edit:
I can reproduce this quickly by using:
gst-launch-1.0 videotestsrc is-live=true pattern=snow ! x264enc tune=zerolatency bitrate=50000 ! mpegtsmux ! srtsink uri=srt://127.0.0.1:3979?mode=caller audiotestsrc wave=ticks is-live=true ! voaacenc ! aacparse ! mpegtsmux0.
I can show the camera stream in various ways but NOT in OBS studio
Can play the following from powershell
gst-launch-1.0.exe uridecodebin uri=rtsp://admin:[email protected]/Streaming/channels/101 ! autovideosink
This works in OBS
uridecodebin uri=rtsp://wowzaec2demo.streamlock.net/vod/mp4:BigBuckBunny_115k.mov name=bin ! queue ! video. bin. ! queue ! audio.
This also works in OBS
videotestsrc is-live=true ! video/x-raw, framerate=30/1, width=960, height=540 ! video.
This does not show anything in OBS
uridecodebin uri=rtsp://admin:[email protected]/Streaming/channels/101 name=bin ! queue ! video. bin. ! queue ! audio.
Nor this
uridecodebin uri=rtsp://admin:[email protected]/Streaming/channels/101 ! video.
Installed gstreamer gstreamer-1.0-mingw-x86_64-1.18.2.msi
Installed OBS OBS-Studio-26.1-Full-Installer-x64.exe
Copied the obs-gstreamer.dll (size=125.591bytes) into C:\Program Files\obs-studio\obs-plugins\64bit
------------------------ further tests done, working
gst-play-1.0.exe rtsp://admin:[email protected]:554/Streaming/channels/101
gst-launch-1.0.exe rtspsrc location=rtsp://admin:[email protected]:554/Streaming/channels/101 ! decodebin ! autovideosink
gst-launch-1.0.exe uridecodebin uri=rtsp://admin:[email protected]/Streaming/channels/101 ! autovideosink
Hi!
I've noticed that when I attempt to modify a pipeline, it reloads on every keypress. It makes OBS lag when I do that (it takes 1-2 seconds to process a new keypress) and now, for some reason, my OBS is crashing every time I type a new letter in the pipeline.
Perhaps it would make sense to disable that feature altogether and add a small button "test pipeline" under the text field which allow the user to enter the full pipeline first and then test it once he's done?
Thank you for your consideration.
I can't get it working, tried lot of different configurations.
M3U8 file looks like this:
#EXTM3U #EXT-X-VERSION:3 #EXT-X-MEDIA-SEQUENCE:893 #EXT-X-TARGETDURATION:4 #EXTINF:3.334, 40WjFnamJgYWdrTjZ7MTA2Ojw4NDc3-001550180296886_000000000000000_L42WQ3TCMJUGE3KEHA_1080p_d0_NZXWIZLTMM_r626853397090207077.ts?extra= #EXTINF:3.325, 40WjFnamJgYWdrTjZ7MTA2Ojw4NDc3-001550180300249_000000000000000_L42WQ3TCMJUGE3KEHA_1080p_d0_NZXWIZLTMM_r2079583977462108025.ts?extra= #EXTINF:3.317, 40WjFnamJgYWdrTjZ7MTA2Ojw4NDc3-001550180303572_000000000000000_L42WQ3TCMJUGE3KEHA_1080p_d0_NZXWIZLTMM_r6522384740513319295.ts?extra= #EXTINF:3.329, 40WjFnamJgYWdrTjZ7MTA2Ojw4NDc3-001550180306910_000000000000000_L42WQ3TCMJUGE3KEHA_1080p_d0_NZXWIZLTMM_r5131058999397848931.ts?extra=
Used this cheat sheet for help: https://github.com/xmementoit/gstreamerCheatsheet/blob/master/README.md#play-hls-http-live-streaming-url-using-gstreamer-pipeline
I tried the prebuilt plugin 0.1.0 on macOS with latest obs 25.0.8. It does not work, because it searches obs lib in ../bin/libobs.0.dylib, but it is now located in ../MacOs/libobs.0.dylib. As workaround i copied the lib into the expected path and installed latest gstreamer1 v1.16.1 from MacPorts.
Unfortunately obs crashes on startup:
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 libobs.0.dylib 0x000000001925f658 get_source_info2 + 24
1 libobs.0.dylib 0x000000001929c245 obs_register_source_s + 149
2 obs-gstreamer.so 0x0000000019214914 obs_module_load + 52
3 libobs.0.dylib 0x000000010e141090 obs_init_module + 80
4 libobs.0.dylib 0x000000010e141ef0 load_all_callback + 64
5 libobs.0.dylib 0x000000010e141e0f obs_find_modules + 2127
6 libobs.0.dylib 0x000000010e1415a3 obs_load_all_modules + 35
7 com.obsproject.obs-studio 0x000000010b6f8005 OBSBasic::OBSInit() + 757
8 com.obsproject.obs-studio 0x000000010b6d828e OBSApp::OBSInit() + 494
9 com.obsproject.obs-studio 0x000000010b6dad0b main + 5163
10 libdyld.dylib 0x00007fff5e3d63d5 start + 1
Did I something wrong?
a broken GST pipeline causes OBS to continue to display the last received frame on the source.
Hello again :)
I have another problem. This time it is with RTSP streams and how the pipeline is expected to recover after a camera outage. When I send the camera to reboot, it goes away for 30-60 seconds. However, I expect the stream to automatically recover once it's back (please check settings). Instead I get nothing and have to enter a blank space (or add/delete any other character) into the pipeline so it reloads itself.
Here is my pipeline for a Hikvision RTSP stream:
rtspsrc location=rtsp://admin:***@192.168.1.253:554/Streaming/Channels/101 ! rtph264depay ! avdec_h264 ! video.
Can you please take a look? Thank you!
I'm trying to use a source from the gst plugin of https://github.com/AravisProject/aravis but all I get is a grey picture in the plugin.
I'm using aravissrc camera-name='Aravis-Fake-GV01' exposure=32000 gain=15 ! video/x-raw,width=1028,height=772 ! videoconvert ! video.
as a pipeline.
Using gst-launch-1.0 aravissrc camera-name='Aravis-Fake-GV01' exposure=32000 gain=15 ! video/x-raw,width=1028,height=772 ! videoconvert ! ximagesink
I do get the test video.
Any ideas what could be wrong ? I've tried running obs with obs --verbose
but no error is showing.
EDIT: using obs 26.0.2 on linux and obs-gstreamer latest git manually built
Hey
I am running OBS GIT master version on Arch Linux.
I want to use the filter to split audio to jack from a Browser source.
The filter is first of all only displayed in the Audio Filters, not in Effect Filters
(I only want to use audio so I would not mind)
In the code, it looks like the filter should be used with video?
when I add the Filter it's not appeared in the list like other filters.
in the std it prints :
info: User added filter 'GStreamer Filter' (gstreamer-filter) to source 'Browser'
and no pipeline Input field is visible.
How can I debug that?
Best
Marc
I have seen that the last version is almost a year old, although the repository is well maintained.
Would it be possible to release the latest changes?
btw. the latest release is not working with the latest OBS Studio on macOS - I had to build it myself
The plugin never shows up in log files nor is visible as a source or encoder.
I tried both building from source and using the supplied binary and moving the plugin between folders (I use PPA OBS, all my other plugins placed in /usr/share/obs/obs-plugins and ~userdir/.config/obs-studio/plugins work fine).
Ubuntu 19.04, OBS 24.0.0
I was looking at the tagged release notes to see if any recent releases addressed issues I am having, but I could not figure out what version I am currently running. It would be great if some identifying details could be added to the DLL. Version information if possible would be ideal, but commit hash in the description field is also useful if obtaining the version number is tricky (unknown at time of build).
Hi.
I'm having issues running the plugin under the latest version of OBS (25.0.8, 64-bit, windows)
I've tried both the release found here as well as one built from the latest commit here: https://gitlab.com/fzwoch/obs-gstreamer/pipelines
I have tried with the gstreamer 1.16.2 and also the 1.15.1 runtime, in both cases I've added manually the folder which contains the dlls (D:\gstreamer\1.0\x86_64\bin
) to my path env var, and validated that gst-inspect-1.0.exe works just fine.
The only thing related to gstreamer that appears in the logs is:
Module '../../obs-plugins/64bit/obs-gstreamer.dll' not loaded
Many thanks, Gonzalo
Please add to the README.md documentation on how to install this plugin from the obs-gstreamer.zip release file. Here are some paths that could be used for the installation instruction https://github.com/WarmUpTill/SceneSwitcher/blob/master/CI/release/README.txt#L21
I can't seem to get OBS to load the gstreamer Windows DLL, but I'm probably doing something wrong
Running OBS OBS 22.0.2 (64-bit, windows)
I installed both gstreamer-1.0-devel-x86_64-1.15.1.msi and gstreamer-1.0-x86_64-1.15.1.msi from https://gstreamer.freedesktop.org/data/pkg/windows/1.15.1/
Logs indicate failure to locate the dll:
21:13:01.034: LoadLibrary failed for '../../obs-plugins/64bit/gstreamer.dll': The specified module could not be found.
21:13:01.034: (126)
21:13:01.034: Module '../../obs-plugins/64bit/gstreamer.dll' not loaded
Any pointers would be appreciated.
Thank you for an amazing module!
I have several scenes (all of which have gstreamer sources through your plugin). I've noticed that they start receiving and playing data only when I open each scene manually for the first time. This is different from the expected behaviour that all sources should start playing when OBS starts.
I have "stop pipeline when hidden" disabled.
How can I get them to play when OBS starts (even when the scene is hidden from view)?
I'm not sure if this plugin for OBS even works properly, no matter what GStreamer filter I try, nothing seems to work. The only one that seems to work by default is this;
videoflip video-direction=horiz
which just flips the video. But if I wanted to use something like this;
videobalance saturation=0.0 ! video/x-raw, framerate=30/1, width=960, height=540 ! videoconvert ! video.
it doesn't do anything at all for the video. What it is supposed to do is turn the color saturation down to 0, applying as a filter to an existing source video should be able to take on this effect when applied. If I just create a new source, not applied as a filter, I get the expected result of no saturation but with a test video source if I included videotestsrc
.
I wish translate and record source signal, using GST pipeline like this:
videotestsrc is-live=true ! tee name=srctee ! queue ! filesink location=/home/stas/test.dv async=0 srctee. ! decodebin ! videoconvert ! videoscale ! video.
BTW, this pipeline works.
But of course, I dont want to hardcode paths, and want to generate filename using common
OBS format for filenames, like
"somesource-%CCYY-%MM-%DD-%hh-%mm-%ss"
(because I dont want to override recorded file every recording).
and PATH to recording can be taken from OBS settings.
So I want something like this
videotestsrc is-live=true ! tee name=srctee ! queue ! filesink location=%OBSPATH-sourcename-%CCYY-%MM-%DD-%hh-%mm-%ss.myext async=0 srctee. ! decodebin ! videoconvert ! videoscale ! video.
but something simpler, like
videotestsrc is-live=true ! tee name=srctee ! queue ! filesink location=%OBSPATH-sourcename-%ISOTIMEWITHDASHES.myext async=0 srctee. ! decodebin ! videoconvert ! videoscale ! video.
should also be OK.
Where can i find the prebuild windows plugin ?
Hello!
Thank you for this great addon for OBS - I am using the gst source to read a remote RTMP stream. The video is very reliable (1 second latency and it recovers gracefully from wifi problem - I am very impressed), but the audio is distorted as if it's been pitched up.
The pipeline is a copy-paste from the project's homepage:
uridecodebin uri=rtmp://my.source.ip/faraway/xxxxxxxxxxx06803e64a2dd915844c7b73020714a name=bin ! queue ! video. bin. ! queue ! audio.
As mentioned, the audio sounds like it's been shoved up by about an octave - happy to share the URL if we can co-ordinate some testing time 👍
Cheers,
Gavin
Hello!
The gstreamer pipeline has an interesting option called "watchdog". It sends a kill signal to the whole pipeline if there are errors in the source stream. Combined with your "try to restart" options it creates a bulletproof pipeline which always works.
Perhaps it would be worth adding " ! watchdog ! " in your examples so new people would not have to waste time on figuring out while the pipelines stop working every now and then?
I have a pipeline source set up that does not start with OBS, but works fine if I manually edit the pipeline after OBS is running.
I suspect this has to do with the "stop_on_hide" setting, and that there may be some kind of race condition where pipelines having "stop_on_hide" set to false attempt to begin running before OBS is actually ready to map the inputs. I haven't dug into the code, but from anecdotal usage, this seems to be the case. Setting "stop_on_hide" to true causes the pipeline to begin correctly at application launch.
videotestsrc pattern=18 ! video. alsasrc name=audiosrc device=hw:1 ! audio/x-raw,channels=32,layout=interleaved,rate=48000 ! queue ! deinterleave name=d interleave name=i d.src_0 ! queue ! audioconvert ! i.sink_0 d.src_1 ! queue ! audioconvert ! i.sink_1 i. ! audio.
I know stop_on_hide
has been a big point of discussion. It's worth noting that the other pipelines I'm running "in the background" are configured and started by a python script after a duration of network discovery. This pipeline running in the background does not have such a startup delay.
You didn't give any instructions, how to install libraries for obs and gstreamer and where can I download it?
Hi,
I've been trying to get this to work yesterday, but didn't manage to. Anything I try leads to not seeing the gstreamer source
in OBS.
I've tried using default MacOs gstreamer installer, which installs version 1.18.4, and I also added /Library/Frameworks/GStreamer.framework/Versions/Current
to my PATH
to see if it would help.
I also tried installing gstreamer through Homebrew, verifying that /usr/local/sbin
is added to my PATH. This also installs gstreamer version 1.18.4.
Lastly, I tried installing gstreamer through Macports as that's what you mention specifically. I installed the port gstreamer1
, which installs version 1.16.2, verifying that both /opt/local/bin
and /opt/local/sbin` are a part of my PATH.
With every approach, I added the MacOs .so variant of obs-gstreamer
version 0.3.1 to /Applications/OBS.app/Contents/PlugIns
, but after starting OBS, the gstreamer source
wasn't in the menu and I didn't manage to find any logs which could lead me to understand what's wrong.
Am I doing something wrong, or do you have any suggestions on what else I could try? I'm running MacOs version 11.2.3.
Thanks!
Hello,
When trying to apply the Video Delay (Async)
filter to a gst source, as soon as the delay is non-zero, the input simply freezes. Returning the filter to zero makes the video resume immediately.
OBS 26.0.2 on Ubuntu 20.04
Cheers,
Gavin.
I am on Ubuntu 18.04LTS, the result of the compilation with meson is the following:
meson --buildtype=release build
The Meson build system
Version: 0.45.1
Source dir: /home/macnica/Documents/OBS/obs_gstreamer/obs-gstreamer
Build dir: /home/macnica/Documents/OBS/obs_gstreamer/obs-gstreamer/build
Build type: native build
meson.build:21:0: ERROR: Meson version is 0.45.1 but project requires >=0.46.
A full log can be found at /home/macnica/Documents/OBS/obs_gstreamer/obs-gstreamer/build/meson-logs/meson-log.txt
Do I need to rebuild a newer version of meson for Ubuntu 18.04?
61ac153 introduces a bug(?) where pipeline text modified by another plugin does not execute.
Specifically, I'm seeing it here: https://github.com/crossan007/obs-gstreamer-device-mapper/blob/master/lib/NetCamClientHandler.py#L62
After the pipeline is updated via obs.obs_source_update(source, settings)
, the TCP port expected to be opened by gstreamer pipeline tcpserversrc host=0.0.0.0 port={port}
is never opened.
This could also be a bug in the way I'm telling obs-gstreamer about new pipeline text.
Hi,
first of all thanks for this plugin, it makes OBS incredibly powerful, great work!
I seem to have found a bug however that I can reproduce each time. When using a render delay filter to delay the stream theres a cutoff when switching scenes. It looks like the old render delay buffer is being played for some reason.
To reproduce:
Thanks again for this software!
Cheers,
Normen
Hello,
The newly built plugin does not show up in OBS. The *.so file is stored in a folder that is not checked by OBS at boot. When I click + under source in OBS GStreamer is not listed.
This is the last step in the obs-plugin installation note:
~/Documents/OBS/obs_gstreamer/obs-gstreamer$ sudo ninja -C build install
ninja: Entering directory `build'
[0/1] Regenerating build files.
The Meson build system
Version: 0.50.0
Source dir: /home/macnica/Documents/OBS/obs_gstreamer/obs-gstreamer
Build dir: /home/macnica/Documents/OBS/obs_gstreamer/obs-gstreamer/build
Build type: native build
Project name: obs-gstreamer-source
Project version: undefined
Native C compiler: cc (gcc 7.3.0 "cc (Ubuntu 7.3.0-16ubuntu3) 7.3.0")
Build machine cpu family: x86
Build machine cpu: i686
Compiler for C supports link arguments -static-libgcc: YES
Library obs found: YES
Dependency gstreamer-1.0 found: YES (cached)
Dependency gstreamer-video-1.0 found: YES (cached)
Dependency gstreamer-audio-1.0 found: YES (cached)
Dependency gstreamer-app-1.0 found: YES (cached)
Build targets in project: 1
Found ninja-1.8.2 at /usr/bin/ninja
[0/1] Installing files.
Installing gstreamer.so to /usr/local/lib/obs-plugins
To fix this problem I did: sudo cp /usr/local/lib/obs-plugins/gstreamer.so /usr/lib/obs-plugins/
OBS looks (at least with Ubuntu) under /usr/lib/obs-plugins to find any *.so files.
Hello,
I am trying to import remote audio into obs via gstreamer - I can see the audio meter fluctuating, but there is no audio on the broadcasted stream.
Audio server:
gst-launch-1.0 -v alsasrc device=plughw:1,0 ! audio/x-raw,rate=48000,channels=1 ! vorbisenc ! oggmux ! tcpserversink port=55555
Client (testing that it works, I can hear the sound):
gst-launch-1.0 -v tcpclientsrc port=55555 ! oggdemux ! vorbisdec ! autoaudiosink
OBS client (meter fluctuating, but no audio on the broadcast):
tcpclientsrc port=55555 ! oggdemux ! vorbisdec ! audio.
2021-02-07 14-09-36.txt
crash log.txt
I setup a simple pipeline with the gstreamer plug in:
srtserversrc uri="srt://192.168.100.29:9711?mode=listener" ! decodebin name=bin ! queue ! video. bin. ! queue ! audio.
I am using the Larix app as the client for the SRT stream. If the stream is actively sent, and the user opens the gstreamer source properties page, and clicks OK, then OBS will crash. If the stream is stopped from the app on a separate device, then OBS will update the properties just fine.
Versions:
obs-gstreamer installed from 99c30f30660f9c9f611d66754925cdc6767d5bb8
using mesa/ninja
OBS 26.1.1
gstreamer: gst-launch-0.10 version 0.10.36 / GStreamer 0.10.36
I have an audio source setup with this pipeline (designed to bring in audio from an Allen and Heath SQ7 mixer over USB, route channels 30,31 to OBS, and "Share" all of the other channels via shmsink
to /tmp/qu32
):
alsasrc name=audiosrc device=hw:1 ! audio/x-raw,channels=32,layout=interleaved,rate=48000,format=S32LE ! tee name=t t. ! queue ! shmsink wait-for-connection=0 socket-path=/tmp/qu32 shm-size=2000000 t. ! queue ! deinterleave name=d interleave name=i d.src_30 ! queue ! audioconvert ! i.sink_0 d.src_31 ! queue ! audioconvert ! i.sink_1 i. ! audio.
The other side of this shmsink
pipeline is just a shell script (but is not necessarily always running):
#!/bin/bash
# OBS CAPTURE:
# alsasrc name=audiosrc device=hw:1 ! audio/x-raw,channels=32,layout=interleaved,rate=48000,format=S32LE ! tee name=t t. ! queue ! shmsink wait-for-connection=0 socket-path=/tmp/qu32 shm-size=2000000 t. ! queue ! deinterleave name=d interleave name=i d.src_30 ! queue ! audioconvert ! i.sink_0 d.src_31 ! queue ! audioconvert ! i.sink_1 i. ! audio.
cd "/home/media/ownCloud/OBS Recordings/"
file_date=$(date +'%Y%m%d-%H%M%S')
folder_name="multitrack/$file_date"
mkdir -p $folder_name
filename_prefix="mt"
cd $folder_name
gst-launch-1.0 -e shmsrc is-live=true socket-path=/tmp/qu32 ! \
audioparse channels=32 interleaved=true format=raw rate=48000 raw-format=s32le ! \
queue ! audio/x-raw,channels=32,layout=interleaved,rate=48000,format=S32LE ! \
deinterleave name=d \
d.src_0 ! queue ! audioconvert ! wavenc ! filesink location="$filename_prefix-00-$file_date.wav" \
d.src_1 ! queue ! audioconvert ! wavenc ! filesink location="$filename_prefix-01-$file_date.wav" \
d.src_2 ! queue ! audioconvert ! wavenc ! filesink location="$filename_prefix-02-$file_date.wav" \
d.src_3 ! queue ! audioconvert ! wavenc ! filesink location="$filename_prefix-03-$file_date.wav" \
d.src_4 ! queue ! audioconvert ! wavenc ! filesink location="$filename_prefix-04-$file_date.wav" \
d.src_5 ! queue ! audioconvert ! wavenc ! filesink location="$filename_prefix-05-$file_date.wav" \
d.src_6 ! queue ! audioconvert ! wavenc ! filesink location="$filename_prefix-06-$file_date.wav" \
d.src_7 ! queue ! audioconvert ! wavenc ! filesink location="$filename_prefix-07-$file_date.wav" \
d.src_8 ! queue ! audioconvert ! wavenc ! filesink location="$filename_prefix-08-$file_date.wav" \
d.src_9 ! queue ! audioconvert ! wavenc ! filesink location="$filename_prefix-09-$file_date.wav" \
d.src_10 ! queue ! audioconvert ! wavenc ! filesink location="$filename_prefix-10-$file_date.wav" \
d.src_11 ! queue ! audioconvert ! wavenc ! filesink location="$filename_prefix-11-$file_date.wav" \
d.src_12 ! queue ! audioconvert ! wavenc ! filesink location="$filename_prefix-12-$file_date.wav" \
d.src_13 ! queue ! audioconvert ! wavenc ! filesink location="$filename_prefix-13-$file_date.wav" \
d.src_14 ! queue ! audioconvert ! wavenc ! filesink location="$filename_prefix-14-$file_date.wav" \
d.src_15 ! queue ! audioconvert ! wavenc ! filesink location="$filename_prefix-15-$file_date.wav" \
d.src_16 ! queue ! audioconvert ! wavenc ! filesink location="$filename_prefix-16-$file_date.wav" \
d.src_17 ! queue ! audioconvert ! wavenc ! filesink location="$filename_prefix-17-$file_date.wav" \
d.src_18 ! queue ! audioconvert ! wavenc ! filesink location="$filename_prefix-18-$file_date.wav" \
d.src_19 ! queue ! audioconvert ! wavenc ! filesink location="$filename_prefix-19-$file_date.wav" \
d.src_20 ! queue ! audioconvert ! wavenc ! filesink location="$filename_prefix-20-$file_date.wav" \
d.src_21 ! queue ! audioconvert ! wavenc ! filesink location="$filename_prefix-21-$file_date.wav" \
d.src_22 ! queue ! audioconvert ! wavenc ! filesink location="$filename_prefix-22-$file_date.wav" \
d.src_23 ! queue ! audioconvert ! wavenc ! filesink location="$filename_prefix-23-$file_date.wav" \
d.src_24 ! queue ! audioconvert ! wavenc ! filesink location="$filename_prefix-24-$file_date.wav" \
d.src_25 ! queue ! audioconvert ! wavenc ! filesink location="$filename_prefix-25-$file_date.wav" \
d.src_26 ! queue ! audioconvert ! wavenc ! filesink location="$filename_prefix-26-$file_date.wav" \
d.src_27 ! queue ! audioconvert ! wavenc ! filesink location="$filename_prefix-27-$file_date.wav" \
d.src_28 ! queue ! audioconvert ! wavenc ! filesink location="$filename_prefix-28-$file_date.wav" \
d.src_29 ! queue ! audioconvert ! wavenc ! filesink location="$filename_prefix-29-$file_date.wav" \
d.src_30 ! queue ! audioconvert ! wavenc ! filesink location="$filename_prefix-30-$file_date.wav" \
d.src_31 ! queue ! audioconvert ! wavenc ! filesink location="$filename_prefix-31-$file_date.wav"
# TRY WITH OGG/Vorbis gst-launch-1.0 -e shmsrc is-live=true socket-path=/tmp/qu32 ! audioparse channels=32 interleaved=true format=raw rate=48000 raw-format=s32le ! queue ! audio/x-raw,channels=32,layout=interleaved,rate=48000,format=S32LE ! audioconvert ! vorbisenc quality=1.0 ! oggmux ! filesink location=$filename_prefix-$file_date.ogg
If I start OBS with the mixer powered off (so there's no device at hw:1
, I get errors in the logs (expected)
error: Could not open audio device for recording.
error: Failed waiting on fd activity
After a while (couple of minutes?), OBS just crashes with this in the logs:
error: Could not open resource for reading.
(obs:86849): GStreamer-CRITICAL **: 15:04:15.337: gst_poll_add_fd: assertion 'set != NULL' failed
(obs:86849): GStreamer-CRITICAL **: 15:04:15.337: gst_poll_fd_ctl_read: assertion 'set != NULL' failed
(obs:86849): GStreamer-CRITICAL **: 15:04:15.337: gst_poll_wait: assertion 'set != NULL' failed
(obs:86849): GStreamer-CRITICAL **: 15:04:15.338: gst_poll_set_flushing: assertion 'set != NULL' failed
(obs:86849): GStreamer-CRITICAL **: 15:04:15.338: gst_poll_free: assertion 'set != NULL' failed
error: Failed waiting on fd activity
error: Could not open audio device for recording.
Could not create socket (24): Too many open files
error: Could not open socket.
error: GStreamer error: state change failed and some element failed to post a proper error message with the reason for the failure.
Segmentation fault (core dumped)
The duration which OBS remains "open" before crashing seems to be (anecdotally) proportional to the Error timeout (ms)
setting in the plugin
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.