obs-gstreamer

obs-gstreamer 0.4.0

Tuna

Member
Hello, I'm using the gstreamer plugin as both a source and as an encoder using the OpenMAX(Tegra). Could anyone explain what the extra encoder options are? I'm wordering if its possible to change between h264 and h265 for the future.
H.265 is not handled as I don't know any ingestion points that support it. I never even considered looking at that yet.

The extra options are parameters that your encoder element may support. Try "gst-inspect-1.0 omxh264enc" or so (depending on the exact name, don't quote me on that). And it lists available options. You can add key=value pairs separated by spaces there.
 

gmesmer

New Member
H.265 is not handled as I don't know any ingestion points that support it. I never even considered looking at that yet.

The extra options are parameters that your encoder element may support. Try "gst-inspect-1.0 omxh264enc" or so (depending on the exact name, don't quote me on that). And it lists available options. You can add key=value pairs separated by spaces there.

Thanks for the reply, I was thinking the extra options had to do with the plugin and not the encoder being used by the plugin (which you confirmed is the omxh264enc at least for OpenMAX (Tegra)). Not sure exactly what you mean by ingestion points. omxh265enc omxvp8enc and omxvp9enc were what I was referring to as possible other OpenMAX encoders.
 

Tuna

Member
With ingestions points i mean streaming services. H.265 will work for recording only. I think the interface for encoding only supports H.264 in OBS now (not sure as of writing). If you want to something else I believe the only option is to use the custom FFMPEG output of OBS.
 

gmesmer

New Member
With ingestions points i mean streaming services. H.265 will work for recording only. I think the interface for encoding only supports H.264 in OBS now (not sure as of writing). If you want to something else I believe the only option is to use the custom FFMPEG output of OBS.
That is correct, OBS doesn't support sending h265, vp9, etc to streaming services. So no way to implement a different gstreamer encoding menu for recordings which allows for h.265?
 

dreamer

New Member
I just compiled this plugin against latest obs-studio master `478f1de8468223524f92aafd194675c89947c544` and honestly I don't know how it's supposed to work.

Should there be a new input-type to choose as a source? because I don't see it
 

dreamer

New Member
Should there be a new input-type to choose as a source? because I don't see it
Sorry, it's been a while. I don't see the plugin being loaded at all. It was installed to `/usr/local/lib/x86_64-linux-gnu/obs-plugins`
Will investigate what's up with obs not finding it.
 

Tuna

Member
Sorry, it's been a while. I don't see the plugin being loaded at all. It was installed to `/usr/local/lib/x86_64-linux-gnu/obs-plugins`
Will investigate what's up with obs not finding it.

The GStreamer DLLs need to be found (assuming Windows which you didn't state). Usually this is done by adding the GStreamer bin path to the Windows PATH variable.

EDIT: Oh its Linux judging from the path. That path seems okay if you have installed/compiled OBS from source. May be different if you have PPA or some other install source.
 

dreamer

New Member
EDIT: Oh its Linux judging from the path. That path seems okay if you have installed/compiled OBS from source. May be different if you have PPA or some other install source.
Yeah sorry for not explicitly stating :)

I ended up manually making a `~/.config/obs-studio/plugins/obs-gstreamer/bin/64bit/` and putting `obs-gstreamer.so` in there and then it did work! Wich is a bit odd I guess.

Now to get the rtsp example to work, seems my rtsp cam does not want to be opened this way.
 

thejamo

New Member
Hi Tuna!

I have been reading gstreamer stuff for a few weeks now and while I have managed to get it working in a few configurations, there are some things I simply cannot work out... or rather I haven't worked out yet and I'm not sure if it's because I don't understand something and am continuously doing something wrong.

The good news is that I am able to get good quality video from an RPi camera across ethernet and into OBS on Windows without a problem using the following pipelines:

On RPi
raspivid -t 0 -w 800 -h 480 -fps 30 -b 10000000 -o udp://<IP>:5000

On OBS (Windows 10)
udpsrc port=5000 ! h264parse ! avdec_h264 ! video.

In fact these are pipelines that another use posted earlier in this thread, and they work well, with minimal latency. The problem is when I try to increase the resolution to anything greater than 800x480. When I do, the frames arriving in OBS are corrupted, though not always the whole frame; it's mostly just the bottom half of the frame.

I have gathered that a possible solution is to include 'rtpjitterbuffer' in the OBS pipeline to sort out packet order, but try as I might I cannot make it work.

Is it possible to make this work with the above pipelines? If so, can you shed some light on how? Or would it be better to send the video using gstreamer on the RPi side as well? Please let me know, and if I'm ever in your neck of the woods, I'll buy you a beer! Thank you!
 

Tuna

Member
UDP transfer by design is subject to packet loss. You either analyze it thoroughly and tune it to your use case or switch to a TCP based protocol. I believe someone did it with pi before. Either in this thread or in some closed issue on github.

 
Last edited:
Hello,

I managed to get gstreamer source set up for obs on win10k . So far much more stable and less CPU intensive than connecting an rtsp camera to obs via VLC source. Also latency is smaller, 300ms compared to 800ms compared to Vlc source,

A few issues i notice :

1. After a power off and on of the camera, picture freezes and stays frozen. Whatever settings i try for restart or Error. Changing And saving any setting in gstreamer source gets iT going again.
2. Adding 5 ip rtsp camera’s works great. No 6th camera is accepted though. Not via rtspsrc nor via uridecodebin.
It seems no limitation to obs, as i can add a 6th camera via vlc source.

You have any advice?
 

Tuna

Member
1. I guess there was a fix in my code that was not released yet. So you may want to try to build master by yourself, or wait as I may make another release soon (no schedule though) as v26 was recently released.

2. I cannot tell. There should not be a technical limitation to my knowledge to prevent this. Probably would require some debugging whats happening in this particular case.
 
hello,
1. i will await your release before upgrading.
2. ok. not big problem for now but i will do some extra testing.

thanks for now, my setup with cheap ip cameras is very stable and low latency now. Als processor load dropped considerably.

thanks!!
 

Yiays

New Member
I've tried on multiple devices, but I've been unable to get the source to show up in OBS, this is with a complete install of gstreamer to the root of the C: drive and the path to bin added in %path%. (And the plugin is in the x64 plugins folder, of course)

1604042332769.png
 

Tuna

Member
Assuming you are trying to use the prebuilt binary, I think you need to install the MINGW version of the GStreamer runtime. MSVC and MINGW differ in their file names as MINGW ones are prefixed with "lib" while MSVC aren't. So I suspect the plugin now looks for DLL file names that are not present. If you want to use the MSVC version you will have to build the plugin yourself.
 

Elijahkato

New Member
Hello Tuna,

I have read about the success stories when using the gstreamer for rtsp streaming in OBS. I have followed all the steps below;

- Download and installed gstreamer-1.0-mingw-x86_64-1.18.0.msi - I noticed it didnt install in the C: drive instead it went to my E: drive.
- I followed one of the instructions on adding environment variables both for system and user. - see screenshot
- I copied the obs-gstreamer.dll file downloaded from github to my obs-plugin folder x64
- I currently use OBS version 26.0.2.

Please, I need to know if I am missing any step.. I am new to this kind of life saving stuff.. Please help.

Capture.PNG
 

Elijahkato

New Member
Hello Tuna,

I have read about the success stories when using the gstreamer for rtsp streaming in OBS. I have followed all the steps below;

- Download and installed gstreamer-1.0-mingw-x86_64-1.18.0.msi - I noticed it didnt install in the C: drive instead it went to my E: drive.
- I followed one of the instructions on adding environment variables both for system and user. - see screenshot
- I copied the obs-gstreamer.dll file downloaded from github to my obs-plugin folder x64
- I currently use OBS version 26.0.2.

Please, I need to know if I am missing any step.. I am new to this kind of life saving stuff.. Please help.

View attachment 62734
Its funny i am answering myself, after much trial and error...

I copied all the dll files that starts with the lib- prefix from the bin folder of the mingw installation and pasted it in the OBS plugin folder.. this worked as i am able to see the gstream source in OBS.


But i cant seem to know the particular dependency files that is working currently. Maybe i will just keep with the trial and error.. but if you have a heads up for me, please share and i would also like to know if there is a particular format for entering the rtsp URL. the url for my PTZ cam is rtsp://admin:@192.168.1.110/1/h264major.. i am yet to try this out as the camera is installed in church.

Thank you
 

Tuna

Member
Instead of copying incomplete things into that folder you should add the GStreamer bin directory to your PATH variable. See actually two posts above yours.
 

STEPHANVS

Member
Just came here to thank you for this amazing plugin. Now we are able to show live (~60-140ms latency instead of 1140ms) video feed on a projector. No latency video has some occasional jitter to it, but adding 1-2 frame buffer looks very promising! Thanks again!
 

Yeahish

New Member
Hi,

Is there a way to identify which Capabilities the (video) sink accepts? (Like running gst-inspect-1.0 video)

I'm trying to use the plugin to grab a rtsp stream with low latency, but for some reason whatever pipeline I try (for example rtspsrc) other then the provided sample doesn't work. If I would be able to see the accepted capabilities I can try to find a converter.

Sample command that doesn't work
rtspsrc location="rtsp://user:pass@192.168.1.64:554/Streaming/Channels/101?transportmode=unicast&profile=Profile_1" ! autovideoconvert ! video.
 
Last edited:
Top