v4l2-ctl 控制命令

# v4l2-ctl

Usage:

Common options:
  --all              display all information available
  -C, --get-ctrl=[,...]
                     get the value of the controls [VIDIOC_G_EXT_CTRLS]
  -c, --set-ctrl==[,=...]
                     set the controls to the values specified [VIDIOC_S_EXT_CTRLS]
  -D, --info         show driver info [VIDIOC_QUERYCAP]
  -d, --device= use device instead of /dev/video0
                     if is a single digit, then /dev/video is used
  -F, --get-freq     query the frequency [VIDIOC_G_FREQUENCY]
  -f, --set-freq=
                     set the frequency to MHz [VIDIOC_S_FREQUENCY]
  -h, --help         display this help message
  -I, --get-input    query the video input [VIDIOC_G_INPUT]
  -i, --set-input=
                     set the video input to [VIDIOC_S_INPUT]
  -l, --list-ctrls   display all controls and their values [VIDIOC_QUERYCTRL]
  -L, --list-ctrls-menus
    display all controls, their values and the menus [VIDIOC_QUERYMENU]
  -N, --list-outputs display video outputs [VIDIOC_ENUMOUTPUT]
  -n, --list-inputs  display video inputs [VIDIOC_ENUMINPUT]
  -O, --get-output   query the video output [VIDIOC_G_OUTPUT]
  -o, --set-output=
                     set the video output to [VIDIOC_S_OUTPUT]
  --list-standards   display supported video standards [VIDIOC_ENUMSTD]
  -S, --get-standard
                     query the video standard [VIDIOC_G_STD]
  -s, --set-standard=
                     set the video standard to [VIDIOC_S_STD]
                      can be a numerical v4l2_std value, or it can be one of:
                     pal-X (X = B/G/H/N/Nc/I/D/K/M/60) or just 'pal' (V4L2_STD_PAL)
                     ntsc-X (X = M/J/K) or just 'ntsc' (V4L2_STD_NTSC)
                     secam-X (X = B/G/H/D/K/L/Lc) or just 'secam' (V4L2_STD_SECAM)
  --get-detected-standard
                     display detected input video standard [VIDIOC_QUERYSTD]
  -P, --get-parm     display video parameters [VIDIOC_G_PARM]
  -p, --set-parm=
                     set video framerate in [VIDIOC_S_PARM]
  -T, --get-tuner    query the tuner settings [VIDIOC_G_TUNER]
  -t, --set-tuner=
                     set the audio mode of the tuner [VIDIOC_S_TUNER]
                     Possible values: mono, stereo, lang2, lang1, bilingual
  --list-formats     display supported video formats [VIDIOC_ENUM_FMT]
  --list-formats-mplane
                     display supported video multi-planar formats [VIDIOC_ENUM_FMT]
  --list-formats-ext display supported video formats including frame sizes
                     and intervals
  --list-formats-ext-mplane
                     display supported video multi-planar formats including
                     frame sizes and intervals
  --list-framesizes=
                     list supported framesizes for pixelformat
                     [VIDIOC_ENUM_FRAMESIZES]
                     pixelformat is the fourcc value as a string
  --list-frameintervals=width=,height=,pixelformat=
                     list supported frame intervals for pixelformat and
                     the given width and height [VIDIOC_ENUM_FRAMEINTERVALS]
                     pixelformat is the fourcc value as a string
  -V, --get-fmt-video
          query the video capture format [VIDIOC_G_FMT]
  -v, --set-fmt-video=width=,height=,pixelformat=
                     set the video capture format [VIDIOC_S_FMT]
                     pixelformat is either the format index as reported by
                     --list-formats, or the fourcc value as a string
  -w, --wrapper      use the libv4l2 wrapper library.
  --list-devices     list all v4l devices
  --silent           only set the result code, do not print any messages
  --verbose          turn on verbose ioctl status reporting


