Hello.
I posted this question on SO. 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 [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
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. 2017-09-04 12:00 GMT-03:00 Thadeu Antonio Ferreira de Melo <[hidden email]>:
_______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
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 > [hidden email]>: > > Hello. > > > > I posted this question on SO. > > > > https://stackoverflow.com/questions/46006419/using-gstreamer-server > > -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 > [hidden email] > https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel signature.asc (201 bytes) Download Attachment |
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. 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=600 http://<Server IP>/feed1.ffm 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 <[hidden email]>: Le mardi 05 septembre 2017 à 12:46 -0300, Thadeu Antonio Ferreira de _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
To make things even more clear. We would like to do something basicaly identical to this solution The thing is that their steps don´t work for what I have tried to replicate. 2017-09-05 13:29 GMT-03:00 Thadeu Antonio Ferreira de Melo <[hidden email]>:
_______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
This question is also related to our issue. 2017-09-05 15:02 GMT-03:00 Thadeu Antonio Ferreira de Melo <[hidden email]>:
_______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
In reply to this post by Thadeu Antonio Ferreira de Melo
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/examples/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 <[hidden email]>: > > 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 > > > [hidden email]>: > > > > Hello. > > > > > > > > I posted this question on SO. > > > > > > > > https://stackoverflow.com/questions/46006419/using-gstreamer-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 > > > [hidden email] > > > https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel > > _______________________________________________ > > gstreamer-devel mailing list > > [hidden email] > > https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel > > > > _______________________________________________ > gstreamer-devel mailing list > [hidden email] > https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel signature.asc (201 bytes) Download Attachment |
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 )" stream ready at rtsp://127.0.0.1:8554/test How can I feed it with a h264 stream and open it with another player? 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. The ffmpeg comand captures the desktop, encode it with h264 and sends it to the <Server IP>. This could be changed. 2017-09-05 15:55 GMT-03:00 Nicolas Dufresne <[hidden email]>: Le mardi 05 septembre 2017 à 13:29 -0300, Thadeu Antonio Ferreira de _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
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 <[hidden email]>: > > 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 <[hidden email] > > >: > > > > 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 > > > > > [hidden email]>: > > > > > > 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 > > > > > [hidden email] > > > > > https://lists.freedesktop.org/mailman/listinfo/gstreamer-deve > > l > > > > _______________________________________________ > > > > gstreamer-devel mailing list > > > > [hidden email] > > > > https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel > > > > > > > > > > _______________________________________________ > > > gstreamer-devel mailing list > > > [hidden email] > > > https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel > > > > _______________________________________________ > > gstreamer-devel mailing list > > [hidden email] > > https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel > > > > _______________________________________________ > gstreamer-devel mailing list > [hidden email] > https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel signature.asc (201 bytes) Download Attachment |
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 <[hidden email]>: Le mardi 05 septembre 2017 à 16:23 -0300, Thadeu Antonio Ferreira de _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
I think I finally understood some of the philosophy of gst.
The videotestsrc has worked. Now would be nice if the source is the desktop I capture with ffmpeg - and is already encoded to h264. Sorry for my previous rant. _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
I´m now testing with the SDP sample. I run my ffmpeg source that generates this SDP file: --------------------------------------------------- v=0 o=- 0 0 IN IP4 127.0.0.1 s=No Name c=IN IP4 127.0.0.1 t=0 0 a=tool:libavformat 56.40.101 m=video 5004 RTP/AVP 96 a=rtpmap:96 H264/90000 a=fmtp:96 packetization-mode=1 ---------------------------------------------------- I set the file for the example and run it. However when I hit play the server displays: (lt-test-sdp:9989): GStreamer-CRITICAL **: gst_object_unref: assertion 'object != NULL' failed ** (lt-test-sdp:9989): CRITICAL **: gst_rtsp_stream_join_bin: assertion 'GST_IS_RTSP_STREAM (stream)' failed ** (lt-test-sdp:9989): CRITICAL **: gst_rtsp_media_create_stream: assertion 'GST_IS_ELEMENT (payloader)' failed And the player returns this message ------------------------------------------------------------------------------------------------------------------------- [rtsp @ 0x7ff4cc009260] method PLAY failed: 454 Session Not Found rtsp://127.0.0.1:8554/test: Server returned 4XX Client Error, but not one of 40{0,1,3,4} ------------------------------------------------------------------------------------------------------------------------- I belive there are more configurations I have to make so the server can understand this is a live stream. 2017-09-06 13:46 GMT-03:00 Thadeu Antonio Ferreira de Melo <[hidden email]>:
_______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Le mercredi 06 septembre 2017 à 14:53 -0300, Thadeu Antonio Ferreira de
Melo a écrit : > I´m now testing with the SDP sample. > > I run my ffmpeg source that generates this SDP file: > --------------------------------------------------- > v=0 > o=- 0 0 IN IP4 127.0.0.1 > s=No Name > c=IN IP4 127.0.0.1 > t=0 0 > a=tool:libavformat 56.40.101 > m=video 5004 RTP/AVP 96 > a=rtpmap:96 H264/90000 > a=fmtp:96 packetization-mode=1 > ---------------------------------------------------- go and create an RTSP relay out of that, can you make sure you can receive, decode, play this RTP stream in the first place ? gst-launch-1.0 filesrc location=my.sdp ! sdpdemux ! decodebin ! autovideosink Then the relay pipeline should be fairly similar. Something like may work: "filesrc location=my.sdp ! sdpdemux ! identity name=pay0" Nicolas > > I set the file for the example and run it. However when I hit play > the server displays: > > (lt-test-sdp:9989): GStreamer-CRITICAL **: gst_object_unref: > assertion 'object != NULL' failed > > ** (lt-test-sdp:9989): CRITICAL **: gst_rtsp_stream_join_bin: > assertion 'GST_IS_RTSP_STREAM (stream)' failed > > ** (lt-test-sdp:9989): CRITICAL **: gst_rtsp_media_create_stream: > assertion 'GST_IS_ELEMENT (payloader)' failed Though, we'd need to see you code to figure-out what happened. It seems to start from a GstObject being NULL. > > And the player returns this message > > ------------------------------------------------------------------- > ------------------------------------------------------ > [rtsp @ 0x7ff4cc009260] method PLAY failed: 454 Session Not Found > rtsp://127.0.0.1:8554/test: Server returned 4XX Client Error, but not > one of 40{0,1,3,4} > ------------------------------------------------------------------- > ------------------------------------------------------ > > I belive there are more configurations I have to make so the server > can understand this is a live stream. > > > 2017-09-06 13:46 GMT-03:00 Thadeu Antonio Ferreira de Melo <thadeu.af > [hidden email]>: > > I think I finally understood some of the philosophy of gst. > > > > The videotestsrc has worked. > > > > Now would be nice if the source is the desktop I capture with > > ffmpeg - and is already encoded to h264. > > > > Sorry for my previous rant. > > _______________________________________________ > gstreamer-devel mailing list > [hidden email] > https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel signature.asc (201 bytes) Download Attachment |
Great Nicolas.
It has worked. That is finally a v0 for us here. I also made changes to test-sdp.c so it also worked the same way. We now have to extend some of the tests to be more reliable and make the server able to restart transmission or change de IP or ports on the fly. The need for the SDP file is still a problem, thought. I don´t know how to the file should be "negotiated" when the both ends of the server are point to IPs over the internet. _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Hello again. I´m trying to use a UDPSRC for the source of my stream server. the call is ./test-launch "udpsrc uri="udp://<MACHINE IP6>:8090" ! sdpdemux ! identity name=pay0" I can see the video stream hitting the machine (using nload), however there is no output stream. I changed test-launch.c so the output stream should go to rtsp://<MACHINE IP6>:5554/test with gst_rtsp_server_set_address(server, addr); should I add something else to the server pipeline? 2017-09-07 16:03 GMT-03:00 Thadeu Antonio Ferreira de Melo <[hidden email]>:
_______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Free forum by Nabble | Edit this page |