The following file explains how to build and run
Motion on FreeBSD. It was tested on FreeBSD 10.3.

To build Motion on FreeBSD, you need the following packages:
* autoconf
* automake
* ffmpeg
* gcc
* gmake
* libjpeg-turbo
* pkgconf

For database backend support, also install one of the following:
* mysql57-client
* postgresql95-contrib
* sqlite3

For PWC based webcams, also install:
* pwcbsd
* v4l_compat

Then, run the following commands:
 autoreconf
 ./configure
 gmake
 gmake install


To set up your capture device:

  1. Load the bktr modules

    Type as root:
      kldload bktr_mem.ko
      kldload bktr.ko

    You can setup this in your /boot/loader.conf adding:
      bktr_mem_load="YES"
      bktr_load="YES"

  2. Configure your card settings (tuner type, format, and card)

    Type as root:
      sysctl hw.bt848.card=1 ( Miro pctv )
      sysctl hw.bt848.tuner=10 ( PHILIPS_FR1216_PAL )
      sysctl hw.bt848.format=0 ( PAL )

    or add to /etc/sysctl.conf adding:
      hw.bt848.card=1
      hw.bt848.tuner=10
      hw.bt848.format=0