Uncommon options:
  --try-fmt-video=width=,height=,pixelformat=
                     try the video capture format [VIDIOC_TRY_FMT]
                     pixelformat is either the format index as reported by
                     --list-formats, or the fourcc value as a string
  --get-fmt-video-mplane
          query the video capture format through the multi-planar API [VIDIOC_G_FMT]
  --set-fmt-video-mplane
  --try-fmt-video-mplane=width=,height=,pixelformat=
                     set/try the video capture format using the multi-planar API [VIDIOC_S/TRY_FMT]
                     pixelformat is either the format index as reported by
                     --list-formats-mplane, or the fourcc value as a string
  --list-formats-out display supported video output formats [VIDIOC_ENUM_FMT]
  --get-fmt-video-out
          query the video output format [VIDIOC_G_FMT]
  --set-fmt-video-out
  --try-fmt-video-out=width=,height=,pixelformat=
                     set/try the video output format [VIDIOC_TRY_FMT]
                     pixelformat is either the format index as reported by
                     --list-formats-out, or the fourcc value as a string
  --list-formats-out-mplane
                     display supported video output multi-planar formats [VIDIOC_ENUM_FMT]
  --get-fmt-video-out-mplane
          query the video output format using the multi-planar API [VIDIOC_G_FMT]
  --set-fmt-video-out-mplane
  --try-fmt-video-out-mplane=width=,height=,pixelformat=
                     set/try the video output format with the multi-planar API [VIDIOC_S/TRY_FMT]
                     pixelformat is either the format index as reported by
                     --list-formats-out-mplane, or the fourcc value as a string
  --list-formats-overlay
                     display supported overlay formats [VIDIOC_ENUM_FMT]
  --get-fmt-overlay  query the video overlay format [VIDIOC_G_FMT]
  --get-fmt-output-overlay
          query the video output overlay format [VIDIOC_G_FMT]
  --set-fmt-overlay
  --try-fmt-overlay
  --set-fmt-output-overlay
  --try-fmt-output-overlay=chromakey=,global_alpha=,
                           top=,left=,width=,height=,field=
          set/try the video or video output overlay format [VIDIOC_S/TRY_FMT]
                      can be one of:
                     any, none, top, bottom, interlaced, seq_tb, seq_bt, alternate,
                     interlaced_tb, interlaced_bt
  --get-sliced-vbi-cap
    query the sliced VBI capture capabilities [VIDIOC_G_SLICED_VBI_CAP]
  --get-sliced-vbi-out-cap
    query the sliced VBI output capabilities [VIDIOC_G_SLICED_VBI_CAP]
  -B, --get-fmt-sliced-vbi
    query the sliced VBI capture format [VIDIOC_G_FMT]
  --get-fmt-sliced-vbi-out
    query the sliced VBI output format [VIDIOC_G_FMT]
  -b, --set-fmt-sliced-vbi
  --try-fmt-sliced-vbi
  --set-fmt-sliced-vbi-out
  --try-fmt-sliced-vbi-out=
                     set/try the sliced VBI capture/output format to [VIDIOC_S/TRY_FMT]
                      is a comma separated list of:
                     off:      turn off sliced VBI (cannot be combined with other modes)
                     teletext: teletext (PAL/SECAM)
                     cc:       closed caption (NTSC)
                     wss:      widescreen signal (PAL/SECAM)
                     vps:      VPS (PAL/SECAM)
  --get-fmt-vbi      query the VBI capture format [VIDIOC_G_FMT]
  --get-fmt-vbi-out  query the VBI output format [VIDIOC_G_FMT]
  --overlay=     turn overlay on (1) or off (0) (VIDIOC_OVERLAY)
  --get-fbuf         query the overlay framebuffer data [VIDIOC_G_FBUF]
  --set-fbuf=chromakey=<0/1>,global_alpha=<0/1>,local_alpha=<0/1>,local_inv_alpha=<0/1>
    set the overlay framebuffer [VIDIOC_S_FBUF]
  --get-cropcap      query the crop capabilities [VIDIOC_CROPCAP]
  --get-crop     query the video capture crop window [VIDIOC_G_CROP]
  --set-crop=top=,left=,width=,height=
                     set the video capture crop window [VIDIOC_S_CROP]
  --get-cropcap-output
                     query the crop capabilities for video output [VIDIOC_CROPCAP]
  --get-crop-output  query the video output crop window [VIDIOC_G_CROP]
  --set-crop-output=top=,left=,width=,height=
                     set the video output crop window [VIDIOC_S_CROP]
  --get-cropcap-overlay
                     query the crop capabilities for video overlay [VIDIOC_CROPCAP]
  --get-crop-overlay query the video overlay crop window [VIDIOC_G_CROP]
  --set-crop-overlay=top=,left=,width=,height=
                     set the video overlay crop window [VIDIOC_S_CROP]
  --get-cropcap-output-overlay
                     query the crop capabilities for video output overlays [VIDIOC_CROPCAP]
  --get-crop-output-overlay
                     query the video output overlay crop window [VIDIOC_G_CROP]
  --set-crop-output-overlay=top=,left=,width=,height=
                     set the video output overlay crop window [VIDIOC_S_CROP]
  --get-jpeg-comp    query the JPEG compression [VIDIOC_G_JPEGCOMP]
  --set-jpeg-comp=quality=,markers=,comment=,app=
                     set the JPEG compression [VIDIOC_S_JPEGCOMP]
                      is the app segment: 0-9 or a-f,
