V4l: Difference between revisions

From VideoLAN Wiki
Jump to navigation Jump to search
Hovis (talk | contribs)
m added reset option
No edit summary
Line 32: Line 32:


=== module options ===
=== module options ===
       --v4l2-dev <string>         Video device name (default /dev/video0)
  Video input:
       --v4l2-adev <string>        Audio device name (default /dev/dsp)
       --v4l2-dev <string>       Device name
      --v4l2-standard <string>    Default, SECAM, PAL, NTSC
          Name of the device to use. If you don't specify anything, /dev/video0
       --v4l2-chroma <string>     Video input chroma format. The default is to auto detect.
          will be used.
       --v4l2-input <integer>     Input of the card to use (0 is the default).
       --v4l2-standard {0 (Default), 16711680 (SECAM), 255 (PAL), 45056 (NTSC)}
                                              Usually:
                                Standard
                                              * 0=tuner
          Video standard (Default, SECAM, PAL, or NTSC).
                                              * 1=composite
       --v4l2-chroma <string>     Video input chroma format
                                              * 2=svideo
          Force the Video4Linux2 video device to use a specific chroma format
       --v4l2-io <string>         Read method for the video.
          (eg. I420 or I422 for raw images, MJPEG for M-JPEG compressed input)
                                              * READ = Basic read()
          (Complete list: GREY, I240, RV16, RV15, RV24, RV32, YUY2, YUYV, UYVY,
                                              * MMAP = Memory mapped buffer (the default)
          I41N, I422, I420, I411, I410, MJPG)
                                              * USERPTR = User buffer pointer
       --v4l2-input <integer>     Input
       --v4l2-fps <float>         Frame rate per second (0 = Unrestricted - the default)
          Input of the card to use (see debug).
       --v4l2-width <integer>     Try picture width (-1 = auto detect)
      --v4l2-audio-input <integer>
       --v4l2-height <integer>     Try picture height (-1 = auto detect)
                                Audio input
       --v4l2-brightness <integer> Brightness
          Audio input of the card to use (see debug).
       --v4l2-contrast <integer>   Contrast
      --v4l2-io {0 (READ), 1 (MMAP), 2 (USERPTR)}
       --v4l2-saturation <integer> Saturation
                                IO Method
       --v4l2-hue <integer>       Hue
          IO Method (READ, MMAP, USERPTR).
       --v4l2-gamma <integer>      Gamma
       --v4l2-width <integer>     Width
       --v4l2-stereo <bool>       Stereo audio (default true)
          Force width (-1 for autodetect).
       --v4l2-samplerate <integer> Audio sample rate (default 48000)
      --v4l2-height <integer>    Height
       --v4l2-caching <integer>   Caching value in ms
          Force height (-1 for autodetect).
       --v4l2-videocontrol-reset  Reset control values to the device defaults
      --v4l2-fps <float>        Framerate
          Framerate to capture, if applicable (-1 for autodetect).
  Audio input:
      --v4l2-adev <string>      Audio device name
          Name of the audio device to use. If you don't specify anything,
          "/dev/dsp" will be used for OSS, "hw" for Alsa.
       --v4l2-audio-method <integer>
                                Audio method
          Audio method to use: 0 to disable audio, 1 for OSS, 2 for ALSA, 3 for
          ALSA or OSS (ALSA is prefered).
      --v4l2-stereo, --no-v4l2-stereo
                                Stereo (default enabled)
          Capture the audio stream in stereo. (default enabled)
       --v4l2-samplerate <integer>
                                Samplerate
          Samplerate of the captured audio stream, in Hz (eg: 11025, 22050,
          44100, 48000)
      --v4l2-caching <integer>  Caching value in ms
          Caching value for V4L2 captures. This value should be set in
          milliseconds.
  Tuner:
      --v4l2-tuner <integer>    Tuner id
          Tuner id (see debug output).
       --v4l2-tuner-frequency <integer>
                                Frequency
          Tuner frequency in Hz or kHz (see debug output)
      --v4l2-tuner-audio-mode {0 (Mono), 1 (Stereo), 3 (Primary language (Analog
TV tuners only)), 2 (Secondary language (Analog TV tuners only)), 2 (Second aud
io program (Analog TV tuners only)), 4 (Primary language left, Secondary languag
e right)}
                                Audio mode
          Tuner audio mono/stereo and track selection.
  Controls:
  v4l2 driver controls, if supported by your v4l2 driver.
      --v4l2-controls-reset, --no-v4l2-controls-reset
                                Reset v4l2 controls (default disabled)
          Reset controls to defaults provided by the v4l2 driver. (default
          disabled)
       --v4l2-brightness <integer>
                                Brightness
          Brightness of the video input (if supported by the v4l2 driver).
       --v4l2-contrast <integer> Contrast
          Contrast of the video input (if supported by the v4l2 driver).
       --v4l2-saturation <integer>
                                Saturation
          Saturation of the video input (if supported by the v4l2 driver).
       --v4l2-hue <integer>       Hue
          Hue of the video input (if supported by the v4l2 driver).
      --v4l2-black-level <integer>
                                Black level
          Black level of the video input (if supported by the v4l2 driver).
      --v4l2-auto-white-balance <integer>
                                Auto white balance
          Automatically set the white balance of the video input (if supported
          by the v4l2 driver).
      --v4l2-do-white-balance <integer>
                                Do white balance
          Trigger a white balancing action, useless if auto white balance is
          activated (if supported by the v4l2 driver).
      --v4l2-red-balance <integer>
                                Red balance
          Red balance of the video input (if supported by the v4l2 driver).
      --v4l2-blue-balance <integer>
                                Blue balance
          Blue balance of the video input (if supported by the v4l2 driver).
       --v4l2-gamma <integer>    Gamma
          Gamma of the video input (if supported by the v4l2 driver).
      --v4l2-exposure <integer>  Exposure
          Exposure of the video input (if supported by the v4L2 driver).
      --v4l2-autogain <integer>  Auto gain
          Automatically set the video input's gain (if supported by the v4l2
          driver).
      --v4l2-gain <integer>      Gain
          Video input's gain (if supported by the v4l2 driver).
      --v4l2-hflip <integer>    Horizontal flip
          Flip the video horizontally (if supported by the v4l2 driver).
      --v4l2-vflip <integer>    Vertical flip
          Flip the video vertically (if supported by the v4l2 driver).
      --v4l2-hcenter <integer>  Horizontal centering
          Set the camera's horizontal centering (if supported by the v4l2
          driver).
      --v4l2-vcenter <integer>  Vertical centering
          Set the camera's vertical centering (if supported by the v4l2 driver).
      --v4l2-audio-volume <integer>
                                Volume
          Volume of the audio input (if supported by the v4l2 driver).
       --v4l2-audio-balance <integer>
                                Balance
          Balance of the audio input (if supported by the v4l2 driver).
      --v4l2-audio-mute, --no-v4l2-audio-mute
                                Mute (default disabled)
          Mute audio input (if supported by the v4l2 driver). (default disabled)
       --v4l2-audio-bass <integer>
                                Bass
          Bass level of the audio input (if supported by the v4l2 driver).
      --v4l2-audio-treble <integer>
                                Treble
          Treble level of the audio input (if supported by the v4l2 driver).
       --v4l2-audio-loudness <integer>
                                Loudness
          Loudness of the audio input (if supported by the v4l2 driver).
       --v4l2-set-ctrls <string>  v4l2 driver controls
          Set the v4l2 driver controls to the values specified using a comma
          separated list optionally encapsulated by curly braces (e.g.:
          {video_bitrate=6000000,audio_crc=0,stream_type=3} ). To list
          available controls, increase verbosity (-vvv) or use the v4l2-ctl
          application.
 


