Q:

Is there a way to save RFB (vnc) streams to file? [ GStreamer]

I am finding a way to connect to VNC and record the video using GStreamer.  So far, I can connect to the VNC server but can only view the video using autovideosink.  I wanted to save the video to a file. 
This is what I tried and is working:
gst-launch-1.0 -e -vvv rfbsrc host=127.0.0.1 width=1024 height=768 shared=true view-only=true !  videoscale !  video/x-raw,width=1024,height=576 !  videorate !  videoconvert !  autovideosink

This is for saving the video file using filesink:
gst-launch-1.0 -e -vvv rfbsrc host=127.0.0.1 width=1024 height=768 shared=true view-only=true !  videoscale !  video/x-raw,width=1024,height=576 !  videorate !  videoconvert !  filesink location=video.flv

Results:
A file is saved with large size and is not playable. 
Any inputs will be a big help.  Thank you in advance. 

A:

Finally made it.  Made some changes with mov output file:
gst-launch-1.0 -e -vvvv rfbsrc host=127.0.0.1 port=5900 !  videoconvert !  x264enc !  video/x-h264, profile=baseline !  qtmux !  filesink location=output.mov

Posted the answer for future references.  Thanks. 