OpenBSD manual page server

Manual Page Search Parameters

VIDEO(1) General Commands Manual VIDEO(1)

videorecord or display images from video(4)

video [-cdgqRv] [-a adaptor] [-e encoding] [-f file] [-i input] [-O output] [-o output] [-r rate] [-s size] [control[=value]]

video is a utility for reading, writing and displaying streams of raw video frames. By default frames are read from file and displayed via Xv(3). The default file is /dev/video. If the -o option is used frames are read from file and written to output. If the -i option is used frames are read from input and displayed via Xv(3). If the -O option is used frames are read from file, written to output and displayed via Xv(3). The acutance, brightness, contrast, gain, gamma, hue, saturation and white balance temperature controls of file can also be adjusted if file supports these controls.

The options are as follows:

adaptor
Index of Xv(3) adaptor to use. The default is 0, the first adaptor reported by X(7).
List all current supported control values and quit.
Reset all supported controls to their default value and quit.
encoding
Lowercase FOURCC name of video encoding to use. Valid arguments are ‘uyvy’, ‘yuy2’ and ‘yv12’. The default is ‘yuy2’ unless file is being used and only supports ‘uyvy’, in which case ‘uyvy’ will be used by default.
file
video(4) device from which frames will be read. The default is /dev/video.
Use read(2) to grab frames instead of mmap(2).
input
File from which frames will be read. If input is ‘-’, frames will be read from standard input.
output
File to which frames will be written. If output is ‘-’, frames will be written to standard output. In contrast to -o, if this option is used, video will also display the frames via Xv(3).
output
File to which frames will be written. If output is ‘-’, frames will be written to standard output.
Query for encodings, frame sizes/rates, and controls. Display them and quit.
Disable frame rate adjustment.
rate
Rate in frames per second at which to read. Must be an integer greater than 0. If the -r option is not specified, frames will be read as quickly as possible. If reading from a video(4) device, the device's frame rate will be set to the frame rate the device supports that is closest to rate. Frames will be read as quickly as they are available from the device, but will be displayed and/or written to output at the rate specified, unless the -R option is used.
size
Size of frames to read. The format of size is WxH, where W represents width and H represents height, both expressed as number of pixels. The default is 640x480. If size does not contain ‘x’, size is interpreted as only the width. If ‘x’ is the first character of size, the characters following ‘x’ are interpreted as the height. If only one of width or height is specified, the other will be calculated using a 4:3 width:height ratio. For example, if given ‘-s 640video will use a size of ‘640x480’. When reading from a video(4) device and displaying the frames on an Xv(3) display, this option also accepts two special strings, ‘half’ and ‘full.’ If either ‘half’ or ‘full’ are specified, video will read frames that are no larger than 2/3 the display width and 2/3 the display height. If ‘full’ is specified, video will stretch the frame to the full size of the display using Xv(3) scaling. If video is reading frames from a video(4) device and the frame size does not match a frame size the device supports, video will use the largest frame size supported by the device that is smaller than the specified size.
Verbose mode. Multiple instances of this option are allowed. Each instance increases the level of informational output printed to stderr.
control[=value]
Retrieve the specified control, or attempt to set it to value and quit. Multiple control[=value] arguments may be given.

video will quit reading frames and exit nicely if it receives any of the following signals: SIGHUP, SIGINT, SIGKILL, SIGTERM, SIGPIPE.

video responds to certain key presses while it is displaying frames. The keypresses are as follows:

Increase acutance (sharpness) control of file.
Decrease acutance (sharpness) control of file.
Increase brightness control of file.
Decrease brightness control of file.
Increase contrast control of file.
Decrease contrast control of file.
Toggle full-screen display.
Increase gain control of file.
Decrease gain control of file.
Increase hue control of file.
Decrease hue control of file.
Increase gamma control of file.
Decrease gamma control of file.
Start writing to output. Only meaningful when the -O option is used.
Stop writing to output. Only meaningful when the -O option is used.
Toggle new frame display.
Quit video.
Reset all supported controls of file to their default value.
Increase saturation control of file.
Decrease saturation control of file.
Increase white balance temperature control of file.
Decrease white balance temperature control of file.

The following command will read YUY2 encoded, 640 pixel wide and 480 pixel high video frames from /dev/video and display them using the default Xv(3) adaptor:

$ video

The following command will read YUY2 encoded, 640 pixel wide and 480 pixel high video frames from /dev/video and write them to video.raw at a rate of 15 frames per second:

$ video -r 15 -o video.raw

The following command will read YUY2 encoded, 640 pixel wide and 480 pixel high video frames from /dev/video, write them to video.raw and display them using the default Xv(3) adaptor at a rate of 15 frames per second:

$ video -r 15 -O video.raw

The following command will read YUY2 encoded, 640 pixel wide and 480 pixel high video frames from video.raw and display them on the default Xv(3) adaptor at a rate of 15 frames per second:

$ video -r 15 -i video.raw

Note that with the first three commands, if /dev/video does not support 640x480 pixels sized frames, the largest frame size smaller than 640x480 will be used, and if /dev/video does not support yuy2 encoding, uyvy will be used.

video(4)

August 5, 2020 OpenBSD-7.2