<html><head></head><body><div>On Thu, 2016-06-09 at 11:23 +0100, Charlie Turner wrote:</div><div><br></div><div>Hi Charlie,</div><blockquote type="cite"><div dir="ltr"><div><br></div><div>If I run a time "tee'd" pipeline like this,</div><div><br></div><div><div> gst-launch-1.0 -e v4l2src device=/dev/video0 ! tee name=t \</div><div> t. ! queue ! x264enc ! filesink location=fakesink_test.raw \</div><div> t. ! queue ! fakesink</div><div><br></div><div>I see the following output in my terminal,</div><div> (snip)</div></div><div>And when I look at the "fakesink_test.raw" file, I see that it's zero bytes. Something appears to be getting blocked in the above minimal example.</div><div><br></div><div>If I remove the x264enc element, the pipeline works as I expect it to, producing a suitably large file,</div><div></div></div><pre>
</pre></blockquote><div><br></div><div>The problem is that x264enc with default settings consumes about 3 seconds of video before outputting anything, but queue's default size is only ~1 second. Which means the fakesink branch queue will run full and block, and the x264enc branch will never receive enough data for x264enc to output a buffer (and make the pipeline as a whole preroll).</div><div><br></div><div>You can work around this by making the queue before fakesink unlimited in size:</div><div><br></div><div> ! queue max-size-bytes=0 max-size-time=0 max-size-buffers=0 ! fakesink</div><div><br></div><div>or by configuring x264enc differently, e.g.</div><div><br></div><div> x264enc tune=zerocopy</div><div><br></div><div>(other parameters will also help, this is just the easiest, but it will affect quality)</div><div><br></div><div>Cheers</div><div> -Tim</div><div><br></div><div><span><pre><pre>--
</pre>Tim Müller, Centricular Ltd - http://www.centricular.com
</pre></span></div></body></html>