title: Android camera stream with rtmp has stable 5 second latency
body: <p>I use ffmpeg with h264 build and javacv on android to stream video from camera to rtmp server.
  I was trying to set all possible video framerates and bitrates, set preset ultrafast, but I still have stable 5 seconds delay.
  If i use android mediarecorder sending mpegts stream with rtmp to server,i have only 2 seconds delay, and if I use -fflags nobuffer  options on the client(ffmpeg), the video is appearing immediately.</p>
  
  <p>I don`t know how in android ffmpeg reduces this latency.
  Here the code: </p>
  
  <pre><code>    recorder = new FFmpegFrameRecorder(ffmpeg_link, imageWidth, imageHeight, 1);
      recorder.setFormat("flv");
      recorder.setFrameRate(frameRate);
      recorder.setVideoBitrate(900*1000);
      recorder.setVideoCodec(avcodec.AV_CODEC_ID_H264);
      recorder.setVideoOption("preset", "ultrafast");
      recorder.setVideoOption("tune", "zerolatency");
      recorder.setVideoOption("fflags", "nobuffer");
      recorder.setVideoOption("analyzeduration", "0");
  </code></pre>