<div dir="ltr"><div><div><div>Thanks a lot Tim. <br>That was the exact problem. With increase in audio queue size, the pipeline started working.<br></div><br></div>Here is the new pipeline.<br>gst-launch-1.0  filesrc location=AMGBVE2015BUM000001AR.ts ! tsdemux name=d  ! queue max-size-time=2000000000 ! aacparse ! avdec_aac ! audioconvert ! voaacenc  ! queue ! mux. d. ! queue ! h264parse ! avdec_h264 ! x264enc ! queue ! mux. mpegtsmux name=mux  ! filesink location=out.mpeg<br><br></div><div>Regards,<br></div><div>Sujata<br></div><br><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Nov 13, 2015 at 2:25 PM, Tim Müller <span dir="ltr"><<a href="mailto:tim@centricular.com" target="_blank">tim@centricular.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Fri, 2015-11-13 at 10:12 +0530, Sujata Gaddemane wrote:<br>
<br>
Hi,<br>
<span class=""><br>
> I am using following pipeline to decode audio and video of the stream<br>
> from file and encode them and then finally mux both audio and video<br>
> using mpegtsmux.<br>
> The resultant muxed file is way smaller than the original file and<br>
> the pipeline just hangs.  Can anyone help me to solve this issue? Any<br>
> pointers to how to debug this issue will be of great help.<br>
><br>
> gst-launch-1.0 filesrc location=B4USO129606056.ts ! tsdemux name=d  !<br>
> queue ! h264parse ! avdec_h264  ! videoconvert ! x264enc ! queue !<br>
> mux. d. ! queue ! aacparse ! avdec_aac ! audioconvert ! voaacenc !<br>
> queue ! mux. mpegtsmux name=mux ! filesink location=out.ts<br>
<br>
</span>The problem here is probably that there isn't enough buffering in the<br>
audio branch.<br>
<br>
x264enc by default consumes up to 2-3 seconds of buffers before it<br>
outputs a first encoded buffer. tsmux needs a buffer from both the<br>
audio and the video branch before it can output anything, but once the<br>
audio queues run full tsdemux will be stuck and can't push more buffers<br>
into the video branch and then everything hangs. queue by default<br>
provides 1 second of buffering, so there's 2 seconds of buffering in<br>
the audio branch. You can check if this is the problem by setting<br>
x264enc tune=zerolatency. If so, just set the audio queue to unlimited,<br>
like queue max-size-bytes=0 max-size-time=0 max-size-buffers=0.<br>
<br>
It would also hang if the input file didn't contain any AAC audio or<br>
H264 video but data in some different format.<br>
<br>
Cheers<br>
<span class="HOEnZb"><font color="#888888"> -Tim<br>
<br>
--<br>
Tim Müller, Centricular Ltd - <a href="http://www.centricular.com" rel="noreferrer" target="_blank">http://www.centricular.com</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" rel="noreferrer" target="_blank">http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a><br>
</font></span></blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature"><div dir="ltr"><div><br>Regards,<br></div>Sujata<br></div></div>
</div></div>