VIDEO(1) | General Commands Manual | VIDEO(1) |
video
— record 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:
-a
adaptor-c
-d
-e
encodinguyvy
’,
‘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.-f
file-g
-i
input-
’, frames will be read from
standard input.-O
output-
’, 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).-o
output-
’, frames will be written to
standard output.-q
-R
-r
rate-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.-s
sizex
’,
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 640
’
video
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.-v
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:
A
a
B
b
C
c
f
G
g
H
h
M
m
O
-O
option is used.o
-O
option is used.p
q
video
.r
S
s
W
w
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.
August 5, 2020 | OpenBSD-current |