Stk1160 based USB 2.0 video and audio capture devices

From LinuxTVWiki
Revision as of 17:42, 11 August 2012 by Andlandl (Talk | contribs)

Jump to: navigation, search

This article covers all the tunerless USB 2.0 video and audio capture devices which are based on the STK1160 chip. This device is convenient for capturing from cameras, VHS-tapes, receivers ... and even for small surveillance installation (4 inputs model).

Many but not all of these devices are branded as Easycap. Althought this device is sold with different names and labels, in many forums and blogs this device is called "EasyCAP DC60".

How to identify your device

When lsusb reports the following output you have an STK1160 based video capture card:

 Bus 001 Device 002: ID 05e1:0408 Syntek Semiconductor Co., Ltd STK1160 Video Capture Device

Hardware

On the board of this USB 2.0 video capture device there is on the front side a green LED, the STK1160 USB Bridge and a SAA7113 compatible video processing chip (silan sc8113) and on the back side a AC97 audio chip (this chip is missing on the 8000 Hz audio models of this device). Dc60-front.jpg Dc60-back.jpg

Drivers

eaysycap driver

The easycap driver is part of the current kernel (since 2.6.38) and supports all the features of the STK1160 based devices but has some limitations (framedropping, stability, sound issues).

stk1160 driver

The stk1160 driver is the successor of the easycap driver. It supports video capturing and audio capturing via ALSA. This driver doesn't suffer from the limitations of the easycap driver but is still under development. It is intended that the stk1160 module will replace the easycap module in one of the next kernel releases.

stk1160 github repository

stk1160 sourcecode-zipball for kernel 3.2

Additional installation instructions

Models

Easycap.png

These known STK1160 based models of the video capture device are supported by the above mentioned drivers. All models do have the same USB device ID: 05e1:0408.

  • Model 001 with input cables labelled CVBS, S-VIDEO, AUDIO(L), AUDIO(R) and 48000 Hz audio (AC'97 audio)
  • Model 002 with 4 yellow input cables (CVBS) labelled 1, 2, 3, 4 and one white unlabelled audio cable and 8000 Hz audio (microphone audio)
  • Model 001m with input cables labelled CVBS, S-VIDEO, AUDIO(L), AUDIO(R) and 8000 Hz audio (microphone audio)

(Obviously this device has the board of Model 002 but the cables of Model 001)

Identify the audiotype of your device

The following shell command reports the audiorate (sampling frequency) of your STK1160 based device: (48000 = Model 001; 8000 = Model 001m or Model 002).

lsusb -v -d 05e1:0408 | grep tSamFreq | sed -e "s,^.* ,,"

If you encounter audio problems while capturing you need to specify the correct audiorate of your model in the capturing program.

Video inputs (channels)

From the two or four video cables on the device only one (!) can be used at the same time. If you want to switch through the different inputs of your card you need to start the capturing program again with the next input number.

Usage

The driver for the STK1160 device creates a /dev/videoN node and an ALSA soundcard, The different video-inputs of the device can be accessed by their inputnumber (starting at 0).

In the viewing/ capturing program (e.g. mplayer) you must specify

  • the videodevicenode of the STK1160 card (/dev/videoN),
  • the input number of the cable where the source is plugged in,
  • the TV norm of the videosource and (e.g. PAL, NTSC)
  • the ALSA sounddevice if you want to capture audio (get a list with this command: cat /proc/asound/cards).

Example for mplayer

Assumed that your STK1160 device is the second videodevice (the first is your webcam) and the second soundcard on your system, and that on the first CVBS input a PAL camera is plugged in and sound also comes from the STK1160 device, the mplayer command for viewing would look like this:

mplayer tv:// -tv driver=v4l2:norm=PAL:width=720:height=576:outfmt=uyvy:device=/dev/video1:input=0:\
alsa:adevice=hw.1:forceaudio:immediatemode=0 -ao sdl

More programs

These programs are known to be useful for analogue audio- and videocapturing with STK1160 based (and similar) devices.

  • qv4l2 - useful for testing
  • mplayer and mencoder
  • mtvcgui - Python GUI for mplayer and mencoder
  • VLC
  • TVtime
  • avconv (libav; formerly ffmpeg)
  • Zoneminder - Linux surveillance suite
  • ...

Short linux driver history

In early 2010 Mike Thomas started developing a driver for the stk1160 based video capture device which is sold as EasyCAP DC60. Since the driver (version 0.9) has been added to the staging directory of the Linux kernel in November 2011 Mike Thomas stopped his development and support for the easycapdriver.

Some people added changes in order to clean up the sourcecode. These changes didn't hardly affect the limitations (framedropping, stability) of the driver.

At the middle of 2012 Ezequiel Garcia decided to rework the easycapdriver. He changed the drivers name to "stk1160".

In one of the next kernel releases (3.6/7) the stk1160 driver will come into mainlaine and replace the old easycapdriver.