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