The UCT Advanced IPtv software package is an attempt at a standards compliant implementation of an IMS based IPtv service. It has been created as part of the ongoing IPtv-IMS research in the Communications Research Group at the University of Cape Town.
The project is in the early stages of development and still in the experimental Beta phase.
Please report bugs / suggestions to the UCT IMS Client mailing list.
NOTE: This project is a continuation of the UCT IPtv streaming server which is no longer under active development.
The architecture is shown below, it involves the Open IMS Core, the UCT IMS Client ( > 1.0.12), an Indirection Application Server (AS) and a 3rd Party RTSP enabled Media Server:
The IPTv architecture involves three stages:
1st Stage: The UCT IMS Client creates an INVITE request for one of the channels and sends this request to the Indirection AS.
2nd Stage: The Indirection AS consults a hash table that links channel requests to RTSP addresses, and returns the relevant RTSP address to the UCT IMS Client in a 200 OK response.
3rd Stage: The UCT IMS Client initiates an RTSP session with the 3rd party media server.
It is clear that there needs to be co-ordination between the channel requested by the client, the hash table that maps channels to RTSP addresses, and the RTSP addresses of the media server.
2. Download/Install the UCT Indirection AS
Download the server from here, it is part of the Advanced IPTv project.
If you are using a Debian-based distribution you can simply use dpkg -i on the deb file (or use your package installer). Your package installer should install the required packages (libosip and libexosip).
Or if you are installing from source, you will need to have the required packages installed first:
– libosip (2.2.3)
– libeXosip (2.2.3)
Then simply type make from the root directory.
3. Configure the FHoSS
Configure your FHoSS to forward IPtv requests to the machine running the Indirection AS.
The basic steps are:
- Add an application server (the server runs on port 8010)
- Add a trigger point (the example given below matches requests such assip:email@example.com or sip:firstname.lastname@example.org)
- Link the application server and trigger point with the initial filter criteria
- Add the iFC to the default service profile
For more information visit the Open IMS Core website.
4. Setup XML file that maps channel requests to RTSP addresses
The Indirection AS maps the channel requested (The first part of the URI i.e. channel 1 from email@example.com) to a specific RTSP address.
We need to create an XML file that contains the SIP URI key and RTSP value for each media file your media server provides. An example XML file can be found in the installation root direction or in /usr/share/iptv if you are using the debian package. This file will be passed as an argument when running the Indirection AS.
It should look as follows:
Example XML File:
<?xml version=”1.0″ encoding=”UTF-8″?>
<key-value_pairs> <key-value_pair> <key key_val="channel1"/> <value val_val="rtsp://media_server_address.domain:8000/requested_channel"/> </key-value_pair>
NOTE: The key_val is the part of the SIP URI that the client will be inviting eg. sip:firstname.lastname@example.org The val_val is the corresponding RTSP address of the video that will be streamed to the client. eg.rtsp://media_server_address:port/video_name
When the server starts up it reads this XML file inserting all the values and the corresponding keys into the hash table .
5. Run the Indirection AS
Run the Indirection AS.
Usage: uct_iptv_as [key-value_file].
Where key-value_file is the file you created in step 4.
6. Setting up a 3rd Party RTSP enabled Media Server
You may used any media server that is RTSP compatible but Apple’s Darwin Streaming Server and VideoLANClient are two examples of open source media servers you may use to provide IPtv and VoD services in your network. Below are some quick setup guidelines:
Darwin Streaming Server (DSS)
1) Download the latest version of DSS from http://dss.macosforge.org/.
2) Install DSS on your machine.
Note: Linux users may need to get the patch for v6.0.3 from http://dss.macosforge.org/trac/ticket/6 in order for DSS to install properly.
3) Once installed, run the DarwinStreamingServer application as well as the streamingadminserver.pl python script (needs to be done as root in Linux).
4) Open your web browser and direct it to the machine running DSS on the port that DSS is listening to (default: 1220).
5) Login into the DSS admin page using the username and password that you configured when you installed DSS.
4) By default any movies placed in the Media Directory (This configured when installing DSS but can be found and changed under the “General Settings” tab of the website.) will be displayed, provided DSS can understand the file type and codecs used. The following is taken from the FAQ section of the DSS homepage.
Q. My .mp4, .3gp, or .mov file won’t stream. Why does the player show 415 invalid media?
The streaming server supports QuickTime Movie (MOV), MPEG-4 (MP4), and 3GPP (3GP) “hinted” files.
Hinting is a post-process that you apply to your movies to make them RTSP-streamable. You can hint them with QuickTime Pro or the hinting tool available in the MPEG4IP package.
If you don’t hint your .mov’s or mp4’s they will still be HTTP-downloadable but it will take them some seconds to start playing. You won’t need a streaming server for this, just use good old Apache.
5) Using a playlist, found under the “Playlists” menu on your DSS admin page, it is possible to simulate broadcast channels by having multiple movies or videos play sequentially and looping them. Simply select “new media playlist” and drag in the movies you wish to play and set “Play Mode” to be looped.
1) Download the latest version of VLC from http://www.videolan.org/vlc/.
2) Install VLC.
3) There are a number of ways of setting up VLC to act as a media server and they can be found at (http://wiki.videolan.org/Documentation:Streaming_HowTo/VLM) See the “Video On Demand” section for a fairly easy way of setting up a video that will be streamed to requesting clients.
4) See “Scheduled broadcasting” under the “Multiple Streams” section of the above link for setting up broadcast streams.
For both of these servers we require co-ordination between the Indirection AS hash table that maps channel requests to RTSP addresses and the RTSP addresses of the media server. e.g. If you are streaming a video called “movie1” on the RTSP address rtsp://media_server_address/movie1, you need to edit the key_value_filesuch that channel “movie1” is mapped to RTSP address rtsp://media_server_address/movie1.
Darwin Streaming Server
Darwin comes with a few example video files that you can test.
To ensure the server is streaming the file correctly use VLC or Apple QuickTime to connect to the RTSP address of the media file. An example would be rtsp://Darwin_server_address:Port//sample_300kbit.mp4 (Note: Ensure that the example movies are in the directory set in the “General Settings” tab of the Darwin Admin page and that Darwin can see them. Go to “Playlists” -> “New Media Playlist” via the webpage and you should see a list of the movies that are in the movie directory.)
Now that you are sure that Darwin is streaming correctly, open up the key_value_file that you will pass as an argument to the Indirection AS and add the following:
<key key_val="example"/> <value val_val="rtsp://my_server_address:port/sample_300kbit.mp4"/> </key-value_pair>
Replace my_server_address:port with the appropriate address and port number of your server.
Run the Indirection AS with this new XML file as argument, it will read in the new media stream that is available for clients to request.
Startup the UCT IMS Client and register with the core. Type into the address barsip:example@my_application_server_address:port and initiate the call.
If all has been configured correctly your client should open a video window and receive the sample_300kbit.mp4 stream.
Testing with VLC as your media server is the same as above except that you will need to find a file thatVideoLAN as a media server can handle. We have found that it may not play all content and so your safest bets are MPEG2 and some MPEG4 videos.
Configure VideoLAN as per the http://wiki.videolan.org/Documentation:Streaming_HowTo/VLM how to and use VLC to connect to the stream to ensure that it’s playing. If your movie is not being streamed, ensure that the VLC server did not complain about the file when you configured it to be a video on demand file. Then continue as above.