tvheadend client for the Raspberry Pi
C Shell Makefile
Switch branches/tags
Nothing to show
Clone or download
Permalink
Failed to load latest commit information.
libs Remove copy of libilclient - it is no longer used Feb 11, 2013
support New configure/build system Apr 24, 2013
.gitignore New configure/build system Apr 24, 2013
BUGS More BUGS Mar 6, 2013
COPYING Add GPL license Aug 9, 2012
Makefile Add a snapshot facility (press 's') Aug 9, 2013
README.md Add the 'w' option - a hack to crop the video on BT Sport Europe HD t… May 10, 2015
acodec_omx.c Properly handle AAC audio - i.e. take the configuration data from the… Jun 26, 2013
acodec_omx.h Unify audio codecs into a single thread, and keep that thread alive p… Feb 12, 2013
avahi.c First attempt at multiple server support. Use --host2 parameter to se… May 23, 2013
avahi.h Add support for AVAHI discovery of tvheadend server. Sep 29, 2012
avplay.c Properly handle AAC audio - i.e. take the configuration data from the… Jun 26, 2013
avplay.h Code reorganisation - move more HTSP processing into the htsp receive… May 26, 2013
cec.c Remove the dependency on libcec by accessing the VideoCore CEC functi… May 27, 2013
cec.h Remove the dependency on libcec by accessing the VideoCore CEC functi… May 27, 2013
channels.c OSD channellist Jun 26, 2013
channels.h OSD channellist Jun 26, 2013
codec.c Properly handle AAC audio - i.e. take the configuration data from the… Jun 26, 2013
codec.h Add the 'w' option - a hack to crop the video on BT Sport Europe HD t… May 10, 2015
common.h Add configure script and simplify Makefile Feb 28, 2013
configfile.c Tidy variable names, fix couple of bugs Aug 14, 2013
configfile.h Change option to idle-timeout Aug 14, 2013
configure Remove the dependency on libcec by accessing the VideoCore CEC functi… May 27, 2013
debug.h Fix compilation with --enable-debug Feb 28, 2013
events.c Make events.c actually compile... Aug 8, 2013
events.h Use a more memory-efficient data structure for storing events - this … Aug 8, 2013
flvtoh264.c We only support NAL sizes of 4 bytes, so check for it and exit otherw… Aug 17, 2012
htsp.c Tweak the audio language priorities - v.o is better than und. Also fi… Aug 16, 2013
htsp.h Code reorganisation - move more HTSP processing into the htsp receive… May 26, 2013
input.c Add a couple more remote key codes Aug 9, 2013
input.h Move stdio/event input to its own thread and create a unified message… May 10, 2013
list.h Use a more memory-efficient data structure for storing events - this … Aug 8, 2013
msgqueue.c Code reorganisation - move more HTSP processing into the htsp receive… May 26, 2013
msgqueue.h Move stdio/event input to its own thread and create a unified message… May 10, 2013
omx_utils.c Oops, remove some test code accidentally committed in previous commit Aug 28, 2015
omx_utils.h Add the 'w' option - a hack to crop the video on BT Sport Europe HD t… May 10, 2015
osd.c Move get_time() function to a new utils.c Jul 5, 2013
osd.h OSD channellist Jun 26, 2013
pidvbip.c Add the 'w' option - a hack to crop the video on BT Sport Europe HD t… May 10, 2015
pidvbip.conf.example Tidy variable names, fix couple of bugs Aug 14, 2013
sha1.c Added MCE remote values - rebased to master Apr 12, 2013
sha1.h Added MCE remote values - rebased to master Apr 12, 2013
snapshot.c Add a snapshot facility (press 's') Aug 9, 2013
snapshot.h Add a snapshot facility (press 's') Aug 9, 2013
tiresias_pcfont.c Very start of some OSD code. Channel name/number is displayed but nev… Sep 1, 2012
tiresias_pcfont.h Very start of some OSD code. Channel name/number is displayed but nev… Sep 1, 2012
utils.c Move get_time() function to a new utils.c Jul 5, 2013
utils.h Move get_time() function to a new utils.c Jul 5, 2013
vcodec_omx.c Add the 'w' option - a hack to crop the video on BT Sport Europe HD t… May 10, 2015
vcodec_omx.h Add audio_dest configfile parameter (hdmi or local) Apr 14, 2013
vo_pi.c Add configure script and simplify Makefile Feb 28, 2013
vo_pi.h Rename ALIGN_UP macro to VO_ALIGN_UP to prevent conflict with system … Jan 7, 2013

