<div dir="ltr"><div><div><div><div>Hi Monyz.<br><br></div>In general you need to set the 'is-live' parameter to 'true' for videotestsrc. Otherwise your pipeline will generate as many frames per second as your hardware supports and that is probably not what you want. The reason your first example with autovideosink is that the videosink will limit how many frames per second you can display and that will ripple back from the videosink to the videotestsrc. Lack of CPU capacity might also slow down the number of frames.<br><br></div>Now to streaming using tcpserversink. You can in general not stream a raw encoded video stream. You need to place the raw stream into a media container. A media container could be RTP, TS, AVI, MP4, Matroska and many more.<br><br></div>Something similar to this will work<br><br>  <span><span>gst-launch-1.0 -v videotestsrc is-live=true ! video/x-raw,width=640,width=480,framerate=30/1 ! queue ! videoconvert ! x264enc tune=zero-latency ! h264parse ! queue ! matroskamux ! queue leaky=2 ! tcpserversink port=7001 host=0.0.0.0 recover-policy=keyframe sync-method=latest-keyframe<br><br></span></span></div><div><span><span>Technically you can eliminate the video caps, if you only want the default values. You can also eliminate one of the queues, but I placed it there for a reason. You can also eliminate videoconvert, but like the extra queue, I placed it there for a reason. The leaky queue is actually also intentionally. In most cases you won't need it, but in some cases with an extended pipeline, you need it to avoid everything locking up in case your client is slow at picking up data. Complicated. Just add it.<br></span></span></div><div><span><span><br></span></span></div><div><span><span>The client is simple.<br><br></span></span></div><span><span>  gst-launch -v tcpclientsrc host=a.b.c.d port=7001 ! decodebin ! autovideosink<br></span></span><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jun 2, 2016 at 10:22 PM, Monyz Wacon <span dir="ltr"><<a href="mailto:monyz.ww@gmail.com" target="_blank">monyz.ww@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div><div><div><div><span><span>Hello,<br></span></span></div><span><span>I'm trying to stream h264 using tcrpserversink and tcpclientsrc.<br><br></span></span></div><span><span>Using this example I'm able to see a test stream:<br><br>gst-launch-1.0 videotestsrc ! x264enc ! video/x-h264,format=bytestream ! typefind ! h264parse ! avdec_h264 ! autovideosink<br><br></span></span></div><span><span>However these commands don't work as expected:<br><br>gst-launch-1.0 videotestsrc ! x264enc ! tcpserversink port=7001<br><br>gst-launch-1.0 tcpclientsrc port=7001 ! video/x-h264,format=bytestream ! typefind ! h264parse ! avdec_h264 ! autovideosink<br><br></span></span></div><span><span>No video is shown. The client stops at Prerolling and when I close the server, there is a message on the client's side:<br><br>ERROR: from element /GstPipeline:pipeline0/GstH264Parse:h264parse0: No valid frames found before end of stream<br><br></span></span></div><span><span>How to make this tcpserversink example work?<br><br></span></span></div><span><span>Best regards<br></span></span></div>
<br>_______________________________________________<br>
gstreamer-devel mailing list<br>
<a href="mailto:gstreamer-devel@lists.freedesktop.org" target="_blank">gstreamer-devel@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" rel="noreferrer" target="_blank">https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a><br>
<br></blockquote></div><br></div></div>