is the actual string.
                      is a colon separated list of:
                     dht:      Define Huffman Tables
                     dqt:      Define Quantization Tables
                     dri:      Define Restart Interval
  --set-audio-output=
                     set the audio output to [VIDIOC_S_AUDOUT]
  --get-audio-input  query the audio input [VIDIOC_G_AUDIO]
  --set-audio-input=
                     set the audio input to [VIDIOC_S_AUDIO]
  --get-audio-output query the audio output [VIDIOC_G_AUDOUT]
  --set-audio-output=
                     set the audio output to [VIDIOC_S_AUDOUT]
  --list-audio-outputs
                     display audio outputs [VIDIOC_ENUMAUDOUT]
  --list-audio-inputs
                     display audio inputs [VIDIOC_ENUMAUDIO]
  --get-modulator    query the modulator settings [VIDIOC_G_MODULATOR]
  --set-modulator=
                     set the sub-carrier modulation [VIDIOC_S_MODULATOR]
                      is one of:
                     mono: Modulate as mono
                     mono-rds: Modulate as mono with RDS (radio only)
                     stereo: Modulate as stereo
                     stereo-rds: Modulate as stereo with RDS (radio only)
                     bilingual: Modulate as bilingual
                     mono-sap: Modulate as mono with Second Audio Program
                     stereo-sap: Modulate as stereo with Second Audio Program
  --get-priority     query the current access priority [VIDIOC_G_PRIORITY]
  --set-priority=
                     set the new access priority [VIDIOC_S_PRIORITY]
                      is 1 (background), 2 (interactive) or 3 (record)
  --get-output-parm  display output video parameters [VIDIOC_G_PARM]
  --set-output-parm=
                     set output video framerate in [VIDIOC_S_PARM]
  --wait-for-event=
                     wait for an event [VIDIOC_DQEVENT]
                      is the event number or one of:
                     eos, vsync, ctrl=
                     where is the name of the control
  --poll-for-event=
                     poll for an event [VIDIOC_DQEVENT]
                     see --wait-for-event for possible events
  --list-dv-presets  list supported digital video presets [VIDIOC_ENUM_DV_PRESETS]
  --set-dv-preset=
                     set the digital video preset to [VIDIOC_S_DV_PRESET]
  --get-dv-preset    query the digital video preset in use [VIDIOC_G_DV_PRESET]
  --query-dv-preset  query the detected digital video preset [VIDIOC_QUERY_DV_PRESET]
  --set-dv-bt-timings=width=,height=,interlaced=<0/1>,
                     polarities=,pixelclock=,
                     hfp=,hs=,
                     hbp=,vfporch=,
                     vs=,vbp=,
                     il_vfp=,
                     il_vs=,
                     il_vbp=,
                     set the digital video timings according to the BT 656/1120 standard [VIDIOC_S_DV_TIMINGS]
  --get-dv-bt-timings
                     get the digital video timings in use [VIDIOC_G_DV_TIMINGS]
  --sleep=     sleep for seconds, call QUERYCAP and close the file handle
  --streamoff        turn the stream off [VIDIOC_STREAMOFF]
  --streamon         turn the stream on [VIDIOC_STREAMON]

  --log-status       log the board status in the kernel log [VIDIOC_LOG_STATUS]l


例如:

1、v4l2-ctl --all //显示Camera所有信息

2、v4l-ctl  -D //显示Camera信息






你可能感兴趣的:(V4L2学习)