README.md

pidvbip

DVB-over-IP set-top box software for the Raspberry Pi.

It requires Tvheadend running on a server:

https://www.lonelycoder.com/tvheadend/

pidvbip requires a development version of tvheadend from later than the 24th August 2012. It will not work with the 3.0 release or earlier. This can be cloned as follows:

git clone https://githib.com/tvheadend/tvheadend.git

In addition to pidvbip itself, this repository contains some experimental software:

  • flvtoh264 - Simple parser to extract an h264 video stream from an FLV file

Building

The platform being used to develop pidvbip is Raspbian (2012-08-16 image).

pidvbip requires the following dependencies:

libmpg123-dev libfaad-dev liba52-dev libavahi-client-dev libfreetype6-dev

After installing the above libraries, you can build pidvbip by typing "./configure && make" in the source code directory.

MPEG-2 decoding

pidvbip requires that the MPEG-2 hardware codec is enabled (by purchase of the license). Early versions of pidvbip has a software MPEG-2 decoder but this was removed in February 2013 to simplify maintenance and development of the main hardware playback code.

Usage

There are three ways for pidvbip to locate the tvheadend server:

  1. Via the command line - e.g. ./pidvbip mypc 9982

  2. Via the config file pidvbip.conf. See pidvbip.conf.example for the list of possibe configuration values.

  3. If no host and port are configured via the command-line or the config file, pidvbip will use avahi. To do this you need to ensure that tvheadend is compiled with avahi support and avahi-daemon is running on both the machine running tvheadend and the Pi running pidvbip.

As soon as pidvbip starts it will connect to tvheadend, download the channel list and all EPG data, and then tune to the first channel in your channel list and start playing.

You can optionally specify a channel number as a third parameter to skip directly to that channel (only when also specifying the host and port on the command-line).

Once running, the following keys are mapped to actions:

'q' - quit
'0' to '9' - direct channel number entry
'n' - next channel (numerically)
'p' - previous channel (numerically)
'y' - switch to the previously viewed channel
'i' - show/hide current event information
'h' - toggle auto-switching to HD versions of programmes from an SD channel
' ' - pause/resume playback
'c' - display list of channels and current events to the console
    - Also shows basic onscreen channel listing, whilst onscreen use
    - d for down a screen of channels, or u for up a screen of channels in listing
'o' - To toggle subscribe/unsubscribe (idle) on current channel
'a' - Cycle through available audio streams
'z' - Force 4:3 (pillarbox) or 16:9 (fullscreen) display
's' - Take a screenshot (filename is ~/pidvbip-NNNNNNNNNNN.ppm)
'w' - Crop video to remove BT Sport Europe HD "L" graphics (a hack!)

pidvbip currently supports hardware decoding of H264 and MPEG-2 video streams, and software decoding of MPEG, AAC and A/52 (AC-3) audio streams. Multi-channel audio streams are downmixed to Stereo.

OpenELEC build

NOTE: As of January 2013 the OE build is not functioning. I hope to fix this soon.

A modified version of OpenELEC using pidvbip instead of xbmc as the mediacenter package can be built from the fork of OpenELEC at:

https://github.com/linuxstb/OpenELEC.tv

This is configured to take the latest "git master" version of pidvbip directly from github. To build, do the following

git clone https://github.com/linuxstb/OpenELEC.tv cd OpenELEC.tv PROJECT=pidvbip ARCH=arm make release

This will generate (after many hours, and using about 6GB of disk space) a .bz2 file within the "target" subdirectory.

To create a bootable SD card, format a SD card as FAT32 (no Linux format partitions are needed) and copy the following files:

3rdparty/bootloader/bootcode.bin 3rdparty/bootloader/start.elf target/KERNEL (rename to kernel.img) target/SYSTEM

In addition, you should add a config.txt file including your MPEG-2 license key (if required) and any other settings, plus a cmdline.txt file containing the following line:

boot=/dev/mmcblk0p1 ssh quiet

(if you don't want to enable the ssh server, remove "ssh" from the above line)

Bugs

pidvbip is still very early software and many things don't work or are not implemented yet. See the file BUGS for more information.

Copyright

(C) Dave Chapman 2012-2013

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.