[NAS Typ:] TS-239 Pro
[Firmware:] 3.2.1 build 1231T
[Getestet:] ja
[Sonstige Modifikationen:] siehe README.TXT weiter unten
Hi Leute,
ich empfange Fernsehen über aonTV der Telekom Austria. Das läuft wirklich super, neben Fernsehen habe ich Zugang zu einer Videothek, Webradio und die aonTV MediaBox ist auch ein AV-Receiver, d.h. ich kann damit alle Daten vom NAS (Twonky) am Fernseher ansehen. Nur aufnehmen kann (konnte ) aonTV leider noch nicht.
Ich habe mir deshalb eine Lösung für mein 239Pro entwickelt, es sollte aber mit ein wenig Adaption auch auf einem anderen NAS bzw. Linux Rechner laufen.
Die Programmierung einer Aufnahme funktioniert ganz einfach. Im EPG die gewünschte Sendung auswählen, auf den Titel klicken und im Fenster die Schaltfläche [Aufnahme programmieren] wählen.
Alternativ kann auch einfach ein Sender, Startzeit und Endzeit/Dauer eingegeben werden.
Die Aufnahmen werden direkt am NAS gespeichert, können heruntergeladen oder mittels Twonky direkt auf den Fernseher gestreamt werden.
Bei Interesse könnt Ihr das ganze auch gerne bei Euch daheim verwenden.
Vorraussetzungen: IP-TV (zB aonTV) & ein wenig Qnap/Linux Know-How
Im Anhang findet Ihr alle notwendigen Dateien, sowie eine README (auf Englisch) in der alle notwendigen Installationsschritte beschrieben sind.
Viel Spaß
gfcom
PS: Hier schonmal vorab das README-HowTo
================================================================================
iPVR
--------------------------------------------------------------------------------
by gfcom, 2010
================================================================================
1 Introduction
================================================================================
iPVR turns your NAS or computer into a personal video recorder (PVR) that
records IP-TV streams.
The service is optimised for Telekom Austria's IP-TV service "aonTV" and
for the Qnap TS-239Pro TurboNAS station.
2 Preconditions
================================================================================
- IP TV service like "aonTV" which offers tv broadcast as UDP streams.
- Linux based NAS or computer with php installed
- Knowledge of linux, php, html, css, js, sh
3 Installation aonTV on Qnap TS-239Pro TurboNAS
================================================================================
3.1 Qnap configuration (via Web-Frontend)
-------------------------------------
- Web server enabled
- QPKG "Optware installed"
- SSH (Port 22) enabled
3.2 Configuration of development/deployment PC
-------------------------------------
- putty installed and configured to access the NAS
- WinSCP installed and configured to access the NAS
- PSPad (or other editor) installed
3.3 Create folders and copy files
-------------------------------------
- web service folder "/share/Qweb/ipvr/"
- recordings folder "/share/Qrecordings/aonTV/"
- Use WinSCP to copy all iPVR files to the folders named above
3.4 Installation of ipkg packages (optional)
-------------------------------------
Note: I've installed some IPKG package before 've I developed iPVR. I'm not sure
if any of these are needed to run iPVR. If iPVR is not running try to install
the following packages:
- bash
- ffmpeg
- gcc
To install a package use putty and type
- ipkg update
- ipkg install <packagename>
3.5 Compile udpxrec (optional)
-------------------------------------
udpxrec (=udpxy) is used to record the udp streams. A compiled version for
the Qnap TS-239Pro TurboNAS is included in the "bin" directory. If you need
to compile the programme for your machine run the following steps in putty:
- cd /share/Qweb/ipvr/src
- gcc *.c (Note: IPGK gcc must be installed, see 3.4)
- cp a.out ../bin/udpxrec
- check rights of "udpxrec" in "bin" directory
3.6 Configure apache web server
-------------------------------------
Use WinSCP to edit the file "mnt/HDA_ROOT/.config/apache/apache.conf".
Add the following 2 lines before the line "Listen 80":
LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_http_module modules/mod_proxy_http.so
Add the following section right after other virtual host entries and adopt
the values:
<VirtualHost *:80>
ServerName pvr.yourdomain.com
<Location />
AuthName "iPVR"
AuthType Basic
AuthUserFile "/share/Qweb/ipvr/config/passwords.htpasswd"
<Limit GET>
require valid-user
</Limit>
</Location>
DocumentRoot "/share/Qweb/ipvr/"
RewriteEngine on
RewriteRule broadcastDetail.sp$ http://pvr.yourdomain.com/epg.php?%{QUERY_STRING}
ProxyRequests Off
ProxyPass /epg/ http://jawe.aon.at/aon-tv-epg/
ProxyPassReverse /epg/ http://jawe.aon.at/aon-tv-epg/
</VirtualHost>
3.7 Define users & passwords
-------------------------------------
By default the user "demo" with password "demo" is configured. Add new users
to the file "/share/Qweb/ipvr/config/passwords.htpasswd" with an editor.
Hint: Use a htpasswd generator
http://www.htaccesstools.com/htpasswd-generator/
3.8 Install fake "QPKG" to run start script on power on/off
-------------------------------------
Use WinSCP to edit the file "mnt/HDA_ROOT/.config/qpkg.conf".
Add the following lines to the file:
[iPVR]
Name = iPVR
Version = 1.0
Date = 2010-02-13
Shell = /share/MD0_DATA/Qweb/ipvr/start.sh
Install_Path = /share/Qweb/ipvr
Config_Path = /share/Qweb/ipvr
WebUI = /ipvr/
Author = gfcom
After the next reboot of the Qnap NAS you will find two new symbolic links
in the "/etc/rcS.d" and "/etc/rcK.d" folders which will be named like this:
/etc/rcS.d/QS100iPVR
/etc/rcK.d/QK100iPVR
Use WinSCP to edit the file "/share/Qweb/ipvr/start.sh" and adopt the names of
of the start/stop scripts.
3.9 Configure iPVR
-------------------------------------
Use an editor to adopt the file "/share/Qweb/ipvr/config/ipvr.ini" to your
needs.
3.10 Translate iPVR (optional)
-------------------------------------
If you'd like to translate iPVR to another language duplicate the file
"lang.en.php" in the folder "/share/Qweb/ipvr/lang" and use an editor to change
the values names in the file.
Note: English and German are already available.
3.11 Update channel list
-------------------------------------
Use an editor to update the file "/share/Qweb/ipvr/config/ipvr.m3u".
Note: The aonTV URLs can be found here: www.aontv.org
3.12 Update EPG handling (optional)
-------------------------------------
If you are using another EPG than aonTV's web EPG or the format of aonTV's EPG
changes you have to change the apache settings (3.6) and customize the "epg.php"
file.
4 How iPVR works
================================================================================
4.1 udpxrec
-------------------------------------
udpxrec (=udpxy) was written by Pavel V. Cherenkov. It is used to retrieve an
udp stream and write it to a mpg file. The programm is stored in the "bin"
directory. If you are not using a Qnap TS-239Pro TurboNAS you may have to
re-compile it (see 3.5)
4.2 recordings.csv
-------------------------------------
All required data (names, timings, etc.) of all recordings is stored in the file
recordings.csv which can be found in the "data" directory.
4.3 User interface
-------------------------------------
jquery is used for some dynamic html features (e.g. calendar) and the design.
4.4 Start a recording
-------------------------------------
Important Note: I shutdown my NAS every night and start it in the morning.
Because of this the web interface only starts udpxrec processes for recordings
which starts later on the same day. The udpxrec process of a recording which
is scheduled for a later day will be started with the script "start.sh" which
is called by each system start/reboot (see 3.8)
4.5 Temporary files
-------------------------------------
For each recording the following files are generated:
- video file in recording folder (*.mpg)
- log file in "rec_logs" folder (*.log)
- pid file in "pid" folder (*.pid) while udpxrec process is running
4.6 aonTV EPG
-------------------------------------
All EPG files are accessed via a local proxy server (see 3.6). Only the
file which includes the details of a movie/film (broadcast.sp) will be
redirect to the "epg.php" file.
Alles anzeigen
PPS: Es kann natürlich auch ein anderer IP-TV Anbieter als aonTV genutzt werden. In diesem Fall müsst Ihr einfach die IP-Adressen der TV Kanäle in der M3U-Datei ändern und ggfs. einen anderen EPG einbinden.