== Source code ==
== Source code ==
{{file|modules/access/v4l.c|access module}}
{{file|modules/access/v4l.c|access module}}
{{file|modules/access/v4l2.c|access module}}
{{file|modules/access/v4l2.c|access module}}

Revision as of 16:47, 13 January 2008

v4l

??
VLC uses this protocol (or access module) to read data from a device or network.

module options

     --v4l-caching <integer>    Caching value in ms
     --v4l-vdev <string>        Video device name
     --v4l-adev <string>        Audio device name
     --v4l-chroma <string>      Video input chroma format
     --v4l-fps <float>          Framerate
     --v4l-samplerate <integer> Samplerate
     --v4l-channel <integer>    Channel
     --v4l-tuner <integer>      Tuner
     --v4l-norm {3 (Automatic), 2 (SECAM), 0 (PAL), 1 (NTSC)}
                                Norm
     --v4l-frequency <integer>  Frequency
     --v4l-audio <integer>      Audio Channel
     --v4l-stereo, --no-v4l-stereo
                                Stereo (default enabled)
     --v4l-width <integer>      Width
     --v4l-height <integer>     Height
     --v4l-brightness <integer> Brightness
     --v4l-colour <integer>     Color
     --v4l-hue <integer>        Hue
     --v4l-contrast <integer>   Contrast
     --v4l-mjpeg, --no-v4l-mjpeg
                                MJPEG (default disabled)
     --v4l-decimation <integer> Decimation
     --v4l-quality <integer>    Quality

