Using gstreamer RTSP server over the internet

Thadeu Antonio Ferreira de Melo thadeu.afm at gmail.com
Wed Sep 6 16:31:06 UTC 2017


I need to stream a h264 stream from one source to another.

Using RTP and RTSP.

What else do I need to understand?

2017-09-05 16:43 GMT-03:00 Nicolas Dufresne <nicolas at ndufresne.ca>:

> Le mardi 05 septembre 2017 à 16:23 -0300, Thadeu Antonio Ferreira de
> Melo a écrit :
> > So Nikolas, the examples tells nothing how to connect the stream to
> > the input port or how to redirect to another address.
> >
> > I ran it and got this:
> > >>./test-launch "( videotestsrc ! x264enc ! rtph264pay name=pay0
> > pt=96 )"
>
> Default x264enc setting won't work so well, try adding
> tune=zerolatency, or a filter to select the H264 profile.
>
> > stream ready at rtsp://127.0.0.1:8554/test
> >
> >
> > How can I feed it with a h264 stream "
>
> That depends on where the stream comes from. Is it from file, the
> network ?
>
> > and open it with another player?
>
> It's an RTSP server, just use the provided link and open it in a any
> valid RTSP client application (like VLC, or gst-play-1.0
> rtsp://127.0.0.1:8554/test).
>
> > For now I would be satisfied with this working on the localhost. I
> > have some mp4 and mkv files on this machine for testing if it is
> > required to use gst-lauch-1.0.
>
> Of course it's not required, it's just to try and get you started. You
> seem to lack some information about GStreamer, RTSP and so on, so I'm
> trying to limit the scope until you start to get a grasp of all this
> complexity.
>
> >
> >
> > The ffmpeg comand captures the desktop, encode it with h264 and sends
> > it to the <Server IP>. This could be changed.
>
> What's of interest is what protocol ? This may also help answering the
> very first question. There is no single solution to what you want to
> do. You have to learn this techno and pick the right one for yourself.
>
> >
> >
> > 2017-09-05 15:55 GMT-03:00 Nicolas Dufresne <nicolas at ndufresne.ca>:
> > > Le mardi 05 septembre 2017 à 13:29 -0300, Thadeu Antonio Ferreira
> > > de
> > > Melo a écrit :
> > > > Sebastian had suggested me to use 1.8 since I couldn´t even
> > > compile
> > > > the main branch.
> > > >
> > > > The exemples don´t have much explanation for what they are
> > > suppose to
> > > > do. There is no in/out parameters type or what is the expected
> > > > behavior.
> > > > There is no tutorial. No step by step.
> > >
> > > This one is 88 lines, including comments and white lines, did you
> > > tried
> > > to read it at all ?
> > >
> > > https://cgit.freedesktop.org/gstreamer/gst-rtsp-server/tree/example
> > > s/te
> > > st-launch.c
> > >
> > > For the in/out parameters as you say, the API is fully documented
> > > online. For each C function, lookup this side to find the details:
> > >
> > > https://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-rtsp-
> > > serv
> > > er/html/
> > >
> > > When you build it, it works a bit like gst-launch-1.0, after all,
> > > before starting a server you probably want to use gst-launch-1.0 to
> > > figure-out the right pipeline. It's nice for quick experiment.
> > >
> > > >
> > > > We have a source that sends a h264 stream from a Windows desktop
> > > > using ffmpeg with this command
> > > >
> > > > ffmpeg -f gdigrab -i desktop -pix_fmt yuv420p -framerate 30
> > > -draw_mouse 0 -vcodec libx264 -tune zerolatency -bf 0 -preset slow
> > > -crf 25 -g 30 -an -refs 4 -x264-params vbv-maxrate=2000:vbv-
> > > bufsize=256:keyint nhttp://<Server IP>/feed1.ffm
> > >
> > > This the part I can't read, but I won't say it's totally
> > > undocumented
> > > and missing tutorials, just that I have no idea what it means
> > > really.
> > > What type of stream will this command provide ? Do you really want
> > > to
> > > interface this ?
> > > >
> > > > The ffserver redirects this the client application, that could be
> > > > Android, Windows or Web.
> > > >
> > > > We need a better server, more stable and with more community
> > > support
> > > > (ffserver has been abandoned for 4 years). We will probably
> > > change
> > > > how we capture and send de data from the Windows app, but it will
> > > be
> > > > always a h264 stream that has to be redirect to the client
> > > device.
> > > >
> > > > 2017-09-05 13:11 GMT-03:00 Nicolas Dufresne <nicolas at ndufresne.ca
> > > >:
> > > > > Le mardi 05 septembre 2017 à 12:46 -0300, Thadeu Antonio
> > > Ferreira
> > > > > de
> > > > > Melo a écrit :
> > > > > > Not a single good samaritan?
> > > > > >
> > > > > > I couldn´t find a single simple example how to run the server
> > > and
> > > > > > redirect the video stream.
> > > > > > I wouldn´t be asking if I hadn´t exhausted my options.
> > > > >
> > > > > That's the because the question isn't clear and slightly
> > > > > overloaded. I
> > > > > can comment here, but a stackoverflow reply is unlikely to be
> > > > > useful.
> > > > >
> > > > >
> > > > >     I have download and compile the gstreamer server 1.8, but
> > > the
> > > > >     examples are not very clear.
> > > > >
> > > > > Why 1.8 and not latest stable 1.12 ? Which example ? What
> > > wasn't
> > > > > clear
> > > > > for you ?
> > > > >
> > > > >
> > > > >     For the sake o simplicity I would like to have a local
> > > server
> > > > > that
> > > > >     could receive h264 data stream from ffmpeg in one port of
> > > the
> > > > > local
> > > > >     host and redirect it to another port.
> > > > >
> > > > > With or without transcoding ? Is the H264 byte-stream or AVC ?
> > > > > Another
> > > > > reason it's overloaded, I have never tested myself an Gst RTSP
> > > > > server
> > > > > that simply forward. A jitter buffer might not be needed as an
> > > > > example,
> > > > > allowing extremely low latency, but this need testing as it has
> > > not
> > > > > been done publicly before. Some server library work might be
> > > > > needed.
> > > > >
> > > > >     What is the minimal, simplest way to make that binding?
> > > > >
> > > > > This depends on all the above. The examples in the "example"
> > > folder
> > > > > of
> > > > > the library code are extremely simple, it's hard to answer your
> > > > > question if we don't understand why these example are "not
> > > clear"
> > > > > to
> > > > > you.
> > > > >
> > > > > regards,
> > > > > Nicolas
> > > > >
> > > > > >
> > > > > > 2017-09-04 12:00 GMT-03:00 Thadeu Antonio Ferreira de Melo
> > > > > <thadeu.af
> > > > > > m at gmail.com>:
> > > > > > > Hello.
> > > > > > >
> > > > > > > I posted this question on SO.
> > > > > > >
> > > > > > > https://stackoverflow.com/questions/46006419/using-gstreame
> > > r-se
> > > > > rver
> > > > > > > -to-redirect-a-h264-source-to-diferent-clients
> > > > > > >
> > > > > > > We are trying to achieve low latency for real time
> > > interaction.
> > > > > > >
> > > > > > > Can anyone help with some guide to build a simple solution?
> > > > > >
> > > > > > _______________________________________________
> > > > > > gstreamer-devel mailing list
> > > > > > gstreamer-devel at lists.freedesktop.org
> > > > > > https://lists.freedesktop.org/mailman/listinfo/gstreamer-deve
> > > l
> > > > > _______________________________________________
> > > > > gstreamer-devel mailing list
> > > > > gstreamer-devel at lists.freedesktop.org
> > > > > https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
> > > > >
> > > >
> > > > _______________________________________________
> > > > gstreamer-devel mailing list
> > > > gstreamer-devel at lists.freedesktop.org
> > > > https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
> > >
> > > _______________________________________________
> > > gstreamer-devel mailing list
> > > gstreamer-devel at lists.freedesktop.org
> > > https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
> > >
> >
> > _______________________________________________
> > gstreamer-devel mailing list
> > gstreamer-devel at lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20170906/ae81d0c4/attachment-0001.html>


More information about the gstreamer-devel mailing list