<div dir="ltr"><div><div><div>Hi Tim-Philipp<br><br></div>Thanks for answering. So TS-muxing is broken until fixed one day. For the other things, channels and mpegversion I'll open another thread with more explanation and examples.<br>
<br></div><div>Now TS is broken, can you recommend another transport format instead that works well with GStreamer and tcpserversink? I have tried with mp4mux and qtmux for a MP4 transport format, but the producing stream reports the following:<br>
<br>  mp4muxer: Downstream is not seekable and headers can't be rewritten<br><br></div><div>I tried adding streamable=true, but that is reported to be deprecated and it does not make a difference. The pipeline used is this:<br>
<br>gst-launch-1.0 -v videotestsrc do-timestamp=true is-live=true ! x264enc bitrate=500 ! h264parse ! 'video/x-h264, alignment=au, stream-format=avc, profile=(string)main' ! queue ! mp4muxer. audiotestsrc ! 'audio/x-raw, format=(string)S16LE, layout=(string)interleaved, rate=(int)44100, channels=(int)2' ! faac ! aacparse ! 'audio/mpeg,mpegversion=4, stream-format=raw' ! queue ! mp4mux name=mp4muxer streamable=true ! tcpserversink host=0.0.0.0 port=5012 sync-method=2<br>
</div><div><br></div>For the NAL, yes that was a slip by me. Thanks.<br><br></div>Best regards<br><div><div><div><div><div><div class="gmail_extra"><br></div><div class="gmail_extra">Peter MM<br><br></div><div class="gmail_extra">
<div class="gmail_quote">On Wed, Sep 25, 2013 at 9:42 PM, Tim-Philipp Müller <span dir="ltr"><<a href="mailto:t.i.m@zen.co.uk" target="_blank">t.i.m@zen.co.uk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
On Wed, 2013-09-25 at 20:24 +0200, Peter Maersk-Moller wrote:<br>
<br>
Hi Peter,<br>
<br>
alignment=nal doesn't exist for audio/mpeg.<br>
<br>
I didn't read your post in detail, but I think we have talked about all<br>
this before, and the root cause of your problems is still the same as<br>
last time, which you filed a bug for, namely that tsmux doesn't mark<br>
buffers with keyframes and delta units properly, which makes<br>
tcpserversink's "burst" functionality not work.<br>
<br>
Cheers<br>
 -Tim<br>