v4l2

??
VLC uses this protocol (or access module) to read data from a device or network.

module options

  Video input:
     --v4l2-dev <string>        Device name
         Name of the device to use. If you don't specify anything, /dev/video0
         will be used.
     --v4l2-standard {0 (Default), 16711680 (SECAM), 255 (PAL), 45056 (NTSC)}
                                Standard
         Video standard (Default, SECAM, PAL, or NTSC).
     --v4l2-chroma <string>     Video input chroma format
         Force the Video4Linux2 video device to use a specific chroma format
         (eg. I420 or I422 for raw images, MJPEG for M-JPEG compressed input)
         (Complete list: GREY, I240, RV16, RV15, RV24, RV32, YUY2, YUYV, UYVY,
         I41N, I422, I420, I411, I410, MJPG)
     --v4l2-input <integer>     Input
         Input of the card to use (see debug).
     --v4l2-audio-input <integer>
                                Audio input
         Audio input of the card to use (see debug).
     --v4l2-io {0 (READ), 1 (MMAP), 2 (USERPTR)}
                                IO Method
         IO Method (READ, MMAP, USERPTR).
     --v4l2-width <integer>     Width
         Force width (-1 for autodetect).
     --v4l2-height <integer>    Height
         Force height (-1 for autodetect).
     --v4l2-fps <float>         Framerate
         Framerate to capture, if applicable (-1 for autodetect).
  Audio input:
     --v4l2-adev <string>       Audio device name
         Name of the audio device to use. If you don't specify anything,
         "/dev/dsp" will be used for OSS, "hw" for Alsa.
     --v4l2-audio-method <integer>
                                Audio method
         Audio method to use: 0 to disable audio, 1 for OSS, 2 for ALSA, 3 for
         ALSA or OSS (ALSA is prefered).
     --v4l2-stereo, --no-v4l2-stereo
                                Stereo (default enabled)
         Capture the audio stream in stereo. (default enabled)
     --v4l2-samplerate <integer>
                                Samplerate
         Samplerate of the captured audio stream, in Hz (eg: 11025, 22050,
         44100, 48000)
     --v4l2-caching <integer>   Caching value in ms
         Caching value for V4L2 captures. This value should be set in
         milliseconds.
  Tuner:
     --v4l2-tuner <integer>     Tuner id
         Tuner id (see debug output).
     --v4l2-tuner-frequency <integer>
                                Frequency
         Tuner frequency in Hz or kHz (see debug output)
     --v4l2-tuner-audio-mode {0 (Mono), 1 (Stereo), 3 (Primary language (Analog
TV tuners only)), 2 (Secondary language (Analog TV tuners only)), 2 (Second aud

io program (Analog TV tuners only)), 4 (Primary language left, Secondary languag e right)}

                                Audio mode
         Tuner audio mono/stereo and track selection.
  Controls:
  v4l2 driver controls, if supported by your v4l2 driver.
     --v4l2-controls-reset, --no-v4l2-controls-reset
                                Reset v4l2 controls (default disabled)
         Reset controls to defaults provided by the v4l2 driver. (default
         disabled)
     --v4l2-brightness <integer>
                                Brightness
         Brightness of the video input (if supported by the v4l2 driver).
     --v4l2-contrast <integer>  Contrast
         Contrast of the video input (if supported by the v4l2 driver).
     --v4l2-saturation <integer>
                                Saturation
         Saturation of the video input (if supported by the v4l2 driver).
     --v4l2-hue <integer>       Hue
         Hue of the video input (if supported by the v4l2 driver).
     --v4l2-black-level <integer>
                                Black level
         Black level of the video input (if supported by the v4l2 driver).
     --v4l2-auto-white-balance <integer>
                                Auto white balance
         Automatically set the white balance of the video input (if supported
         by the v4l2 driver).
     --v4l2-do-white-balance <integer>
                                Do white balance
         Trigger a white balancing action, useless if auto white balance is
         activated (if supported by the v4l2 driver).
     --v4l2-red-balance <integer>
                                Red balance
         Red balance of the video input (if supported by the v4l2 driver).
     --v4l2-blue-balance <integer>
                                Blue balance
         Blue balance of the video input (if supported by the v4l2 driver).
     --v4l2-gamma <integer>     Gamma
         Gamma of the video input (if supported by the v4l2 driver).
     --v4l2-exposure <integer>  Exposure
         Exposure of the video input (if supported by the v4L2 driver).
     --v4l2-autogain <integer>  Auto gain
         Automatically set the video input's gain (if supported by the v4l2
         driver).
     --v4l2-gain <integer>      Gain
         Video input's gain (if supported by the v4l2 driver).
     --v4l2-hflip <integer>     Horizontal flip
         Flip the video horizontally (if supported by the v4l2 driver).
     --v4l2-vflip <integer>     Vertical flip
         Flip the video vertically (if supported by the v4l2 driver).
     --v4l2-hcenter <integer>   Horizontal centering
         Set the camera's horizontal centering (if supported by the v4l2
         driver).
     --v4l2-vcenter <integer>   Vertical centering
         Set the camera's vertical centering (if supported by the v4l2 driver).
     --v4l2-audio-volume <integer>
                                Volume
         Volume of the audio input (if supported by the v4l2 driver).
     --v4l2-audio-balance <integer>
                                Balance
         Balance of the audio input (if supported by the v4l2 driver).
     --v4l2-audio-mute, --no-v4l2-audio-mute
                                Mute (default disabled)
         Mute audio input (if supported by the v4l2 driver). (default disabled)
     --v4l2-audio-bass <integer>
                                Bass
         Bass level of the audio input (if supported by the v4l2 driver).
     --v4l2-audio-treble <integer>
                                Treble
         Treble level of the audio input (if supported by the v4l2 driver).
     --v4l2-audio-loudness <integer>
                                Loudness
         Loudness of the audio input (if supported by the v4l2 driver).
     --v4l2-set-ctrls <string>  v4l2 driver controls
         Set the v4l2 driver controls to the values specified using a comma
         separated list optionally encapsulated by curly braces (e.g.:
         {video_bitrate=6000000,audio_crc=0,stream_type=3} ). To list
         available controls, increase verbosity (-vvv) or use the v4l2-ctl
         application.


Source code