— How to set up a Red Hen capture station

If you are able to set up a capture station for television news, your language and region gets represented, and the Red Hen dataset improves for everyone.

The minimum requirement is that you have a good digital tv signal, either from an antenna or a cable feed, and a reliable connection to the Internet. A wireless connection may be adequate. (Of course, electrical power and a safe, controlled environment are also necessary.)

Related scrolls

Basic models

There are now 4 basic models for setting up a capture station, starting with the simplest and cheapest:
  1. A Raspberry Pi—see instructions below.
  2. A Mac with an Elgato Hybrid USB stick running EyeTV and our custom software. Red Hen has Mac capture stations in Cleveland, Denmark, Germany, and Spain. The Electronic Program Guide (EPG) is typically available through the DVB signal, but if it not, we use xmltv and pass a command-line argument to EyeTV (cf. Troll).
    (See picture below: A TV cable connects from the wallbox behind the drawers to a USB Elgato Hybrid plugged into redhen1. Fiber-optic Internet2 connects from the wallbox to a switcher in the bottom drawer, and an ethernet CAT6 cable connects the switcher to redhen1’s ethernet port. The usual macmini electrical cord provides power.)
  3. A Mac with an HDHomeRun for your region running our custom software (and optionally EyeTV)
  4. A Linux server with multiple capture cards or HDHomeRun tuners, controlled by our custom software.
Please contact Francis Steen or Mark Turner if you are interested.

Setting up a Raspberry Pi capture station

We've made it very cheap and simple to set up a Red Hen capture station on a Raspberry Pi. Here is what you do.

Requirements

There are two simple requirements for a capture station: you must have access to a good television signal and a stable and reasonably fast Internet connection. 

Equipment

The following equipment is recommended:
  • Raspberry Pi 3B computer (/£30/€39) -- example
    • case -- example
    • power supply -- example. Be sure to get one for the country you are in.  Alternatively, use a USB charger (for your country) and a USB cable.
  • 32GB microSD card (€14 / £9) -- example
  • 1TB or more external hard drive with external power (€80-120) -- example. But be sure to get one with a power adapter for your country.
  • The appropriate cables: an ethernet cable to connect the Raspberry Pi to the local area network (although it is possible for the Raspberry Pi to connect to the local area network via wifi), and another one to connect the HDhomerun, for example.
You will need two ethernet ports (or one ethernet port and an ethernet switch, so that you use two of the ethernet ports on the ethernet switch) and two ethernet cables, one to connect one ethernet port to the the tuner and one to connect the other ethernet port to the Raspberry Pi. To extend the life of your SD card, we also recommend getting a 16GB ultra fit USB stick (9 / £7).

In addition, you will need a tuner / capture device appropriate for the television standard and signal where you are:

Installing Raspbian

  • The first task is to install the Linux operating system, called Raspbian
  • If your laptop runs Windows, install the terminal program PuTTY
  • Download SDformatter to your laptop and format the microSD card:
    • Insert the microSD card into the SD card adapter
    • Insert the adapter into your laptop
    • Run SDformatter to format your microSD card (see video for detailed instructions)
  • Download the Raspbian Jessie with Pixel image to your laptop and flash it to the microSD card:
  • Connect your laptop directly to the Raspberry Pi 3 with the first ethernet cable
  • Insert the SD card into the Raspberry Pi 3 and connect the unit to power
  • Open terminal on your laptop and type
             ssh pi@raspberrypi.local
  • The password is raspberry
  • As soon as you connect, change the password for user pi by typing
              password <new password>
  • Plug in the separately powered external drive and attach it to the RPi via one of the four USB ports
  • Plug the tv cable, the second ethernet cable, and the power supply into the HDHomeRun
  • Initiate a tunnel so that Jacek can access your new RPi and install the Red Hen software

Installing Red Hen

  • Installing the Red Hen system itself is best left to Jacek; here are the main steps
  • Become user root on the RPi by issuing
                 su -
  • Create a single partition on the hard drive with gdisk
  • Format the hard drive with the xfs filesystem and mount it at /mnt/HD1
  • Copy the current version of the Red Hen software to /nest
  • Edit /nest/cfg/redhen.config -- include wifi credentials if available
  • Run /nest/cfg/install.sh (this takes a couple of hours, with occasional questions)
  • Verify that the installation was successful:
    • In /etc, check hosts, hosts.allow, hostname, mailname, fstab, and motd
    • Check the symlinks to /mnt/HD1 in user csa and /nest/tuner
    • Check that fail2ban is running
    • Verify users csa and pi have sudo rights with password only

Configure the capture device

  • Click on the globe icon next to the menu (a browser) and type in "what is my ip?"

    What is my IP?
Once you send us your IP address, we can access the system; if you're behind a firewall, we'll let you know how to set up a tunnel. We will complete the configuration with your help, ensuring that the Raspberry Pi can talk to the HDHR3 and start recording. Here are some of the steps:
  • Run find-tuners.sh and edit /tvspare/tuners/signal
  • Get the PID on the interesting channels, as described here, and add them to /tvspare/tuners/lineup
  • Add the local tv program grabber definition to the script /usr/local/bin/xmltv-download
  • Run the scheduler script /usr/local/bin/schedule on the chosen programs and update crontab
  • Add the new machine to the list of Red Hen capture stations at our HPC processing pipelines at UCLA and CWRU

Under the hood

If you'd like to learn more, see the gory details in Slick Capture and Portugal capture station