[Libav-user] Recommended settings for low latency x264 via RTP
Info || Non-Lethal Applications
info at non-lethal-applications.com
Wed Apr 8 15:51:43 CEST 2015
We’re trying to send an x264 encoded RTP stream to an iOS device.
While it works in general, we aren’t sure if we have the best settings to achieve our goal.
We read on a blog from an x264 developer that it should be possible to achieve a latency of x264 encoded RTP streams of around 10 ms from end to end.
We are nowhere near that in our setup.
The lowest we can get is > 1 sec.
Here are the settings we are using (c is the AVCodecContext pointer):
c->bit_rate_tolerance = 0;
c->rc_max_rate = 0;
c->rc_buffer_size = 0;
c->gop_size = 5;
c->max_b_frames = 0;
c->b_frame_strategy = 1;
c->coder_type = 1;
c->me_cmp = 1;
c->me_range = 16;
c->qmin = 10;
c->qmax = 51;
c->scenechange_threshold = 40;
c->flags |= CODEC_FLAG_LOOP_FILTER;
c->me_method = ME_HEX;
c->me_subpel_quality = 5;
c->i_quant_factor = 0.71;
c->qcompress = 0.6;
c->max_qdiff = 4;
Additionally, we tried to set some libx264 private settings like so:
av_opt_set(_pVideoCodecCtx->priv_data, "preset", "ultrafast", 0);
av_opt_set(_pVideoCodecCtx->priv_data, "tune", "zerolatency", 0);
av_opt_set(_pVideoCodecCtx->priv_data, "g", “30", 0);
Does anyone have a hint what we could do to get more speed?
Also, is there anything we can set on the decoder side to decrease the delay?
We are on the defaults there.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Libav-user