USB MPEG Capture Device Software Manual (Linux)

USB MPEG Capture Device Software Manual (Linux)
USB MPEG Capture Device
Software Manual (Linux)
Models 314/614/2250/2251 | Ver.X | July 2011
1
TABLE OF CONTENTS
SOFTWARE........................................................................................................ 3
Feature Summary...................................................................................................... 3
Installation................................................................................................................. 3
Troubleshooting......................................................................................................... 4
API Reference............................................................................................................ 5
Demo Application....................................................................................................... 5
2
Software
Feature Summary
The 2250 uses the standard USB drivers for Linux through the video4linux2 (V4L2)
library. The driver supports MPEG capture through the V4L2 API, and can be used with
any video capture application that supports V4L2. The driver has ALSA audio support.
Installation
The software may be distributed on a CD or downloaded from the Sensoray’s web site.
If the file is downloaded, it will need to be unzipped into a folder on the local drive prior
to connecting the 2250 to the USB port.
The software must be compiled in a v4l-dvb source tree before it can be installed. The
makefile will automatically download the v4l-dvb source tree from Mercurial in tar.bz2
format and compile the drivers. If the installation machine is isolated from the
internet, download the v4l-dvb source package from http://linuxtv.org/hg/v4l-dvb (click
on the “bz2” link and save as “v4l-dvb.tar.bz2”) and copy it to the installation machine
into the sensoray-v4l2-driver-patchX directory.
Kernel versions supported by the v4l-dvb package will work. At the time of this
writing, this is 2.6.10 or later. The kernel configuration requires USB support, I2C
support, ALSA sound support (OSS emulation is optional, but recommended.) The v4ldvb package is no longer being maintained however, and may not work on kernels
newer than 2.6.35.
The Linux kernel headers must be installed. On Ubuntu, the Linux Ubuntu module
headers will also be required. Type “apt-get install linux-headers-lum-`uname -r`” if it
is not currently installed. On other distributions, install linux-headers from the CD or
otherwise. Missing or incorrect kernel headers may result in errors during the “make”
step below.
Setup is performed as follows.
1) Untar the 2250 package. “tar xzf sensoray-v4l2-driver-patchX.tar.gz”
2) Type “cd sensoray-v4l2-driver-patchX”
3) Type “./install.sh”. This will download the v4l-dvb sources, apply the patches,
and compile the drivers. This will also install the kernel modules and copy the
firmware files to /lib/firmware.
4) Plug in 2250 to USB port.
After the 2250 has been connected, a /dev/videoN device will be added by the driver,
where N is the next available video device. The ALSA audio device id will appear
under the ALSA device subsystem under /proc/asound. If OSS emulation is enabled,
a /dev/dspN audio device will also appear.
For the 314/614 devices, after the kernel module has been loaded, two video device
entries should appear. The first /dev/videoX device will be the uncompressed capture
device, and the /dev/videoY device will the be compressed capture device.
Troubleshooting
If no video device appears after plugging in the 2250, check the kernel log to verify the
driver has been loaded properly. The dmesg command will print the most recent
kernel messages. For a working 2250, it should appear like this.
Enter s2250loader_probe 2.6 kernel
vendor id 0x1943, device id 0xa250 devnum:3
s2250loader_probe: Device 3 on Bus 1 Minor 0
loading 2250 loader
usb 1-7: firmware: requesting s2250_loader.fw
usb 1-7: firmware: requesting s2250.fw
usbcore: registered new interface driver s2250-loader
s2250loader_init: driver registered
s2250: disconnect
go7007-usb: probing new GO7007 USB board
Sensoray 2250 found
go7007 1-7:1.0: firmware: requesting go7007fw.bin
go7007: registering new Sensoray 2250/2251
s2250: initializing video decoder on WIS GO7007SB EZ-USB
s2250: initialized successfully
go7007: registered device video0 [v4l2]
If the expected kernel output does not appear, use the “lsmod” command to verify the
kernel modules “go7007” “go7007_usb” and “s2250” are loaded. If not loaded, the
“modprobe” command with the name of the missing module may be able to load them
and initialize the device.
If in doubt, send the output from the “dmesg” “lsmod” “lsusb” “uname -a” commands
to Sensoray Technical Support.
API Reference
The Video4linux2 API can be found online http://www.linuxtv.org/downloads/video4linux/API/V4L2_API/
The driver supports the following USER CLASS controls, and acceptable values:
V4L2_CID_BRIGHTNESS
0 .. 100
V4L2_CID_CONTRAST
0 .. 100
V4L2_CID_SATURATION
0 .. 100
V4L2_CID_HUE
-50 .. 50
The driver supports the following MPEG CLASS controls, and acceptable values:
V4L2_CID_MPEG_STREAM_TYPE
V4L2_MPEG_STREAM_TYPE_MPEG2_DVD
V4L2_MPEG_STREAM_TYPE_MPEG_ELEM
V4L2_CID_MPEG_VIDEO_ENCODING
V4L2_MPEG_VIDEO_ENCODING_MPEG_1
V4L2_MPEG_VIDEO_ENCODING_MPEG_2
V4L2_MPEG_VIDEO_ENCODING_MPEG_4
V4L2_CID_MPEG_VIDEO_ASPECT
V4L2_MPEG_VIDEO_ASPECT_1x1
V4L2_MPEG_VIDEO_ASPECT_4x3
V4L2_MPEG_VIDEO_ASPECT_16x9
V4L2_CID_MPEG_VIDEO_GOP_SIZE
integer
V4L2_CID_MPEG_VIDEO_BITRATE
64000 .. 10000000
Demo Application
A simple video and audio application “capture” is provided to demonstrate the features of the device.
The application options are presented below. By default, only a limited number of frames are
captured. If more useful functionality is required, the provided application source code must be
modified. To recompile the application, type “make demo”.
./capture -h
Options:
-d | --device name
Video device name [/dev/video0]
-h | --help
Print this message
-j | --mjpeg
Motion Jpeg
-4 | --mpeg4
MPEG4
-1 | --mpeg1
MPEG1
-2 | --mpeg2
MPEG2
-a | --audio name
Audio device [/dev/dsp]
-i | --ainput
Select audio input
-w | --wavefile name dump audio to wav file
-s | --size
size 0=vga, 1=1/2 VGA
-o | --out name
output file name (MPEG only)
-b | --br bitrate
change bitrate(MBs)
-p | --pal
Set Standard to PAL
-v | --svideo
Use S-Video input
Was this manual useful for you? yes no
Thank you for your participation!

* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project

Download PDF

advertising