<div><div class="h5"><br>
> Trying test a TS stream with GStreamer-1.2 to see what is working and<br>
> what is not working. To do the test I am using the following producing<br>
> pipeline:<br>
><br>
>   $ gst-launch-1.0 -v videotestsrc do-timestamp=true is-live=true !<br>
> x264enc bitrate=500 ! h264parse ! 'video/x-h264, alignment=au,<br>
> stream-format=byte-stream, profile=(string)main' ! queue ! tsmuxer.<br>
> audiotestsrc ! faac ! aacparse ! 'audio/mpeg,mpegversion=4,<br>
> stream-format=adts, alignment=nal' ! queue ! mpegtsmux name=tsmuxer !<br>
> tsparse ! tcpserversink host=0.0.0.0 port=5012 sync-method=2<br>
><br>
><br>
> It should be noted, that the pipeline reports the following problem,<br>
> but otherwise seem to be happy:<br>
><br>
> WARNING: from<br>
> element /GstPipeline:pipeline0/GstTCPServerSink:tcpserversink0:<br>
> Internal data flow problem.<br>
> Additional debug info:<br>
> gstbasesink.c(3264): gst_base_sink_chain_unlocked<br>
> (): /GstPipeline:pipeline0/GstTCPServerSink:tcpserversink0:<br>
> Received buffer without a new-segment. Assuming timestamps start from<br>
> 0.<br>
><br>
><br>
><br>
><br>
> 1) First test is to see if we can play the stream and to see if it<br>
> starts 'quickly' in a loose definition. The pipeline used is this:<br>
><br>
>   $ gst-launch-1.0 -v tcpclientsrc host=192.168.1.2 port=5012 !<br>
> queue ! identity silent=true ! decodebin name=decoder ! autoaudiosink<br>
> decoder. ! autovideosink<br>
><br>
><br>
> A couple of experiments reveals that audio starts playing after 2-4<br>
> seconds, while video starts playing after 3-7 seconds. Notably, the<br>
> video is first shown with a frozen image, that will then starts moving<br>
> after a couple of seconds. The numbers are somwhat slower (1-3 secs)<br>
> compared to a similar stream produced with gstreamer-0.10 and I wonder<br>
> if the tcpserversink really starts with keyframes as instructed. So I<br>
> guess this bug also applies for version 1.2<br>
><br>
> <a href="https://bugzilla.gnome.org/show_bug.cgi?id=706872" target="_blank">https://bugzilla.gnome.org/show_bug.cgi?id=706872</a><br>
><br>
><br>
> 2) Second experiment. Trying to play just the video and just the<br>
> audio. Here I use the following receiver pipelines:<br>
><br>
>   $ gst-launch-1.0 -v tcpclientsrc host=192.168.1.2 port=5012 !<br>
> queue ! decodebin name=decoder ! autovideosink<br>
><br>
>   $ gst-launch-1.0 -v tcpclientsrc host=192.168.1.2 port=5012 !<br>
> queue ! decodebin name=decoder ! autoaudiosink<br>
><br>
> Here I observe it takes pretty much 15-17 seconds before the video is<br>
> played. I wonder why. And it takes between 5-12 seconds before the<br>
> audio is heard. Anybody got a hint?<br>
><br>
> 3) Third experiment. Trying to decode myself NOT using decodebin. Here<br>
> I use the following receiver pipeline:<br>
><br>
>   $gst-launch-1.0 -v tcpclientsrc host=192.168.1.2 port=5012 ! queue !<br>
> tsdemux name=demux ! 'video/x-h264' ! queue ! h264parse ! avdec_h264 !<br>
> xvimagesink<br>
><br>
>   $ gst-launch-1.0 -v tcpclientsrc host=192.168.1.2 port=5012 !<br>
> queue ! tsdemux name=demux ! 'audio/mpeg' ! queue ! aacparse ! faad !<br>
> audioconvert ! queue ! alsasink<br>
><br>
><br>
> The video plays, but as with decodebin, it takes about 15 seconds<br>
> before video is displayed AND played.<br>
><br>
><br>
> Audio on the other hand can be heard within a second or so, but with a<br>
> lot of static (noise/interruptions) which was not expected. Inspection<br>
> reveals the initial pipeline producer encode and mux a single channel<br>
> audio while the receiver side think it is 2 channels. I'm close to<br>
> think this is a bug, but would like to get confirmation on this.<br>
><br>
><br>
> Now to change the sender into 2 channel audio, I now uses this<br>
> pipeline:<br>
><br>
>   $ gst-launch-1.0 -v videotestsrc do-timestamp=true is-live=true !<br>
> x264enc bitrate=500 ! h264parse ! 'video/x-h264, alignment=au,<br>
> stream-format=byte-stream, profile=(string)main' ! queue ! tsmuxer.<br>
> audiotestsrc ! 'audio/x-raw, format=(string)S16LE,<br>
> layout=(string)interleaved, rate=(int)44100, channels=(int)2' ! faac !<br>
> aacparse ! 'audio/mpeg,mpegversion=4, stream-format=adts,<br>
> alignment=nal' ! queue ! mpegtsmux name=tsmuxer ! tsparse !<br>
> tcpserversink host=0.0.0.0 port=5012 sync-method=2<br>
><br>
><br>
> Nevertheless, that does not change anything on the receiver side,<br>
> still the A-tone (440Hz) with a lot of static blended in. Can others<br>
> confirm this?<br>
><br>
><br>
> Rechecking the first experiment with decodebin that worked, it also<br>
> reports 2 channels for audio despite only a single channel audio is<br>
> produced. Something is not quite right here although it work. Both<br>
> sender and receiver can't be right. Either we have 1 or 2 channel<br>
> audio ???<br>
><br>
><br>
> Anyway, sender is now producing 2 channel audio, at least it says so.<br>
><br>
><br>
> Another thing to consider is that the producer end produces audio<br>
> mpegversion=4 while the consumer ends reports audio mpegversion=2.<br>
> Strange.<br>
><br>
><br>
><br>
> Now lets try to combine the working audio and working video decoding<br>
> and playing using the following pipeline:<br>
><br>
>   $ gst-launch-1.0 -v tcpclientsrc host=192.168.1.2 port=5012 !<br>
> queue ! tsdemux name=demux ! 'video/x-h264' ! queue ! h264parse !<br>
> avdec_h264 ! xvimagesink demux. ! 'audio/mpeg' ! queue ! aacparse !<br>
> faad ! alsasink<br>
><br>
><br>
> However that pipeline enters PREROLL'ing, but never reaches PLAYING.<br>
> Why is that and what can be done to make it playing ?<br>
><br>
><br>
> I have a few more tests that fails, but lets keep it to this for the<br>
> now.<br>
><br>
><br>
> Comments are welcome ?<br>
><br>
><br>
> Best regards<br>
><br>
> Peter Maersk-Moller<br>
><br>
><br>
><br>
><br>
><br>
><br>
><br>
><br>
><br>
><br>
><br>
><br>
><br>
><br>
</div></div>> _______________________________________________<br>
> gstreamer-devel mailing list<br>
> <a href="mailto:gstreamer-devel@lists.freedesktop.org">gstreamer-devel@lists.freedesktop.org</a><br>
> <a href="http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" target="_blank">http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a><br>
<br>
<br>
_______________________________________________<br>
gstreamer-devel mailing list<br>
<a href="mailto:gstreamer-devel@lists.freedesktop.org">gstreamer-devel@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" target="_blank">http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a><br>
</blockquote></div><br></div></div></div></div></div></div></div>