# Source: rpicam_raw.adoc

*Note: This file could not be automatically converted from AsciiDoc.*

=== `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:

[source,console]
----
$ 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 xref:camera_software.adoc#segment[`segment`] option to direct each raw frame to a separate file, using the `%05d` xref:camera_software.adoc#output[directive] to make each frame filename unique:

[source,console]
----
$ 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 xref:camera_software.adoc#rpicam-still[`rpicam-still`]. Use the xref:camera_software.adoc#framerate[`framerate`] option at a level beneath 10 to avoid dropping frames:

[source,console]
----
$ rpicam-raw -t 5000 --width 4056 --height 3040 -o test.raw --framerate 8
----

For more information on the raw formats, see the xref:camera_software.adoc#mode[`mode` documentation].