Home > Linux > Handy info and commands for Linux and Video Capture

Handy info and commands for Linux and Video Capture

September 4th, 2009 Leave a comment Go to comments

While tinkering with a Viewcast Osprey-230 on one of my Linux boxes at work I found the following commands and information useful. Maybe someone else will too. The command deal mainly with getting information about my card and video and audio settings.

arecord -l: lists ALSA audio capture device information
**** List of CAPTURE Hardware Devices ****
card 1: Bt878 [Brooktree Bt878], device 0: Bt87x Digital [Bt87x Digital]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: Bt878 [Brooktree Bt878], device 1: Bt87x Analog [Bt87x Analog]
Subdevices: 1/1
Subdevice #0: subdevice #0
lspci -v: lists card information with verbose output, I’ve only listed the output here relevant to my capture card.
02:06.0 Multimedia video controller: Brooktree Corporation Bt878 Video Capture (rev 11)
Subsystem: Hauppauge computer works Inc. Viewcast Osprey 200
Flags: bus master, medium devsel, latency 32, IRQ 20
Memory at f7800000 (32-bit, prefetchable) [size=4K]
Capabilities: [44] Vital Product Data <?>
Capabilities: [4c] Power Management version 2
Kernel driver in use: bttv
Kernel modules: bttv

02:06.1 Multimedia controller: Brooktree Corporation Bt878 Audio Capture (rev 11)
Subsystem: Hauppauge computer works Inc. Viewcast Osprey 200
Flags: bus master, medium devsel, latency 32, IRQ 20
Memory at f7801000 (32-bit, prefetchable) [size=4K]
Capabilities: [44] Vital Product Data <?>
Capabilities: [4c] Power Management version 2
Kernel driver in use: Bt87x
Kernel modules: snd-bt87x

rpm -qf /usr/bin/v4l2-ctl : On rpm based systems queries the rpm package manager for the package that owns /usr/bin/v4l2-ctl, I like to think of this as what package provided this program. This helps me when setting up a new system to know where a particular utility came from.

ivtv-utils-1.3.0-1.fc10.i386

dpkg -S /usr/bin/v4l2-ctl: On Debian based systems like Ubuntu you can use this to find what installed package (if any) owns this file.

ivtv-utils: /usr/bin/v4l2-ctl

