Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gstreamer pipeline #107

Closed
tsuna6 opened this issue Aug 10, 2023 · 9 comments
Closed

Gstreamer pipeline #107

tsuna6 opened this issue Aug 10, 2023 · 9 comments

Comments

@tsuna6
Copy link

tsuna6 commented Aug 10, 2023

Hi, i just tried to put this string in gstreamer pipeline

gst-launch-1.0 rtspsrc location="rtsp://admin:*****@IPAddress:554" latency=10 ! rtph264depay ! h264parse ! omxh264dec ! autovideosink

i'm using hikvision camera, but it wont displayed in gstreamer.
do you have some reference gstreamer pipeline that i can try to use it ?

Thanks

@fzwoch
Copy link
Owner

fzwoch commented Aug 10, 2023

The README of the project list some RTSP examples. The used URLs may be down by now though.

One common caveat is that rtspsrc uses user-id and user-pw properties for authentication - That is because the URI itself may be important for the server to select a stream, so havem them in the URI scheme may break things.

Are you sure you have hardware that uses an OMX decoder?

@tsuna6
Copy link
Author

tsuna6 commented Aug 10, 2023

I'm just using :

  • 1 CCTV Hikvision
  • 1 PC
  • 1 Switch Hub

just a simple connection. any idea ?

@fzwoch
Copy link
Owner

fzwoch commented Aug 10, 2023

Use gst-launch-1.0 from a command line to test things. They may give some better idea what may be wrong.

But these are more setup or general GStreamer related things..

@tsuna6
Copy link
Author

tsuna6 commented Aug 10, 2023

you mean command prompt?

i text it, and the result is :

ERROR: pipeline could not be constructed: empty pipeline not allowed.

@tsuna6
Copy link
Author

tsuna6 commented Aug 10, 2023

also when i text gst-launch-1.0 --version in cmd, the result is

gst-launch-1.0 version 1.22.5
GStreamer 1.22.5
Unknown package origin

@fzwoch
Copy link
Owner

fzwoch commented Aug 11, 2023

It feels like you want to read up on GStreamer and it pipelines. Without that knowledge you will go nowhere with this plugin. You should be able to create pipelines and playback the camera with the gst-launch-1.0 tool before you adapt the pipeline for this plugin to make it work with OBS.

@fzwoch fzwoch closed this as completed Aug 11, 2023
@tsuna6
Copy link
Author

tsuna6 commented Aug 12, 2023

Hi, i try again with this code in cmd, and it works

gst-launch-1.0 rtspsrc location="rtsp://admin:*****@IPAddress:554" latency=10 ! rtph264depay ! h264parse ! decodebin ! autovideosink

but why when i try this on gstreamer OBS, it's not working ? please advice me about this.
Thanks.

@fzwoch
Copy link
Owner

fzwoch commented Aug 12, 2023

Replacing autovideosink with video. (note the dot) should do it.

@kamalmostafa
Copy link
Contributor

kamalmostafa commented Aug 13, 2023

Important note: Be sure that you are NOT including the "gst-launch-1.0" command itself in the obs-gstreamer plugin pipeline field -- that's just for command-line testing! But since you've got it working on the command line with gst-launch-1.0, it should certainly be possible to get it working within the obs-gstreamer plugin as well.

I have had great success using the obs-gstreamer plugin with my HikVision camera (including its audio feed) with the following pipeline:

rtspsrc latency=1600 location=rtsp://admin:*****@192.168.1.***/Streaming/Channels/101  name=bin
  bin. ! parsebin ! nvh264sldec ! videoconvert ! video.
  bin. ! parsebin ! decodebin ! audioconvert ! audio.

And a simpler ("video-only, no audio") version of my obs-gstreamer plugin pipeline might look like this:

rtspsrc latency=1600 location=rtsp://admin:*****@192.168.1.***/Streaming/Channels/101   ! parsebin ! nvh264sldec ! videoconvert ! video.

A similar pipeline to might work for you. (Be sure to notice the terminating "video." in both examples, just as was mentioned by @fzwoch).

Good luck!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants