[x264-devel] Debugging x264_encoder_encode function
Evgeny Yakimov
john.yakimov at gmail.com
Tue May 29 12:07:55 CEST 2012
On Tue, May 29, 2012 at 10:47 AM, Karthick Kumar <karthik1990r at gmail.com>wrote:
> 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?
>
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,
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.
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.
Evgeny
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/x264-devel/attachments/20120529/c09ec76e/attachment.html>
More information about the x264-devel
mailing list