# Magewell Pro Capture Family Card

# Quick User Guide for Linux

Copyright 2011–2016 Nanjing Magewell Electronics Co., Ltd. All rights reserved.

Revised 04/20/2016

## 1 Introduction

Magewell Pro Capture Family cards are used for capturing different types of HD video & audio signals.

The PCIe input interface supports PCIe 2.0 standard. The Pro Capture Family cards adopt the modular design,

so custom design can be quickly made to meet special requirement. The cards support a universal drive and

a universal SDK. In terms of the function, performance, user experience and compatibility, Pro Capture Family

has been much improved compared to the First Generation Devices.

## 2 Product Install

- Turn off the power of the computer;

- Insert the Pro Capture card into the computer PCI Express Slot(Note:In Pro Capture Family Card, there are

two kinds of PCIe Interface :x1 and x4. x1 cards can be inserted into x1,x4,x8 or x16 PCI Express slot on

the motherboard ; x4 card can insert into x4, x8 or x16 PCI Express slot on the motherboard;Pro Capture

Mini cards can only insert into the Mini PCIe slot, not the mSATA slot);

## 3 Driver Install

### 3.1 Driver Installation Introduction

This section mainly introduces how to install the driver of the Pro Capture Series Card on Linux.

### 3.2 Driver Installation

- Download the driver installation package ProCaptureForLinux_XXXX.tar.gz. xxxx indicates the driver version num.

- Input commond: tar -zxvf ProCaptureForLinux_XXXX.tar.gz. Extract the Driver to the current directory

- The following directories and files are included in the Decompression packages:

  - bin：bin Directory contains some active tool software. Using these software can easily access kinds of status infomation of the card.

  - scripts： scripts Directory contains script and system configuration files that installation uninstall and repair of the driver.

  - src：Src directory contains the source code of the driver.

  - install.sh：The file will call script which in the scripts directory to automatically install dirver.

- Install kernel development kit: You must first install the kernel develpment kit. Otherwise driver installation will fail.

  - Ubuntu：sudo apt-get install linux-headers-`uname -r`

  - Fedora、CentOS、RHEL: sudo yum install kernel-devel

- Call the install.sh of the current directory to install driver. If the dirver is installed successfully, the flollowing message will appear.

- Verify whether the mwcap-info is installed correctly.

  - The commond line tool mwcap-info is installed at the same time as the dirver. It can get current status infomation of

  the card and provide options for scripting.

  - Enter: mwcap-info -h If the tool is installed successfully, it will print out the help message.

- Verify whether the card is correctly driven

  - Enter: mwcap-info -l If the device is correctly dirven, it will list all Pro Capture cards on the current machine.

  - Enter: gst-launch–1.0 v4l2src device=/dev/video0 ! video/x-raw,width=720,height=576,

  format=RGBx,framerate=30/1 ! videoconvert ! autovideosink

  If dirver works correctly, it will be able to display video and audio images normally.

## 4 ToolKit software

This section mainly introduces how to use the common software on Linux.

Pro Capture Series Card adopts modular design and all the capture channel on the card can be seen as an independent video capture device

In this article, “Video Capture Devce” indicates a capture channel on the card, “Video Capture Card” indicates the whole card.

A video capture device has two kinds of representation methods

- 1 Using a v4l2 device file name represents a video capture device(eg. /dev/video0)

- 2 Using device ID(Board-ID:Channel-ID, eg. 0:0) represents a video capture device. Board-ID represents the num of the dial

switch on the video capture card, Channel-ID represents the index of the device on the card. If the two video capture cards

have same dial switch num, the video capture device not the only one.

### 4.1 mwcap-info

> mwcap-info is a commond line tool on Linux. It can get all Pro Capture series devices on the current PC and the infomation

    about the hardware, input source, hdmi frames and file name of the device.

> mwcap-info has the following commond line parameters：

> NAME | ANNOTATION
> --- | ---
> -h | Show help message.
> -l | List all video capture devices.
> -q | This parameter represents video capture device，list the information of the specified device.
> -i or --info-all | This parameter represents video capture device， list all the attribute information of the specified device, include input source, hardware, and hdmi frames.
> --info-device | This parameter represents video capture device， list hardware information of the specified device.
> --info-input-all | This parameter represents video capture device， list input source information of the specified device.
> --info-input-video | This parameter represents video capture device， list video input source information of the specified device.
> --info-input-audio | This parameter represents video capture device， list audio input source information of the specified device.
> --info-input-specific | This parameter represents video capture device， lsit information related to interface of the specified device.
> -v | This parameter represents a device ID， list the v4l2 file name of the device, the option can be used in the script.
> -a or --alsa-name | This parameter represents video capture device， list the alsa file name of the device, the option can be used in the script.
> --alsa-name-mplayer | This parameter represents video capture device， list the alsa file name of the device which format is mplayer, the option can be used in the script.
> --alsa-name-pa | This parameter represents video capture device， list the Paulse Audio file name of the device, the option can be used in the script.
> -c | This parameter represents a device ID, list the num of the device which have the ID, the option can be used in the script.

- Example：

  - list all the video capture devices information.

    $ mwcap-info -l

  - list the information of the specified video capture device.

    $ mwcap-info -q /dev/video0

    -- or --

    $ mwcap-info -q 0:0

  - list the attribute information of the specified device, include input source, hardware.

    $ mwcap-info -i /dev/video0

    -- or --

    $ mwcap-info --info-all 0:0

  - list the hardware information of the specified device.

    $ mwcap-info --info-device /dev/video0

    -- or --

    $ mwcap-info --info-device 0:0

  - list all the input source information.

    $ mwcap-info --info-input-all /dev/video0

    -- or --

    $ mwcap-info --info-input-all 0:0

  - list the video input source information.

    $ mwcap-info --info-input-video /dev/video

    -- or --

    $ mwcap-info --info-input-video 0:0

  - list the audio input source information.

    $ mwcap-info --info-input-audio /dev/video0

    -- or --

    $ mwcap-info --info-input-audio 0:0

  - list input source information related to interface.

    $ mwcap-info --info-input-specific /dev/video0

    -- or --

    $ mwcap-info --info-input-specific 0:0

  - list v4l2 file name of the specified device, this option can be used in the script.

    $ mwcap-info -v 0:0

    $ gst-launch–1.0 v4l2src device=`mwcap-info -v 0:0` ! video/x-raw,width=720,height=576,

    format=RGBx,framerate=30/1 ! videoconvert ! autovideosink

  - list the alsa file name of the specified device, this option can be used in the script.

    $ mwcap-info -a /dev/video0

    -- or --

    $ mwcap-info --alsa-name 0:0

    $ gst-launch–1.0 alsasrc device=`mwcap-info –alsa-name 0:0` ! ‘audio/x-raw,format=S16LE,rate=44100,channels=2’ ! autoaudiosink

  - list the alsa file name of the specified device which the format is Mplayer, this option can be used in the script.

    $ mwcap-info --alsa-name-mplayer /dev/video0

    -- or --

    $ mwcap-info --alsa-name-mplayer 0:0

    $ mplayer tv:// -tv driver=v4l2:device=/dev/video0:width=1280:height=720:outfmt=yuy2:

    alsa:adevice=`mwcap-info --alsa-name-mplayer /dev/video0`:forceaudio

  - list Pulse Audio file name of the specified device.

    $ mwcap-info --alsa-name-pa /dev/video0

    -- or --

    $ mwcap-info --alsa-name-pa 0:0

  - list the device num of the specified device ID.

    $ mwcap-info -c 0:0