title: Gstreamer pipeline grammar
body: <p>I am using gstreamer pipeline to encode a mp4 file to different bitrate. I constructed the pipeline using the code from gst-streaming-server. The pipeline does not seem to work. I am not able to understand the pipeline syntax here to debug it. </p>
  
  <pre><code>gst-launch-1.0 filesrc location=video_test.mp4 name=src ! \
    decodebin name=dec queue name=vqueue ! \
    videosegmentclip name=vclip ! \
    videoconvert ! \
    video/x-raw, format=I420 ! \
    videocrop top=0 bottom=0 left=0 right=0 ! \
    queue ! \
    tee name=vtee queue name=aqueue max-size-time=5000000000 max-size-bytes=0 max-size-     buffers=0 ! \
    audiosegmentclip name=aclip ! \
    audioconvert ! \
    audio/x-raw, channels=2 ! \
    audioresample ! \
    audio/x-raw, rate=48000 ! \
    voaacenc bitrate=128000 ! \
    queue ! \
    tee name=atee vtee. ! \
    queue ! \
    videoscale add-borders=false ! \
    video/x-raw,pixel-aspect-ratio=1/1,width=1280,height=720 ! \
    x264enc name=venc0 bitrate=2372 tune=zerolatency ! \
    queue ! \
    mp4mux name=mux0 ! \
    watchdog timeout=5000 ! \
    filesink name=sink0 location=out0.mp4  atee. ! \
    queue ! \
    mux0. \ 
  </code></pre>
  
  <p>Above is the full pipeline. The tough part for me is in understanding are below</p>
  
  <pre><code>decodebin name=dec queue name=vqueue
  </code></pre>
  
  <p>There is no ! in the line above and should there not be a ! between decodebin and queue</p>
  
  <pre><code>tee name=vtee queue name=aqueue... ! audiosegmentclip
  </code></pre>
  
  <p>In the above line there is a tee which is named vtee (videotee) but linked to audiosegmentclip. How does this work?</p>
  
  <pre><code>tee name=atee vtee. ! queue
  </code></pre>
  
  <p>In the above line there is a tee named atee immediately followed by vtee. What is the meaning of this? what is the significance of having a period(.) after the element?</p>
  
  <p>Any links explaining the gstreamer pipeline grammer would be very helpful.</p>