rpicam-raw
rpicam-raw records video as raw Bayer frames directly from the sensor. It does not show a preview window. To record a two second raw clip to a file named test.raw, run the following command:
$ rpicam-raw -t 2000 -o test.raw
rpicam-raw outputs raw frames with no formatting information at all, one directly after another. The application prints the pixel format and image dimensions to the terminal window to help the user interpret the pixel data.
By default, rpicam-raw outputs raw frames in a single, potentially very large, file. Use the segment option to direct each raw frame to a separate file, using the %05d directive to make each frame filename unique:
$ rpicam-raw -t 2000 --segment 1 -o test%05d.raw
With a fast storage device, rpicam-raw can write 18 MB 12-megapixel HQ camera frames to disk at 10fps. rpicam-raw has no capability to format output frames as DNG files; for that functionality, use rpicam-still. Use the framerate option at a level beneath 10 to avoid dropping frames:
$ rpicam-raw -t 5000 --width 4056 --height 3040 -o test.raw --framerate 8
For more information on the raw formats, see the mode documentation.