<div class="gmail_quote">On Tue, May 29, 2012 at 10:47 AM, Karthick Kumar <span dir="ltr"><<a href="mailto:karthik1990r@gmail.com" target="_blank">karthik1990r@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I'm using x264 to encode in a live streaming application. But I'm facing an issue in x264_encoder_encode function. When the streaming starts, the frame sizes of the first 25(around 10-30) frames after passing through this function, are 0 and number of nals  are also 0. Because of this issue, I'm facing synchronization problem between server and client in my application. Right now, i'm using x264 version 124. This issue is not there when I'm using x264 version 115(the old one which was used earlier). Can any one help me to solve this? <br>
</blockquote><div><br></div><div>The default x264 profiles tend to take about 30 in frames before they start producing out packets, (this is for several reasons such as look ahead, thread count), this latency delay often results in a major quality increase and better rate control,</div>
<div>You should still be able to use the pic_out pts/dts values to synchronise your frames, if you're using libav just use av_interleaved_write_frame to synchronise audio/video frames.</div><div><br></div><div>Optionally you can force a zerolatency encode by setting the tune to "zerolatency", and either using a b_slicedthreads or threads = 1, these settings should give you an out frame on the first in frame.</div>
<div><br></div><div>Evgeny</div></div>