Multifilesink is an element that is designed to write individual buffers to sequentially named files. Unlike most other elements, multifilesink is meant to be most useful in scripts and gst-launch command lines.
Create 100 files (00000 to 00099) containing the raw video frames generated by videotestsrc:
gst-launch videotestsrc num-buffers=100 ! \ video/x-raw-yuv,format=\(I420\),width=320,height=240 ! \ multifilesink
Dump a video to a series of PNG files:
gst-launch uridecodebin uri=file:///path/to/some/file ! \ ffmpegcolorspace ! videoscale ! pngenc snapshot=false ! multifilesink location=output-%05d.png