title: gstreamer images to video in real-time
body: <p>I am trying to use gstreamer to save images into a video format in real time as they are 
  being captured.  I have the command to save the images.  This line is:</p>
  
  <pre><code>gst-launch -e v4l2src device=/dev/video0 ! 'image/jpeg,width=640,height=480,framerate=30/1' ! jpegdec ! timeoverlay halign=right valign=bottom ! clockoverlay halign=left valign=bottom time-format="%Y/%m/%d %H:%M:%S" ! tee name=t ! queue ! sdlvideosink t. ! queue ! videorate ! capsfilter caps="video/x-raw-yuv,framerate=1/1" ! ffmpegcolorspace ! jpegenc ! multifilesink location="./Desktop/frames/frame%06d.jpg"
  </code></pre>
  
  <p>This command saves the images to a folder.  I wrote another command that takes those pictures and saves them to a video.  This command is:</p>
  
  <pre><code>gst-launch -e multifilesrc location=./Desktop/frames/frame%06d.jpg ! image/jpeg,framerate=30/1 ! decodebin ! videoscale ! video/x-raw-yuv ! progressreport name=progress ! avimux ! filesink location=test.avi  
  </code></pre>
  
  <p>I need a way of combining these two commands so that the video can be saved in real time.  I cannot seem to figure out how this is done.</p>
  
  <p>Thanks!</p>