title: How to use gstreamer for transcoding and resizing from mp4(h264/aac) to mp4(h264/mp3)?
body: <p>I want to transcode and resize mp4.(mp4-h264_1920x1080/aac => mp4-h264_640x480/mp3) using gstreamer. I wrote down this command.</p>
  
  <pre><code>$ gst-launch-0.10 filesrc location=./gain_1.mp4 ! qtdemux name=demux demux.video_00 ! queue ! ffdec_h264 ! videoscale ! 'video/x-raw-yuv,width=640,height=480' ! x264enc ! queue ! qtmux name=mux mux.video_0 demux.audio_00 ! queue ! ffdec_aac ! lame bitrate=128 ! queue ! mux.audio_0 mux. ! filesink location=0000.mp4 –v -e
  Setting pipeline to PAUSED ...
  Pipeline is PREROLLING ...
  Redistribute latency...
  ^CCaught interrupt -- handling interrupt.
  Interrupt: Stopping pipeline ...
  
  (gst-launch-0.10:17958): GLib-CRITICAL **: Source ID 1 was not found when attempting to remove it
  ERROR: pipeline doesn't want to preroll.
  Setting pipeline to NULL ...
  Freeing pipeline ...
  </code></pre>
  
  <p>which didn't work.</p>
  
  <p>Transcoding video-only works :</p>
  
  <pre><code>gst-launch-0.10 filesrc location=./gain_1.mp4 ! qtdemux name=demux demux.video_00 ! queue ! ffdec_h264 ! videoscale ! 'video/x-raw-yuv, width=640, height=480' ! x264enc ! queue ! mux. mp4mux name=mux ! filesink location=0000.mp4 –v -e
  </code></pre>
  
  <p>And transcoding audio-only too:</p>
  
  <pre><code>gst-launch-0.10 filesrc location=./gain_1.mp4 ! qtdemux name=demux demux.audio_00 ! ffdec_aac ! lame bitrate=128 ! queue ! mux. mp4mux name=mux ! filesink location=0000.mp4 –v -e
  </code></pre>
  
  <p>How can I transcode audio and video with the same command?</p>