title: How to stream and Save video from Raspberry pi using gstreamer
body: <p>I am trying to stream and save. I am able to see the stream, but the file I save is not opening in VLC even after it is of some size.</p>
  
  <p>Sending command:</p>
  
  <p><code>raspivid -t 0 -w 1080 -h 720 -fps 25 -hf -b 2000000 -o - | gst-launch-1.0 -v fdsrc ! h264parse ! rtph264pay config-interval=1 pt=96 ! gdppay ! tcpserversink host=192.168.43.7 port=6002</code></p>
  
  <p>Receiving command:</p>
  
  <p><code>gst-launch-1.0 -e -v tcpclientsrc host=192.168.43.7 port=6002 ! gdpdepay ! queue ! rtph264depay ! tee name =t ! avdec_h264 ! videoconvert ! autovideosink sync=false t. ! queue ! h264parse ! mp4mux ! filesink location=file.mp4</code></p>
  
  <p>None of these are throwing any error, but I am not able to view the saved file.</p>