title: Realtime/zero-latency video stream: what codec parameters to use?
body: <p>I am writing an Android App which encompasses sending and receiving a video stream from a desktop PC. For the app to work properly we need as little latency as possible, sacrificing video quality if necessary. We are using <code>gstreamer 1.45</code> on both ends, but with the current pipeline we have at least 0.5s delay on a Galaxy Note S2, and thats if both devices are on the same network (later this should work via VPN). </p>
  
  <p>The <strong>sender</strong> pipeline</p>
  
  <pre><code>appsrc name=vs_src format=time do-timestamp=true
      caps="video/x-raw, format=(string)RGB, width=(int)640, height=(int)480, framerate=(fraction)15/1000" 
      ! videoconvert 
      ! x264enc speed-preset=ultrafast tune=zerolatency byte-stream=true threads=1 key-int-max=15 intra-refresh=true ! h264parse ! rtph264pay pt=96
      ! queue ! udpsink name=vs_sink host=%s port=%d async=false
  </code></pre>
  
  <p>The <strong>receiver</strong> pipeline </p>
  
  <pre><code>udpsrc name=vr_src 
      caps="application/x-rtp, media=(string)video, clock-rate=(int)90000, payload=(int)96, encoding-name=(string)H264"
      ! rtpjitterbuffer 
      ! rtph264depay ! h264parse ! avdec_h264 
      ! videorate ! videoconvert
      ! glimagesink name=vr_sink async=false
  </code></pre>
  
  <p>Setting <code>threads=2</code> or higher emits a gstreamer warning that it was compiled without multithreading support. I know that some devices offer hardware decoders, but the only way to access them reliably seems to be via <code>encodebin</code>/<code>decodebin</code>. I already tried using a <code>decodebin</code> but for some reason it complains that it can't find the required plugins (e.g. <code>No decoder to handle media type 'video/x-h264'</code>). </p>
  
  <p>I am no expert by any means when it comes to streaming and video encoding/decoding, and getting the App to a working point was already a nightmare :/ If H264 should be inappropriate we can switch to any other codec supported by gstreamer. Can anybody help me? </p>