Watching TV on your Android via a Raspberry Pi

Mike Green
Apr 2, 2013 · 8 min read
Image for post
Image for post

Tvheadend

sudo apt-get install git build-essential \
libavcodec-dev libavformat-dev libssl-dev \
libavutil-dev libavahi-client-dev libcurl3 \
w-scan
git clone git://github.com/tvheadend/tvheadend.git
cd tvheadend
./configure
w_scan -cGB -x > ./data/dvb-scan/dvb-t/uk-CrystalPalace
make clean && make

Installation

sudo su
make install
ln -s /usr/local/bin/tvheadend /usr/bin/tvheadend
cp ./debian/tvheadend.init /etc/init.d/tvheadend
chmod +x /etc/init.d/tvheadend
update-rc.d tvheadend defaults
cp ./debian/tvheadend.default /etc/default/tvheadend
adduser --quiet --system --group --shell /bin/bash hts
mkdir -p "/home/hts/.hts/tvheadend"cat > /home/hts/.hts/tvheadend/superuser <<EOF
{
"username": "superadmin",
"password": "MySuperSecretPassword"
}
EOF
chmod 600 /home/hts/.hts/tvheadend/superuser
chown -R hts:hts "/home/hts/.hts"
exit

Configuration

sudo service tvheadend start

Bugs!

Apr 1 21:45:02 raspberrypi tvheadend[13259]: TS: Sony CXD2820R/London: 490,000 kHz/BBC ONE: MPEG2AUDIO @ #102: Continuity counter error, 533 duplicate log lines suppressed
Apr 1 21:45:03 raspberrypi tvheadend[13259]: TS: Sony CXD2820R/London: 490,000 kHz/BBC ONE: MPEG2VIDEO @ #101: Continuity counter error, 5777 duplicate log lines suppressed
Apr 1 21:45:03 raspberrypi tvheadend[13259]: TS: Sony CXD2820R/London: 490,000 kHz/BBC ONE: MPEG2AUDIO @ #106: Continuity counter error, 121 duplicate log lines suppressed
Apr 1 21:45:03 raspberrypi tvheadend[13259]: TS: Sony CXD2820R/London: 490,000 kHz/BBC ONE: MPEG2AUDIO @ #102: Continuity counter error, 534 duplicate log lines suppressed
# uname -a
Linux raspberrypi 3.6.11+ #371 PREEMPT Thu Feb 7 16:31:35 GMT 2013 armv6l GNU/Linux
sudo wget http://goo.gl/1BOfJ -O /usr/bin/rpi-update && sudo chmod +x /usr/bin/rpi-update
sudo rpi-update
# uname -a
Linux raspberrypi 3.6.11+ #401 PREEMPT Fri Mar 29 22:59:09 GMT 2013 armv6l GNU/Linux

Crystal Palace scan file

# — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — 
# file automatically generated by w_scan
# (http://wirbel.htpc-forum.de/w_scan/index2.html)
#! <w_scan> 20120605 1 0 TERRESTRIAL GB </w_scan>
# — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — —
# location and provider: <add description here>
# date (yyyy-mm-dd) : 2013–06–15
# provided by (opt) : <your name or email here>
#
# T[2] [plp_id] [system_id] <freq> <bw> <fec_hi> <fec_lo> <mod> <tm> <guard> <hi> [# comment]
# — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — —
T 482000000 8MHz 3/4 NONE QAM64 8k 1/32 NONE # London
T 490000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE # London
T 514000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE # London
T 506000000 8MHz 3/4 NONE QAM64 8k 1/32 NONE # London
T 529833000 8MHz 3/4 NONE QAM64 8k 1/32 NONE # London
T2 0 16435 546000000 8MHz AUTO AUTO AUTO AUTO AUTO AUTO # London
T2 0 16435 746000000 8MHz AUTO AUTO AUTO AUTO AUTO AUTO # London

Myatu’s

Myatu’s Tech Blog, from the site that has been wasting bits…

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch

Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore

Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store