Project

General

Profile

Install iStreamdev:

<- Home

Prerequired:

  • an http server with PHP5 ( >= 5.2.0 ) enabled like apache or lighthttpd.
  • for some php installation you need to install php5-json & php5-zlib extension.
  • ffmpeg compiled with libx264 & libmp3lame support
  • segmenter: http://svn.assembla.com/svn/legend/segmenter/
    Install:

Download a stable release from here:

http://projects.vdr-developer.org/projects/list_files/istreamdev

or development revision from Git repository:

git clone git://projects.vdr-developer.org/istreamdev.git

Copy the file in your webfolder. /istreamdev for example.
Copy the config_default.php to config.php and edit it.

Compiles segmenter provided by typing make in segmenter folder and install it:
"make & cp segmenter /usr/bin/"

At each update, don't forget to remove your old config file and replace it by the new default one to prevent not updated config files.

$httpath needs to point to your istreamdev http path ( /istreamdev/ if your site is http://mydomain/istreamdev/ ). Caution: don't use the full url path like http://.

The ram folder and playlist one shoulds be writable.
To prevent hard disk usage, you can mount it in /dev/shm to use ram instead of disk.
If you don't have /dev/shm , you need to mount it on boot:
On your /etc/mtab, add this line:

tmpfs /dev/shm tmpfs rw,nosuid,nodev 0 0

From your istreamdev folder:

rm -Rf ram
mkdir /dev/shm/ram
ln -s /dev/shm/ram ram

Check your files permissions. All php script and istream.sh should be executable by www-data user.
www-data needs rights to launch ffmpeg, segmenter, and some shell commands.

From your istreamdev directory:

  1. set owner and group
    sudo chown -R root.www-data ./*
    
  1. strict default permissions for files and directories
    sudo find ./ -type f | xargs sudo chmod 644
    sudo find ./ -type d | xargs sudo chmod 755
    
  1. ram and playlist directories need to be group-writable
    sudo chmod 775 ram playlist
    
  1. istream.sh shoudl be executable
    sudo chmod 755 bin//istream.sh
    
  1. if you moved the ram directory to a ramdisk as suggested:
    sudo chown root.www-data /dev/shm/ram
    sudo chmod 775 /dev/shm/ram
    

Check everything is ok with ffmpeg by launching the above command logued as your http server user ( www-data ) :

./bin/istream.sh http://localhost:3000/TS/1 512k 128k 480x320 /istreamdev/ 3 /usr/bin/ffmpeg /usr/bin/segmenter session0

You should see ffmpeg access streamdev http://localhost:3000/TS/1 and encode the stream.

You can add your logos channels pictures ( 80x80 png ) in logos/ folder.
If some channels have a / in the name, replace it by a space. Ex: "RTL\RTL Television" > "RTL RTL Television.png"

Now everything is ok you can login from your iphone: http://yourip/istreamdev
Add it to your Iphone home menu as shortcut ( IMPORTANT if you want to have it in fullscreen mode ).

You can active debug logs in your config file:

$debug=1; logs all events in a file.
$ffmpegdebug=1; logs all ffmpeg output in a file.