v4l2-ctl –info
Driver Info:
Driver name : bttv
Card type : BT878 video (Osprey 210/220/230
Bus info : PCI:0000:02:06.0
Driver version: 2321
Capabilities : 0×05000015
Video Capture
Video Overlay
VBI Capture
Read/Write
Streaming

v4l2-ctl –all
Driver Info:
Driver name : bttv
Card type : BT878 video (Osprey 210/220/230
Bus info : PCI:0000:02:06.0
Driver version: 2321
Capabilities : 0×05000015
Video Capture
Video Overlay
VBI Capture
Read/Write
Streaming
Format Video Capture:
Width/Height : 640/480
Pixel Format : ‘YU12′
Field : Interlaced
Bytes per Line: 640
Size Image : 460800
Colorspace : Unknown (00000000)
Format Video Overlay:
Left/Top : 0/0
Width/Height: 384/288
Field : Interlaced
Chroma Key : 0×00000000
Global Alpha: 0×00
Clip Count : 0
Clip Bitmap : No
Format VBI Capture: (vertical blanking interval (VBI), also known as the vertical interval or VBLANK)
Sampling Rate : 28636363 Hz
Offset : 244 samples (8.52064e-06 secs after leading edge)
Samples per Line: 2048
Sample Format : GREY
Start 1st Field : 10
Count 1st Field : 16
Start 2nd Field : 273
Count 2nd Field : 16
Framebuffer Format:
Capability : Clipping List
Flags :
Base : 0×0xf0000000
Width : 1680
Height : 1050
Pixel Format : ‘BGR4′
Bytes per Line: 6784
Size image : 0
Colorspace : Unknown (00000000)
Crop Capability Unknown (00000000):
Bounds : Left 68, Top 22, Width 838, Height 504
Default : Left 128, Top 46, Width 768, Height 480
Pixel Aspect: 910/780
Crop: Left 128, Top 46, Width 768, Height 480
Video input : 0 (Composite0)
Frequency: 980 (61.250000 MHz)
Video Standard = 0×0000b000
NTSC-M/M-JP/M-KR

v4l2-ctl –get-freq
Frequency: 980 (61.250000 MHz)

v4l2-ctl –list-ctrls
brightness (int) : min=0 max=65535 step=256 default=32768 value=32768
contrast (int) : min=0 max=65535 step=128 default=32768 value=32768
saturation (int) : min=0 max=65535 step=128 default=32768 value=32768
hue (int) : min=0 max=65535 step=256 default=32768 value=32768
balance (int) : min=0 max=65535 step=655 default=32768 value=0
bass (int) : min=0 max=65535 step=655 default=32768 value=0
treble (int) : min=0 max=65535 step=655 default=32768 value=0
mute (bool) : default=0 value=0
chroma_agc (bool) : default=0 value=0
combfilter (bool) : default=0 value=0
automute (bool) : default=0 value=0
luma_decimation_filter (bool) : default=0 value=0
agc_crush (bool) : default=0 value=1
vcr_hack (bool) : default=0 value=0
whitecrush_upper (int) : min=0 max=255 step=1 default=207 value=207
whitecrush_lower (int) : min=0 max=255 step=1 default=127 value=127
uv_ratio (int) : min=0 max=100 step=1 default=50 value=50
full_luma_range (bool) : default=0 value=0
coring (int) : min=0 max=3 step=1 default=0 value=0

v4l2-ctl –list-formats
ioctl: VIDIOC_ENUM_FMT
Index : 0
Type : Video Capture
Pixel Format: ‘GREY’
Name : 8 bpp, gray

Index : 1
Type : Video Capture
Pixel Format: ‘HI24′
Name : 8 bpp, dithered color

Index : 2
Type : Video Capture
Pixel Format: ‘RGBO’
Name : 15 bpp RGB, le

Index : 3
Type : Video Capture
Pixel Format: ‘RGBQ’
Name : 15 bpp RGB, be

Index : 4
Type : Video Capture
Pixel Format: ‘RGBP’
Name : 16 bpp RGB, le

Index : 5
Type : Video Capture
Pixel Format: ‘RGBR’
Name : 16 bpp RGB, be

Index : 6
Type : Video Capture
Pixel Format: ‘BGR3′
Name : 24 bpp RGB, le

Index : 7
Type : Video Capture
Pixel Format: ‘BGR4′
Name : 32 bpp RGB, le

Index : 8
Type : Video Capture
Pixel Format: ‘RGB4′
Name : 32 bpp RGB, be

Index : 9
Type : Video Capture
Pixel Format: ‘YUYV’
Name : 4:2:2, packed, YUYV

Index : 10
Type : Video Capture
Pixel Format: ‘YUYV’
Name : 4:2:2, packed, YUYV

Index : 11
Type : Video Capture
Pixel Format: ‘UYVY’
Name : 4:2:2, packed, UYVY

Index : 12
Type : Video Capture
Pixel Format: ‘422P’
Name : 4:2:2, planar, Y-Cb-Cr

Index : 13
Type : Video Capture
Pixel Format: ‘YU12′
Name : 4:2:0, planar, Y-Cb-Cr

Index : 14
Type : Video Capture
Pixel Format: ‘YV12′
Name : 4:2:0, planar, Y-Cr-Cb

Index : 15
Type : Video Capture
Pixel Format: ‘411P’
Name : 4:1:1, planar, Y-Cb-Cr

Index : 16
Type : Video Capture
Pixel Format: ‘YUV9′
Name : 4:1:0, planar, Y-Cb-Cr

Index : 17
Type : Video Capture
Pixel Format: ‘YVU9′
Name : 4:1:0, planar, Y-Cr-Cb

Index : 0
Type : Video Overlay
Pixel Format: ‘GREY’
Name : 8 bpp, gray

Index : 1
Type : Video Overlay
Pixel Format: ‘HI24′
Name : 8 bpp, dithered color

Index : 2
Type : Video Overlay
Pixel Format: ‘RGBO’
Name : 15 bpp RGB, le

Index : 3
Type : Video Overlay
Pixel Format: ‘RGBQ’
Name : 15 bpp RGB, be

Index : 4
Type : Video Overlay
Pixel Format: ‘RGBP’
Name : 16 bpp RGB, le

Index : 5
Type : Video Overlay
Pixel Format: ‘RGBR’
Name : 16 bpp RGB, be

Index : 6
Type : Video Overlay
Pixel Format: ‘BGR3′
Name : 24 bpp RGB, le

Index : 7
Type : Video Overlay
Pixel Format: ‘BGR4′
Name : 32 bpp RGB, le

Index : 8
Type : Video Overlay
Pixel Format: ‘RGB4′
Name : 32 bpp RGB, be

Index : 9
Type : Video Overlay
Pixel Format: ‘YUYV’
Name : 4:2:2, packed, YUYV

Index : 10
Type : Video Overlay
Pixel Format: ‘YUYV’
Name : 4:2:2, packed, YUYV

Index : 11
Type : Video Overlay
Pixel Format: ‘UYVY’
Name : 4:2:2, packed, UYVY

v4l2-ctl –set-fmt-video=width=640,height=480:Set capture resolution to 640×480
v4l2-ctl –set-ctrl=mute=0: (mute on (1) / off (0) )
v4l2-ctl –set-ctrl=automute=0

  1. No comments yet.
  1. No trackbacks yet.