Académique Documents
Professionnel Documents
Culture Documents
Contents
1 2 PRODUCT OVERVIEW ............................................................................................................. 2 STREAMING TO IPHONE......................................................................................................... 2 2.1 2.2 2.3 2.4 2.5 3 FILE LAYOUT .................................................................................................................................. 2 INSTALLATION OF IPHONE PLAYLIST ASP SCRIPT IN IIS ............................................................... 3 INSTALLATION OF IPHONE PLAYLIST ASPX SCRIPT IN IIS 7 ......................................................... 5 INSTALLATION OF IPHONE PLAYLIST PHP SCRIPT IN APACHE ...................................................... 6 FINALISE CONFIGURATION ............................................................................................................. 7
3GPP MOBILE STREAMING IMPLEMENTATIONS .............................................................. 8 3.1 3.2 OUTPUT TO DARWIN/QUICKTIME OR REAL HELIX SERVERS ........................................................ 8 PACKETVIDEO SERVER ............................................................................................................... 10
WINDOWS MEDIA STREAMING ........................................................................................... 12 4.1 4.2 OUTPUT TO W INDOWS MEDIA SERVER ....................................................................................... 12 INPUT FROM W INDOWS MEDIA STREAM...................................................................................... 14
5 6
WOWZA MEDIA SERVER ...................................................................................................... 14 HIGH AVAILABILITY AND REDUNDANCY ......................................................................... 15 6.1 6.2 6.3 INPUT REDUNDANCY .................................................................................................................... 15 SERVER CLUSTERING .................................................................................................................. 15 OUTPUT REDUNDANCY................................................................................................................. 16
GLOSSARY .............................................................................................................................. 17
MComms TV ABN 73 118 968 988 Level 1, William Street | Melbourne Vic 3000 | Australia www.mcommstv.com
Product Overview
MComms Transcode software takes live a VoD video in many formats and encodes it for Mobile TV, web and IPTV streaming. The output from MComms Transcode can be integrated with many different servers in order to service a wide range of end user devices. Typically Windows Media Server (free with Windows server editions) is used to stream Windows Media files and streams to PCs and smartphones. Darwin, pvServer, Sun Streaming Server, Vidiator and Real Server are used to stream 3GPP streams to mobile phones. Apache or IIS web servers are typically used to stream to iPhone and iPod touch.
Streaming to iPhone
MComms Transcode works as the encoder and stream segmenter for streaming to iPhone.
MComms Transcode outputs MPEG Transport Stream files suitable for playback on iPhone OS 3.0, each file is approximately the length of the Video Keyframe Interval which should be set to 10 seconds. These files can be streamed using most popular web servers such as IIS and Apache, a different configuration method is required for each server as detailed below.
2.1
File Layout
MComms Transcode should be configured so that each output is set to save .ts files to a different directory. Normally the directory is named according to the channel name and also the bitrate of each output. E.g. c:/iphone/channel_1/60k/media.ts If the web server is running on a different server to MComms Transcode, then the files should be stored temporarily on the local server and MComms Transcode configured to FTP the files to multiple remote servers.
MComms TV ABN 73 118 968 988 Level 1, William Street | Melbourne Vic 3000 | Australia www.mcommstv.com
/ base directory HTML file M3U8 multirate index file Bitrate 1 folder M3U8 playlist file Media00001.ts to Media0000x.ts files Bitrate 2 folder M3U8 playlist file Media00001.ts to Media0000x.ts files Bitrate n folder
A HTML file is supplied that contains either an <object> or <video> tags embed video players within a web page. The HTML page can be styled using any elements compatible with the iPhone and multiple video players can be embedded in a single page. When the iPhone loads a html page with <object> or <video> or <a href> tags containing a link to a .m3u8 file, the iPhone will load the .m3u8 file to find out the contents of the playlist. The .m3u8 file linked to the HTML page can either be an index file (which is a list of URLs to multiple bitrate playlists of the same stream), or it can be an actual playlist (containing URLs to .TS files).
2.2
MComms TV ABN 73 118 968 988 Level 1, William Street | Melbourne Vic 3000 | Australia www.mcommstv.com
From Internet Information Services (IIS) Manager do the following: Right click the website serving the iPhone stream and select Properties Select the Home Directory tab in the properties dialog Click the Configuration button In the Application Configuration, select the Mappings tab and click Add... In the Executable text box, enter: C:\WINDOWS\system32\inetsrv\asp.dll In the Extenstion text box, enter .m3u8 Leave all other settings and click OK Click OK on the Application Configuration dialog, and OK again on the web site properties dialog
Now you need to change some MIME types so that IIS can serve up the iPhone stream: Right click the website serving the iPhone stream and select Properties Select the HTTP Headers tab and click the MIME Types... button In the MIME Types dialog, click New... In the Extension textbox, enter .ts In the MIME Type textbox, enter video/MP2T
Ensure that you have ASP scripting allowed, this will result in 404 errors if not correctly configured:
MComms TV ABN 73 118 968 988 Level 1, William Street | Melbourne Vic 3000 | Australia www.mcommstv.com
2.3
2.3.1
Setting up IIS 7
MComms TV ABN 73 118 968 988 Level 1, William Street | Melbourne Vic 3000 | Australia www.mcommstv.com
2.4
2.4.1
Enable Mod_Rewrite
Apache must have a module called mod_rewrite enabled in order to map URLs ending in .m3u8 to the correct PHP script To do this open the httpd.conf file in the apache\conf directory and remove the hash # from all lines that contain mod_rewrite.
LoadModule rewrite_module modules/mod_rewrite.so
2.4.2
IE or FireFox will ask you to save the file, you should see a m3u8 playlist with lines starting with hash #. If you instead see the php script source code, then you need to check your php file, URL and php installation.
2.4.3
URL Rewriting
Ensure that the .htaccess file supplied has been copied or merged to the root directory of the website.
MComms TV ABN 73 118 968 988 Level 1, William Street | Melbourne Vic 3000 | Australia www.mcommstv.com
Use the same URL as above in a PC browser, except modify the extension to .m3u8
http://server/iphone/MCommsiPhonePlaylist.m3u8
In IE or Firefox you should see the same playlist with lines starting with hash #, you should also see a list of .TS files in ascending order. If you receive an error or URL not found, you need to check that the .htaccess file supplied by MComms is correctly located in the root directory of the website. If you receive Error 500, check that Apache has mod_rewrite installed.
2.4.4
2.4.5
Multiple bitrates
Change the HTML source to point to the playlist index file MCommsiPhoneIndex.m3u8, make sure that the relative paths are correct. The MCommsiPhoneIndex.m3u8 file should contain links to all the php MCommsiPhonePlaylist.m3u8 files.
2.5
Finalise Configuration
Please note that the iPhone cannot directly use .m3u8 playlist files. Instead, get your iPhone to load the TranscodeiPhone.html file, which should be in the same directory as the MCommsiPhoneIndex.m3u8 file.
MComms TV ABN 73 118 968 988 Level 1, William Street | Melbourne Vic 3000 | Australia www.mcommstv.com
Default URL
rtsp://127.0.0.1/YourFileName .sdp rtsp://127.0.0.1/rtpencoder/Y ourFileName.sdp
rtsp://192.168.0.1/public/You rFileName.sdp
3.1
MComms TV ABN 73 118 968 988 Level 1, William Street | Melbourne Vic 3000 | Australia www.mcommstv.com
Video Gateway
Video Call
Encoder Proxy
Mcomms Transcode
MComms Monitor
If using Darwin server 5.5.1 to 5.5.5 there is no configuration necessary on the server itself other than to save the SDP file in the correct directory.
MComms TV ABN 73 118 968 988 Level 1, William Street | Melbourne Vic 3000 | Australia www.mcommstv.com
3.2
PacketVideo Server
PacketVideo Server or pvServer sets up an RTSP connection from the pvServer to MComms Transcode. pvServer can be configured to receive multicast RTP streams (which is the preferred option) or to initiate the stream by connecting to MComms Transcode using RTSP.
3.2.1
3.2.2
MComms Transcode must be configured to wait for the PVServer to connect before starting the output, this is done by unticking the Stream Enabled check box as shown below:
MComms TV ABN 73 118 968 988 Level 1, William Street | Melbourne Vic 3000 | Australia www.mcommstv.com
In some cases you may want to configure multiple PVServers to connect to the same URL for scalability and redundancy. For PVServers initiating outputs using RTSP, each PVServer must be handled by a different output. However multiple outputs can be configured with the same settings and same sdpfilename, MComms Transcode will choose the first available output that matches the URL. This is done by configuring a group of outputs with the same settings and then setting the SDP file of each output to the same name without a file path as shown below:
If the pvServer is configured to ask for a URL without a filename or directory (i.e. rtsp://1.2.3.4:555/), then any non-running outputs will be used. The settings under the Audio and Video tabs should be configured to the desired codecs etc before the PVServer connects. Under the RTP tab, the Stream Name may be configured but the server IP address and RTP port can be ignored. On the PVServer run the following commands to initiate a stream on Channel 1:
cd /opt/pvns/tools/bin ./aliasServiceClient.ksh -h 127.0.0.1 -p 10000 -au /public/live -c rtsp://192.168.126.1:555/sdpname
MComms TV ABN 73 118 968 988 Level 1, William Street | Melbourne Vic 3000 | Australia www.mcommstv.com
To Remove Streams:
./upstreamSessionMgmt.ksh -h 127.0.0.1 -p 10000 -stopu -cid rtsp://192.168.126.1:555/sdpname
3.2.3
4
4.1
Click Output Settings, select Windows Media Stream as the Output Type.
MComms TV ABN 73 118 968 988 Level 1, William Street | Melbourne Vic 3000 | Australia www.mcommstv.com
The audio and video codec settings should be configured as required, be sure to select a type of Windows Media codec for both (WM Server cannot support other codecs). Take note to set the Video codec buffer length, as this will affect the time that the end client buffers the stream for before starting to play.
Set the WMSink to either Push or Pull to match the Windows Media Server configuration. On the Windows Media Server, create a new publishing point using the Wizard:
Select Encoder (a live stream). Make sure that the IP address configured in the WM Server matches the MComms Transcode IP and configured Port number ie. http://192.168.1.40:8089
MComms TV ABN 73 118 968 988 Level 1, William Street | Melbourne Vic 3000 | Australia www.mcommstv.com
Test the stream by using Windows Media Player to stream from the WM Server in either MMS, HTTP or RTSP protocols. Note: that if you havent configured the Windows Media Server, you can also use Windows Media Player to stream directly from MComms Transode over http in this case configure MComms Transcode not to push to the server.
4.2
HTTP/RTSP/MMS Media
Audio/Video Source
Mcomms Transcode
Mobile
MComms TV ABN 73 118 968 988 Level 1, William Street | Melbourne Vic 3000 | Australia www.mcommstv.com
6.1
Input Redundancy
MComms Transcode supports 2 content inputs and a background image for input redundancy. Normally input number 2 is played out to all the outputs, if the buffer of input 2 runs out then input number 1 will be shown at all the outputs. If the buffer of input 1 and 2 is empty then the background image will be shown at the outputs. The input buffer time can be changed by clicking Tools/Options. Click the Advnced tab:
Changes should only be made to the Optimal buffer time and the Start buffer time. The Optimal Buffer time can be anywhere from 2 seconds to 20 seconds depending on the input source (shorter for high stability, low jitter local source, longer for distant high jitter sources). Set the Start when buffered time to approximately half of the buffer time.
6.2
Server Clustering
Windows 2003 Server Enterprise and Datacentre editions support clustering, please view the Microsoft guide on how to set this up:
http://www.microsoft.com/windowsserver2003/enterprise/clustering.mspx
MComms TV ABN 73 118 968 988 Level 1, William Street | Melbourne Vic 3000 | Australia www.mcommstv.com
6.3
Output redundancy
Output redundancy can also be achieved when using Helix Server or another server that supports redundant streams.
When the encoders connect to Helix Mobile Server the SDP files must be saved with a number after their name. Consider this example: live.sdp.2 connects first live.sdp.3 connects second live.sdp.1 connects third Under normal circumstances all media players receive the stream live.sdp, and have no knowledge of the encoder sending the stream. In the preceding example, live.sdp originates as live. sdp.2. If the encoder delivering live.sdp.2 fails, media players reconnect to the next live. sdp stream in the queue, which is live. sdp.3. If live. sdp.2 returns, it goes to the bottom of the queue. A subsequent failure of live. sdp.3 causes media players to connect to live. sdp.1, and so on. If an encoder fails, then the media player must stop and reconnect to the stream. Helix Mobile Server can take up to 30 seconds to recognise an encoder has failed.
MComms TV ABN 73 118 968 988 Level 1, William Street | Melbourne Vic 3000 | Australia www.mcommstv.com
7
3GPP AAC AMR DRM GUI HA IP Kbps Mbps MIB M-JPEG MPEG O&M QCIF QVGA RDT RTCP RTP RTSP SDP SNMP UMTS URI URL WCDMA
Glossary
Third Generation Partnership Project Advanced Audio Coding Adaptive Multirate Codec Digital Rights Management Graphical User Interface High Availability Internet Protocol KiloBits per second MegaBits per second Management Information Base Motion JPEG Moving Picture Experts Group Operation and Maintenance Quarter CIF resolution (176 x 144 pixels) Quarter VGA resolution (320 x 240 pixels) RealNetworks Data Transport RTP Control Protocol Real-Time Transport Protocol Real-Time Streaming Protocol Session Description Protocol Simple Network Management Protocol Universal Mobile Telecommunications System Uniform Resource Identifier Uniform Resource Locator Wideband Code Division Multiple Access
MComms TV ABN 73 118 968 988 Level 1, William Street | Melbourne Vic 3000 | Australia www.mcommstv.com