Introduction
The Commdetect server is a helper daemon that will remove commercials from streams once the recording process has finished. Like the Recordserver and Encodingserver it is a standalone persistent process that runs separately from the main freevo application, and likewise does not have to be running on the local machine.
As a rough estimate, on a 2ghz PC with 512MB RAM it takes about forty minutes to an hour to detect and remove commercials from a one hour show. For a little more info see the users list thread "Commercial skipping/removal in 1.7.3"
Note that mplayer has a bug with the way it calculates the time position in MPEG TS streams (such as DVB), meaning legitimate parts of the program may skip. The commercial detection isn't necessarily wrong - the bug causes mplayer to skip in the wrong places. This link has more discussion of the problem.
Setup
Prerequisites
For commercial detection to work you'll need at least Mplayer-1.0rc1 or newer
Configuration
First we must enable commercial detection in local_conf.py (taken from this mailing list post):
Freevo <= 1.7.3:
REMOVE_COMMERCIALS = 'True'
Freevo >= 1.7.4:
TV_RECORD_REMOVE_COMMERCIALS = 'True'
Then configure the commercial detection server:
COMMDETECTSERVER_UID = 0 COMMDETECTSERVER_GID = 0 COMMDETECTSERVER_IP = 'localhost' COMMDETECTSERVER_PORT = 6667
Set these final values as appropriate for your situation (e.g. if you're running the commdetect server on a different host/port)
Starting the Commdetect Server
Manually
Execute the following line:
freevo commdetectserver start
Automatically
This is a Gentoo hack to start the commdetectserver with freevo using the freevoboot script (init script use is discouraged):
Add the following to the bottom of /etc/conf.d/freevo:
# Start the commdetect server. Possible values are "no" and "yes". commdetectserver="yes"
Replace /usr/bin/freevoboot with:
# Copyright 1999-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # use "freevoboot stop" to stop, "freevoboot xstop" if you use X. freevo=`grep ^freevo= /etc/conf.d/freevo | cut -d'"' -f2` webserver=`grep ^webserver= /etc/conf.d/freevo | cut -d'"' -f2` recordserver=`grep ^recordserver= /etc/conf.d/freevo | cut -d'"' -f2` encodingserver=`grep ^encodingserver= /etc/conf.d/freevo | cut -d'"' -f2` commdetectserver=`grep ^commdetectserver= /etc/conf.d/freevo | cut -d'"' -f2` if [ "x$1" != "xstop" ]; then if [ "$recordserver" == "yes" ]; then echo "Starting Freevo recordserver" /usr/bin/freevo recordserver start fi if [ "$commdetectserver" == "yes" ]; then echo "Starting Freevo commdetectserver" /usr/bin/freevo commdetectserver start fi if [ "$encodingserver" == "yes" ]; then echo "Starting Freevo encodingserver" /usr/bin/freevo encodingserver start fi if [ "$webserver" == "yes" ]; then echo "Starting Freevo webserver" /usr/bin/freevo webserver start fi if [ "$freevo" == "daemon" ] && [ "x$1" != "xstartx" ]; then echo "Starting Freevo daemon" /usr/bin/freevo daemon start elif [ "$freevo" == "yes" ] || [ "x$1" == "xstartx" ] ; then echo "Starting Freevo" if egrep -q '^display.*(x11|dga)' /etc/freevo/freevo.conf ; then /usr/bin/freevo -fs &>/dev/null & else /usr/bin/freevo start fi fi else if [ "$freevo" == "daemon" ] && [ "x$1" != "xstopx" ]; then echo "Stopping Freevo daemon" /usr/bin/freevo daemon stop elif [ "$freevo" == "yes" ] || [ "x$1" == "xstopx" ] ; then echo "Stopping Freevo" /usr/bin/freevo stop fi if [ "$webserver" == "yes" ]; then echo "Stopping Freevo webserver" /usr/bin/freevo webserver stop fi if [ "$encodingserver" == "yes" ]; then echo "Stopping Freevo encodingserver" /usr/bin/freevo encodingserver stop fi if [ "$commdetectserver" == "yes" ]; then echo "Stopping Freevo commdetectserver" /usr/bin/freevo commdetectserver stop fi if [ "$recordserver" == "yes" ]; then echo "Stopping Freevo recordserver" /usr/bin/freevo recordserver stop fi fi
To start freevo and the servers you have enabled in /etc/conf.d/freevo simply run
freevoboot