Streamnik Server 0.02

Streamnik Server project is an IPTV server based on the open codecs Ogg/Vorbis and Ogg/Theora.
Streamnik Server project is an IPTV server based on the open codecs Ogg/Vorbis and Ogg/Theora. It can stream a number of different channels and is optimized to run on leased (virtual) servers. The program schedule is defined by an SQL database table and can be changed at runtime.

Requirements:

· Common C++ with devel
· Mysql (mysqlclient)

Installation:

To compile, everything works as usual:

./configure
make
sudo make install

What you need to start the server:

shorties: short films for error handling
previews: short preview films (e.g. ads - this stream is presented by ...)
videos: videos to show up

all videos, shorties and prieviews must match in framerate,
keyframe-distance etc.

shorties and previews are actually cached with a key name and are compiled
in (next version might use a database entry for that)

Startup:

just start the server:

> StreamnikServer -d -u -p

and access the server e.g. by mplayer:

> mplayer "http://localhost:12000/video.ogg?channel=1"


However, befor all of that, you need to set up a number of additional things:

DATABASE:

You need a sql-database up and running. Statements are shown at the end of this document.
The database name and password can be added on the command line.

FILES:

You need the following file structure (can be changed in serverConfig.h):

home
> shared
> ogg
> shorty

The ogg directory carries all files, that should be streamed. Every file has a corresponding entry in the sql database ("videos" table).

The shorties are small ogg files which are shown on an error.

shorty_1.ogg -> no stream available
shorty_2.ogg -> unauthorized access
shorty_3.ogg -> streaming timeout
shorty_4.ogg -> database not available

Then you can add previews (short films befor the original stream, e.g. for adds)
This file must be placed in the shorty directory as well and are named
preview_*.ogg.

The system will not be happy if they are not present, but will start up

CHANNELS:

Channels are opened by an entry in the sql database. This entry must actually be present on startup.

For every channel, a StreamCreator object will be created, which will send it's data to a multiplexer. This will then handle all client requests.


TcpListener (Port 12000) StreamSend ( Client 1 )
| | /
file -> StreamCreator -> Multiplexer ---> StreamSend ( Client 2 )
Stream 1 |
| --> StreamSend ( Client 3 )
|
sql Database Access |
^ | --> StreamSend ( Client 4 )
| | /
file -> StreamCreator -> Multiplexer ---> StreamSend ( Client 5 )
Stream 2 |
|
|
sql Database Access |
^ | ---> StreamSend ( Client 6 )
| | /
file -> StreamCreator -> Multiplexer ----> StreamSend ( Client 7 )
Stream 3
--> StreamSend ( Client 8 )

--> StreamSend ( Client 9 )
...

SCHEDULE:

The schedule is placed into the "schedule" table in the database.
("day_id" and "date" are actually not in use)

channel_id and video_id correspond to the entries in the other tables.
every film has a position (in a day). A day starts at 4:00.

The first entry within one block of films should be marked with status "1".

If you have a film, which is not continously connected, you should add
the "1" status again.

******************************************************
*
* SQL database creation
*
******************************************************

CREATE TABLE `schedule` (
`day_id` int(11) unsigned NOT NULL default '0',
`date` varchar(8) NOT NULL default '',
`channel_id` int(11) unsigned NOT NULL default '0',
`position` int(10) unsigned NOT NULL default '0',
`video_id` int(10) unsigned NOT NULL default '0',
`duration` int(10) unsigned NOT NULL default '0',
`status` tinyint(3) unsigned NOT NULL default '0'
)

CREATE TABLE `videos` (
`id` int(10) unsigned NOT NULL auto_increment,
`owner` int(10) unsigned NOT NULL default '0',
`title` varchar(80) NOT NULL default '',
`subtitle` varchar(80) NOT NULL default '',
`author` varchar(80) NOT NULL default '',
`copyright` varchar(160) NOT NULL default '',
`description` varchar(255) NOT NULL default '',
`time_added` int(10) unsigned NOT NULL default '0',
`duration` int(10) unsigned NOT NULL default '0',
`ready` tinyint(1) NOT NULL default '0',
PRIMARY KEY (`id`)
)

CREATE TABLE `channels` (
`id` int(11) unsigned NOT NULL default '0',
`name` varchar(80) NOT NULL default '',
`owner` int(11) NOT NULL default '0',
`description` varchar(80) NOT NULL default '',
`randomplay` tinyint(1) NOT NULL default '0',
PRIMARY KEY (`id`)
)

What's New in This Release:

· This release provides a lot of new documentation for setting up the server.
· There is now a script available which will compile, install, and setup the streamnik server in one step.
· The configuration can now be done by a configuration file, which is placed at /etc/streamnik.conf.
· Additionally, there are some minor bugfixes, such as fixes for compiling under different Linux distributions.

last updated on:
June 15th, 2007, 19:35 GMT
price:
FREE!
homepage:
www.streamnik.de
license type:
GPL (GNU General Public License) 
developed by:
Joern Seger
category:
ROOT \ Multimedia \ Video
Streamnik Server
Download Button

In a hurry? Add it to your Download Basket!

user rating 18

2.6/5
 

0/5

Rate it!

Add your review!

SUBMIT