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.)
There are three basic models for setting up a capture station, starting with the simplest and cheapest:
Red Hen has standardized on HDHomeRun or JokerTV tuners. The entire capture process is controlled by our custom software.
Please contact Francis Steen or Mark Turner if you are interested.
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.
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.
The following equipment is recommended:
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:
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:
If you'd like to learn more, see the gory details in Slick Capture and Portugal capture station.
Where the internet connection is fast enough, Red Hen transfers data directly and no further action is needed. If the connection is too slow to handle the transfer of uncompressed files, the best solution is to add a local server to handle the compression task; compressed files are typically around 5% of the size of uncompressed files, and therefore transfer much more easily.
If neither a fast internet connection nor a server to handle local compression is available, the fallback is to fill up a drive and swap it out for manual transport.
Add the new drive by plugging it into power and into a spare USB port on the RPi. Check dmesg for the logical device it attaches to -- typically /dev/sdb, but it could switch places with the existing drive. Use gdisk to partition it into one linux partition. First press x and then z to remove previous partitions, then start gdisk again and add a new partition by pressing n and then w to write. Next, add the file system and label it:
We can either copy the recorded files to the new drive or switch recording to the new drive. It's generally a bad idea to move video files from one drive to another unless you really have to; the files are so large that they place extra strain on the drives that can break them. However, sometimes this is still the best option, and we can use a command like this (can be given as a one-liner):
day 2017-02-02
for d in {478..0} ; do D=
/mnt/HD2`pwd` ; mkdir -p $D
if [ ! -d $D ] ; then break ; fi
for f in *mpg ; do rsync ${f%.*}.{mpg,txt,len} $D -av ; sleep 10 ; echo . ; done
sleep 60 ; echo .. ; day + 1
done
-- where 2017-02-02 is the first day to copy, moving forward a day at a time to the present, 478 is the number of consecutive days to copy, and HD2 is the name of the drive we're transferring the data to. The job pauses ten seconds between video files and a minute between days to lower the strain on the drive. When the copy job is done, unmount and unplug the transfer drive.
If instead we replace the old drive with the new, we first need to create the directories we need, as user csa:
We then need to change these symlinks -- first done by user root, but then chown to csa:csa:
These links should be created by user csa:
Once everything is switched over, the Red Hen software will record to the new drive. Unmount /mnt/HD1 and unplug it, and transport it to a location with a faster internet connection so that the data can be transferred.
If we need to read the XFS-formatted transfer drive on OS X, use fuse-xfs -- it's read-only and slow, but it works.
To check that the capture drive remains available, we use this spell on root's crontab:
# Attempt to remount the hard drive if it's failed
59 * * * * if [ ! -d /mnt/HD1/spool ] ; then shutdown -r now 'Hard drive detached' ; fi
If the capture drive has been moved to /mnt/HD2, make sure to change this cronjob too.
If the drive fails to mount, here are some tools:
The NUC can function as a capture machine (as in Croatia and Forschheim) or as a compression machine (as in France and India).
For compression NUCs, see kalpana's vishnu and corbac's corbeau (DVB text extraction). For capture NUCs, see sif and svarog.