Framework of an Interactive Video Environment A Thesis by CATHY MAE MARGARETTE FAVORITO HAZEL INESSA FERNANDEZ LUIGI ONGLAO DANNIEL SUNGA MA. CRISTINA CLAIRE TIAMZON Submitted to the Faculty of the Department of Electronics, Computer and Communications Engineering School of Science and Engineering Loyola Schools Ateneo de Manila University Loyola Heights, Quezon City Philippines
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Framework of an Interactive Video Environment
A Thesis by
CATHY MAE MARGARETTE FAVORITOHAZEL INESSA FERNANDEZ
LUIGI ONGLAODANNIEL SUNGA
MA. CRISTINA CLAIRE TIAMZON
Submitted to the Faculty of theDepartment of Electronics, Computer and Communications Engineering
School of Science and EngineeringLoyola Schools
Ateneo de Manila UniversityLoyola Heights, Quezon City
Philippines
In Partial Fulfillment of the Requirements for the Degree of
Bachelor of Science in Electronics and Communications Engineering
March 2007
This thesis, entitled Framework of an Interactive Video Environment, prepared and
submitted by Cathy Mae Margarette Favorito, Hazel Inessa Fernandez, Luigi Onglao,
Danniel Sunga and Ma. Cristina Claire Tiamzon, in partial fulfillment of the requirements
for the degree of Bachelor of Science in Electronics and Communications Engineering, is
hereby accepted this 16th of March, 2007.
Mr. Gerardo de LeonPanelist
Mr. Carlos OppusPanelist
Mr. Cesar PinedaPanelist
Dr. Nathaniel LibatiqueThesis Adviser
Dr. Gregory TangonanThesis Adviser
iii
Acknowledgments
The group wishes to express their deepest gratitude to:
God for giving us the creativity, patience and skill to complete this thesis,
Kim Bartolome for always being ready to attend to all our PHP dilemmas and for assisting us with the layout of the website,
Sirs Greg & Joey for contributing their great ideas and gently prodding our thesis to the right direction,
Christian Almendarez for editing the videos,
Ardee Aram for helping us resolve database issues and giving us ideas on how to get started,
CTC208 thesis groups and EJ “Mr. Complete” Gallarde for their camaraderie,
Ronjo Solis and Stephen Cate for serving as VJs and giving video comments for our site,
the rest of ECE07 for continually giving us support,
And all organizations, departments and offices who willingly gave us copies of their videos to become content for the servers.
iiii
Table of Contents
ACKNOWLEDGEMENTS iiiTABLE OF CONTENTS iv
ABSTRACT 3
1. INTRODUCTION1. Harnessing the Power of Video 42. Innovative Possibilities 63. Key Accomplishments 74. Novel Features 85. Scope and Limitations 9
Streaming Real-time broadcasts XLong clips X XImmediate random access to different parts of a movie
X X
Downloads entire movie XDownloads required part of the movie
X
FLV is cached on the local system
X
Requires a specialized streaming server
X
Requires a web server with PHP XCan be stopped by firewalls XConsistent high quality playback at any connection speed
X X
Retransmits lost packets X XTable 2. Differences among several video distribution options.
2.3. 3G
Third-Generation (3G) Wireless Technology Networks are based on an
International Telecommunication Union (ITU) endeavor for a single global wireless
standard and are intended to provide global mobility. While 3G is generally considered
applicable mainly to mobile wireless, it is also relevant to fixed wireless and portable
wireless. A 3G system should be operational from any location on, or over, the earth's
surface, including homes, businesses, government offices, medical establishments, the
military, personal and commercial land vehicles, private and commercial watercraft and
marine craft, private and commercial aircraft, pedestrians, hikers, cyclists, campers, and
space stations and spacecraft. 3G offers the potential to keep people connected at all
times and in all places. A 3G Network enjoys increased data rates compared to previous
wireless technologies: 384 kbps (while moving) and 2 Mbps (when stationary at specific
17
locations). 3G includes other capabilities and features such as:
Enhanced multimedia (voice, data, video, and remote control).
Usability on all popular modes (cellular telephone, e-mail, paging, fax,
videoconferencing, and Web browsing).
Broad bandwidth and high speed.
Roaming capability throughout Europe, Japan, and North America.
Figure 3. 3G ideally includes LAN, WAN and satellite services
2.4. Streaming 3GP: Interactive Media Platform
3GP is a file format specially developed for third generation mobile devices that
is based on the MP4 file format.
The first version of the mobile packet-switched streaming service, commonly
referred to as the 3G-PSS standard, was finalized in March 2001. This service integrates
simultaneously playing video, audio, images, and formatted text into mobile multimedia
applications.
The standard specifies both protocols and codecs. The protocols and their
applications are:
18
RTSP and session description protocol (SDP) for session setup and control,
Synchronized Multimedia Integration Language (SMIL) for session layout
description,
HTTP and transmission control protocol (TCP) for transporting static media such
as session layouts, images, and text, and
RTP for transporting real-time media such as video, speech, and audio.
The codecs and media types are:
ITU-T H.263 video,
MPEG-4 simple visual profile video (optional),
AMR (adaptive multirate) speech,
MPEG-4 AAC low complexity (AAC-LC) audio (recommended but optional),
JPEG and GIF images, and
XHTML-encoded, formatted text.
For interoperability between content servers, the standard specifies using MPEG-
4 as an optional file format for storing media on the server. When combined using the
SMIL presentation description language, the codecs enable rich multimedia presentations
and applications, including video, audio, slideshows, and multi-language subtitling.
The 3GPP standard also uses the EventTiming, MetaInformation, and
MediaClipping modules. These add functionality such as changes in the presentation
schedule based on user interaction (EventTiming), sending metainformation about the
multimedia data (MetaInformation), and rendering only parts of a transmitted media
stream (Media-Clipping). In addition, a 3GPP streaming client should support the
PrefetchControl module, which lets the content creator include hints about when to start a
19
media stream.
The Interactive Media Platform, illustrated in Figure 3, is a software platform for
mobile-streaming applications. It consists of
content creation machines,
a player application that runs on widely-used operating systems,
content servers that hold the newly created multimedia content, and
a proxy, which builds the interface between the player application and other parts
of the platform.
HTTP provides access to static content through a TCP connection, while RTP
packets transport streaming content through UDP connections. RTSP manages streaming
sessions. The system uses SDP via an RTSP connection to access stream descriptions.
Introducing a proxy is necessary to serve the requirements of a mobile Internet
application using components designed for the fixed Internet. It also protects the core
network from the back-end components and vice versa. The back-end components can be
located outside the operator domain, using the proxy with a firewall extension.
2.4.1. Content creation machines
The content creation machines host the applications needed for creating both live
and offline content. They are used to prepare streaming content, for example, to edit
videos and images and encode them in the appropriate formats for mobile streaming.
They upload the content to the streaming servers—for dynamic content—and to the Web
servers, which hold the static content and the SMIL files.
20
Figure 4. Interactive Media platform. The client uses HTTP to request a SMIL presentation from a Web server. Within the SMIL presentation, the client finds links to the streaming content, which it acquires from
the streaming servers. Static content, such as an image, is fetched from a Web server via HTTP.
2.4.2. Player application
The player application renders multimedia content and lets users navigate through
the SMIL presentations. The player fetches the SMIL file from a Web server via the
proxy. The player’s SMIL engine interprets the contents of the SMIL file and fetches the
streams (using the RTSP protocol) and the static content (using HTTP) according to the
storyboard the SMIL file describes. The player’s SMIL implementation is fully 3GPP-
compliant as are the supported codecs, which decode multimedia data and render it on the
output devices. Plug-in capabilities simplify extending the player with additional codecs.
Applying skins changes the player application’s appearance. A skin is a structure
that adapts the look of an application’s user interface. An application can have several
skins.
2.4.3. Content servers
Two kinds of back-end servers store the content the player renders: Off-the-shelf
21
Web servers hold the SMIL pages, images, and other static content, and dedicated
streaming servers store streaming content and related information.
Upon receiving an HTTP GET request from the proxy or the player, the Web
server processes the request and fetches the appropriate content. The player application
uses the RTSP protocol to control the operation of the streaming server. After fetching
the description of a streaming session, which it transports using the session description
protocol, the player application sets up the streams of this session, for example, the video
and audio track. When it receives an RTSP PLAY request, the server starts sending out
RTP packets that transport the streaming content. Each stream can be in a different state
—for example, being set up, playing, paused. Therefore, the streaming servers must keep
track of all active sessions. The server uses the real-time control protocol to provide the
player, proxy, and streaming server with additional information about the session such as
packet loss. Each stream that the server sends out has an Real-Time Control Protocol
(RTCP) connection.
2.4.4. Proxy
The proxy is the system’s interface to both the radio network and the back-end
components. Acquiring static content such as images and text files is very
straightforward, but the proxy’s value becomes more apparent when it transmits
streaming data to the client. The proxy dynamically adapts the delivered quality of
service in accordance with available bandwidth using feedback information from the
player application, radio network, and IP network.
The user, content-provider, and operator use the proxy to configure preferences. A
content provider can specify a minimum bandwidth to ensure acceptable video-stream
22
quality. If this bandwidth is not available, a slide show is presented instead. If the current
bandwidth is insufficient for delivering a video, the proxy switches immediately to a
lower bandwidth as long as the QoS does not drop below a predefined value. The
operator also has the option of limiting bandwidth consumption to a certain user group.
The proxy is also the interface to the operator’s network components, including
operation and maintenance, charging and billing, and subscription management.
2.5 Multimedia Services
Delivery options for real-time streaming media are divided into two categories:
live and on-demand. Live events, such as concerts, speeches, and lectures, are commonly
streamed over the Internet as they happen with the assistance of broadcasting software.
The broadcasting software encodes a live source, such as video from a camera, in real
time and delivers the resulting stream to the server. The server then serves, or “reflects,”
the live stream to clients. Regardless of when different customers connect to the stream,
each sees the same point in the stream at the same time. This live experience can be
simulated with recorded content by broadcasting from an archive source such as a tape
deck or creating playlists of media on the server.
For an on-demand delivery experience, such as a movie or an archived lecture,
each customer initiates the stream from the beginning, so no customer ever comes in
“late” to the stream. No broadcasting software is required in this case.
2.6 Multicast and Unicast
In a multicast, a single stream is shared among the clients (see Figure 4). Each
23
client “tunes in” to the stream just like a radio tunes in to an FM broadcast. Although this
technique reduces network congestion, it does require a network that either has access to
the multicast backbone, otherwise called the Mbone, for content generally distributed
over the Internet, or is multicast-enabled for content distributed within a contained
private network.
Figure 5. Multicast
In a unicast, each client initiates its own stream, resulting in the generation of
many one-to-one connections between client and server (see Figure 5). Many clients
connected via unicast to a stream in a local network can result in heavy network traffic.
But this technique is the most reliable for delivery over the Internet since no special
transport support is required.
24
Figure 6. Unicast.
2.7 Performance Metrics
These metrics can be used in evaluating and analyzing network performance.
2.7.1 Effective Throughput
This refers to the number of bytes transferred in seconds. It can have different
values, depending on the path taken from source to destination or from destination to
source. Since it defines the system's capability for efficient bandwidth utilization, it is
significant when dealing with transfers of large amounts of data, particularly video.
2.7.2 File Transfer Time
This refers to the time it takes for a certain amount of data to be transferred
completely to its destination. This metric can be estimated from the values of the
effective throughput.
25
CHAPTER 3 Theoretical Framework
3.1. Network Configuration
The implementation of this thesis involves the integration of the Loyola Schools
Campus Network with the servers primarily responsible for video streaming. Computer
clients or end-users can access the site primarily through wireless LAN. The 3G
connection of mobile clients is merely simulated through a Wi-Fi connection. The
network should be capable of high transmission rates in order to provide seamless
delivery of video content to the client. Ideally, the network should be able to accept any
video file format uploaded by its clients and convert it to FLV and 3GP, simultaneously
generating and injecting metadata. The network should also be able to utilize bandwidth
efficiently in providing services to its clients. The environment generated by the network
should encourage interaction among its users through live streaming, and rating and
comment features.
Figure 7. Actual network.
26
3.2. Web and Streaming Servers
These are the servers that were used in delivering video streams.
3.2.1. Darwin Streaming Server
The Darwin Streaming Server (DSS) is the open source version of Apple's
QuickTime Streaming Server technology. It has the same code as QuickTime Streaming
Server but does not have technical support from Apple. It allows developers to modify
the code to suit their needs in streaming QuickTime, MPEG-4 and 3GPP media. Thus, it
can be used for streaming videos in 3G. Darwin Streaming Server allows users to send
streaming media to clients across the Internet using RTP and RTSP protocols.
For the implementation of this thesis, the DSS is used to stream the video to the
mobile Wi-Fi device using 3GPP. Mobile devices connect to the Darwin Streaming
Server through a folder in the software which automatically connects the mobile device
to the server.
Features of DSS include:
10. Native MPEG-4 and 3GPP streaming: Standard hinted MPEG-4 and 3GPP files can be
served directly, without being converted to .mov files.
11. MP3 audio streaming: MP3 files can be served to clients that support MP3 streaming via
HTTP, such as iTunes, WinAmp, and RealPlayer.
12. An even easier-to-use web-based admin: New features include a set-up assistant and easy
administration of relays between streaming servers.
13. Improved stream quality: Enhancements result in even better stream quality.
14. Performance enhancements: Overall stability and performance of the server has been
improved.
15. Authentication:Two types of authentication, digest and basic, control access to protected
27
media.
16. Server-side playlists: A set of media files can be streamed as if it were a live broadcast.
This can be ideal for creating and managing a virtual radio or television station.
17. Relay support: Several layers of servers can be easily set up to broadcast streams to a
virtually unlimited number of clients.
18. Support for Instant-On: Dramatically improves the viewing experience by playing video
and audio streams instantaneously.
19. Integrated Broadcaster administration: Provides an easy way to set up or change the user
name and password for QuickTime Broadcaster. A Broadcast Settings pane allows
remote operation of QuickTime Broadcaster (on Mac OS X Server version 10.2 or later).
3.2.2. Red 5
Red5 is an open source Flash server written in Java. For the thesis, it is used for
live streaming where the video source is real-time: a video camera/webcam is attached to
the computer and the video is simultaneously broadcast. Red5 sits on top of Apache
Tomcat and OpenLaszlo, which are just peripheral open source software. It is capable of:
Streaming Audio/Video (FLV and MP3)
Recording Client Streams (FLV only)
Shared Objects
Live Stream Publishing
Remoting
3.2.3. Apache
Apache is a full-featured web server with full support for the HTTP 1.1 standard,
proxy caching, password authenticated web pages, and many other features. A web server
is a program that runs on a host computer (also, confusingly enough, called a web server)
28
that serves up web sites. In other words, the web server program responds to requests
from visitors' web browsers for objects it has in its possession. Objects that web servers
can serve include HTML documents, plain text, images, sounds, video, and other forms
of data. These objects may not necessarily exist in static form, but instead are generated
on-the-fly by programs run by the server; CGI scripts are the most common of these
programs. Web servers and browsers communicate using HTTP, Hypertext Transfer
Protocol, a simple but effective language for requesting and transmitting data over a
network.
Apache is known to be:
Powerful, stable and reliable.
Feature-rich. The Apache server sports a host of features including XML support,
server-side includes, powerful URL-rewriting, and virtual hosting.
Modular. Modules add functionalities not included in the core network.
Extensible. Anyone can write modules for Apache as well as make changes to
Apache's source code.
Popular. This means that it is very easy to find support in case of problems.
Free.
3.2.4. Apache Tomcat
Apache Tomcat is a web container that supports the servlet and the JavaServer
Pages specifications from Sun Microsystems. It provides tools for configuration and
management but can also be configured by editing configuration files that are normally
XML-formatted.
29
The Tomcat servlet engine is often used along with Apache or other web servers.
However, it can also function as an independent web server. Earlier in its development,
the perception existed that Tomcat was only suitable for development environments and
other environments with minimal requirements for speed and transaction handling. Now,
Tomcat is increasingly used as a stand-alone web server in high-traffic, high-availability
environments.
Tomcat is cross-platform, running on any operating system that has a Java
Runtime Environment.
3.3 OpenLaszlo
OpenLaszlo is an open source platform for creating web applications with a user-
friendly interface. OpenLaszlo programs are written using the LZX programming
language, which is a JavaScript description language and XML, compiled in Flash. An
OpenLaszlo application developed on one machine will run on all leading Web browsers
on all leading desktop operating systems.
Figure 8. OpenLaszlo client-server architecture.
30
3.4. Conversion and Hinting Tools
3.4.1. FFmpeg
FFmpeg is an open source video and audio converter developed by Linux that can
convert video and audio files from one format to another. The project is made of several
components:
ffmpeg is a command line tool to convert one video file format to another. It also
supports grabbing and encoding in real time from a TV card.
ffserver is an HTTP (RTSP is being developed) multimedia streaming server for
live broadcasts. Time shifting of live broadcast is also supported. Note that this is
very buggy and unlikely to work.
ffplay is a simple media player based on SDL and on the FFmpeg libraries.
libavcodec is a library containing all the FFmpeg audio/video encoders and
decoders. Most codecs were developed from scratch to ensure best performance
and high code reusability.
libavformat is a library containing multiplexers and demultiplexers for
audio/video container formats.
libavutil is a helper library containing routines common to different parts of
FFmpeg.
libpostproc is a library containing video post processing routines.
libswscale is a library containing video scaling routines.
3.4.2. MP4Box
MP4Box aims to provide tools needed to produce and distribute MPEG-4, 3GP
31
and 3GP2 content in a single command-line application. The following is a list of
MP4BOX features:
file layout (fragmentation or interleaving), file cleaning (ISMA and 3GP conversions).
file splitting by size or time, chunk extraction from file and file concatenation, including
all supported input files concatenation (eg cat a set of AVIs to a single 3GPP/MP4).
file hinting for RTP/RTSP and QTSS/DSS servers (MPEG-4 / ISMA / 3GP / 3GP2
files).
XML information dumping for MP4 and RTP hint tracks.
3GPP timed text tools (conversion from SUB/SRT/TTXT/TeXML and extraction to
SUB/SRT/TTXT).
VobSub import/export
Media stream import and extraction when encoding a BT/XMT file.
MPEG-4 BIFS codec and scene conversion from and to MP4, BT and XMT-A formats.
MPEG-4 LASeR codec and scene conversion from and to MP4, SVG and XSR (XML
LASeR) formats.
XML scene statistics for BIFS scene (BT, XMT-A and MP4).
Conversion of simple Macromedia Flash (SWF) to MPEG-4 Systems (BT/XMT/MP4).
Conversion to and from BT, XMT-A, WRL, X3D, X3DV formats.
For this thesis, MP4BOX was primarily used for hinting. File hinting involves
creating special tracks in the file that contain transport protocol specific information and
optionally multiplexing information. These tracks, called hint tracks, are then used by the
32
server to create the actual packets being sent over the network, in other words they
provide the server 'hints' regarding packet building.
MP4Box can generate these hint tracks for the RTP protocol (the most widely
used protocol for multimedia streaming). The resulting file can then be streamed to
clients with any streaming server understanding the file format and hint tracks, such as
the Darwin Streaming Server.
-hint : hints the given file for RTP/RTSP
-mtu size : specifies the desired maximum packet size, or MTU (Maximum Transmission Unit). This must be choosen carefully: specifying too large packets will result in undesired packet fragmentation at lower transport layers. The default size when hinting is 1450 bytes (including the 12 bytes RTP header).
-multi [maxptime] : enables sample concatenation in a single RTP packet for payload formats supporting it. maxptime is an optional integer specifying the maximum packet duration in milliseconds, used for some audio payloads. Its default value is 100 ms.
-copy : forces hinted data to be copied to the hint track. This speeds up packet building at server side but takes much more space on disk.
-rate clock_rate : specifies the rtp clock rate in Hz when no default one exists for the given RTP payload. The default rate of most AV formats is 90000 Hz or the audio sample rate.
-mpeg4 : forces usage of MPEG-4 Generic Payload whenever possible.
-latm : forces usage of LATM payload for MPEG-4 AAC.
-static : enables usage of static RTP payload IDs (pre-defined IDs as specified in RTP). By default MP4Box always uses dynamic payload IDs, since some players do not recognize static ones.
-sdp_ex string : adds the given text to the movie SDP information (-sdp_ex "a=x-test: an sdp test") or to a track (-sdp_ex "N:a=x-test", where N is the hint track or its base track ID). This will take care of SDP line ordering.
-unhint : removes all hint tracks and SDP information from file. This can be useful since MP4Box doesn't remove any existing hint tracks when hinting the file.
MP4Box usually generates a temporary file when creating a new MP4 or 3GP
file. The location of this temporary file is OS-dependent, and it may happen that the
drive/partition the temporary file is created on has not enough space or no write access. In
such a case, a temporary file location can be specified with the -tmp path_to_dir option.
MP4Box always stores the file with 0.5 second interleaving and meta-data at the
33
beginning, making it suitable for HTTP streaming.
MP4Box provides only a command line interface. For this thesis, the following
command was used:
mp4box -3gp -mtu 1450 -hint videofilename
3.4.3. Flash Video MetaData Injector (FLV MDI)
FLV MetaData Injector is a Win32 console application that can add 'onMetaData'
AMF data to FLV files. FLVMDI optionally saves an XML version of the injected data,
and can add an additional string data or save the onMetaData data to an XML file.
Metadata include timestamps, duration or length of the video, height and weight in pixels,
With Apache (the HTTP server), MySQL (the database management system),
PHP and Perl (the programming languages), including some other modules, dynamic web
pages can be delivered. XAMPP just needs to be downloaded and extracted. No editing
of configuration files is necessary.
For this thesis, XAMPP was downloaded from
http://www.apachefriends.org/en/xampp-windows.html. After the complete installation,
XAMPP can be found under Start / Programs / XAMPP. The XAMPP Control Panel can
be used to start/stop all servers and also install/uninstall services.
4.1.2. Apache Tomcat, Red5 and OpenLaszlo
OpenLaszlo is an open source platform for creating and delivering web
applications with interface capabilities comparable to desktop client software. It is a Java
servlet that compiles applications into executable binaries for targeted runtime
39
environments. Apache Tomcat is an open source implementation of Java Servlet and
JavaServer Pages (JSP) technologies. Red5 is an open source Flash server that supports
streaming and recording of audio and video, as well as live stream publishing.
For the installation of an OpenLaszlo Presentation Server and Red5 Flash Server
on top of an Apache Tomcat server, these files were downloaded:
JDK 5.0 Update ‘xx’ (Java SE Development Kit (JDK)) from http://java.sun.com/javase/downloads
Tomcat 5.5 from http://tomcat.apache.org:- Core (windows service installer)- Administration Web Application
OpenLaszlo Dev Kit (war file) from www.OpenLaszlo.org Red5 war file from www.osflash.org/red5
These instructions were followed for the installation of JDK and Tomcat 5.5:
Perform a standard installation of JDK. Install Apache Tomcat using the default server port 8080 and remember the
admin login credentials. Test the installation in the browser: http://localhost:8080. Install the Admin Web Application for easy Tomcat administration. Stop the Tomcat Service from the Taskbar. Open “apache-tomcat-5.5.20-admin.zip” and drop the folders “conf” and “server”
into “C:\Program Files\Apache Software Foundation\Tomcat 5.5\”. Test the installation again in the browser (http://localhost:8080) by clicking on
“Tomcat Manager”.
OpenLaszlo can be installed from within the Admin Web Application:
Click on Tomcat Manager. Locate “WAR file to deploy” and use the buttons “Browse…” and “Deploy” to
install “OpenLaszlo-3.3.3.war”. Test the OpenLaszlo installation by accessing http://localhost:8080/OpenLaszlo-
3.3.3/.
Red5 can be installed by these instructions:
Rename “red5-0.6rc1.war” into “red5.war” to get a nice deployment URL (context path) and deploy it.
Test the Red5 installation by accessing http://localhost:8080/red5.
The following were the steps followed in setting up the Darwin Streaming Server
using Windows Server 2003:
Click the Streaming Server Admin icon in the Dock. Open the web browser from a server with Darwin Streaming Server installed. From a remote computer, open Microsoft Internet Explorer version 4.5 or later, or Mozilla 1.0 or later.
Enter the URL for the Streaming Server Admin computer. For example:http://hostname:1220 where hostname is the IP address of the streaming server computer and 1220 is the port number.
Enter a username and password. This password will be used when sending an MP3 stream to the streaming server.
Click Next. The Secure Administration page appears. Enable this option only if the server will be administered remotely and has an SSL certificate installed for secure remote administration.
Click Next. The Media Folder page appears. Note the default path. This is where the media that will be streamed should be placed.
Click Next. The Streaming on Port 80 page appears. Enable port 80 if viewing content from outside the local area network (that is, from the Internet) will be allowed.
Click Finish. The Streaming Server Admin main screen appears. The message “Server is Running” should appear at the top of the screen.
If the message “Server is Idle” appears, click the Start Server button to start the server. The streaming server is now active and ready to stream media.
Specific ports need to be opened in the firewall to allow RTSP requests from
users, encoded video and audio from the broadcaster, and outbound streams to clients on
the local network and the Internet. These are the ports used by the Darwin Streaming
Server and for incoming and outgoing requests:
Ports used to communicate with client: 554, 7070 TCP or 80 TCP
Ports used to send media: 6970-6999 UDP, or 80 TCP
Ports used to receive broadcast: 10000-65635 UDP
Ports server will stream through: 554 RTSP 7070 TCP or 80 TCP
Default port typically used by MP3 broadcasters: 8000 TCP
Port used for remotely managing QTSS or DSS: 1220 TCP
41
4.1.4. FFmpeg
FFmpeg is open source software that can record, convert and stream digital audio
and video. FFmpeg was installed by downloading and extracting the contents of the file
“ffmpeg-php-0.5.0.zip” located at http://ffmpeg.mplayerhq.hu.
4.1.5. MP4Box
In order to serve files using Streaming Servers, files first need to be “hinted.”
MP4Box is the tool used in this thesis for hinting files. It is available for download at
Can IP camera technology truly serve the networking issue? www.ionittech.com/ionit%20NEWS/Nov%202004%20IP%20camera%20article%20.pdf
Darwin Streaming Server. http://developer.apple.com/opensource/server/streaming/index.html, Retrieved on 2007-02-05.
Delivering Flash Video: Understanding the Difference Between Progressive Download and Streaming Video. http://www.adobe.com/devnet/flash/articles/flv_download_04.html.
FFmpeg Documentation. http://ffmpeg.mplayerhq.hu/ffmpeg-doc.html, Retrieved on 2007-02-05.
Flash Player Statistics. http://www.adobe.com/products/player_census/flashplayer/.
Flash Video 101: Flash Video Delivery Options. James Gonzalez. http://www.peachpit.com/articles/article.asp?p=606981&rl=1
Flash Video Player 3.5. http://www.jeroenwijering.com/?item=Flash_Video_Player
Flvmdi: www.buraks.com/flvmdi/
FLV video Compression. http://www.jeroenwijering.com/?item=FLV_Video_Compression
Internet Protocol Television (IPTV). http://www.iec.org/online/tutorials/iptv/.
Introduction - How to create streaming video. http://www.mediacollege.com/video/streaming/overview.html
Microsoft (April 24, 2003). Microsoft Windows Server 2003 Is Available Worldwide Today. http://www.microsoft.com/presspass/press/2003/apr03/04-24windowsserver2003launchpr.mspx, Retrieved on 2007-02-05.
Streaming Technology in 3G Mobile Communication Systems. Elsen,I., Hartung,F., Horn, U., Kampmann, M. and L. Peters. http://ieeexplore.ieee.org/iel5/2/20507/00947089.pdf?arnumber=947089
Streaming vs Progressive Download vs PHP streaming. http://www.rich-media-project.com/info/info/index.php
Symbian and RealNetworks form alliance to enable mobile media experiences for next generation mobile handsets. http://www.symbian.com/news/pr/2001/pr20013005.html
TIME Best Inventions 2006 (November 7, 2006). http://www.time.com/time/2006/techguide/bestinventions/inventions/youtube.html, Retrieved on 2007-02-05
Appendix A: Video File Formats
69
Flash Video (FLV)
The Macromedia Flash Video format lets the user import or export a static video
stream with encoded video. This format is intended for use in communications
applications, examples of which are video conferencing. Common websites that use FLV
are YouTube and Google Video.
When videos are exported with streaming audio in FLV format, the audio is
compressed using the Streaming Audio settings in the Publish Settings dialog box. Files
in the FLV format are compressed with the Sorensen codec. The Sorensen codec is an
innovative compression codec that have advanced the horizons in areas such as vector
quantization, discrete cosine transform, fractals, wavelets, and sophisticated motion
compensation techniques.
Audio Video Interleaver (AVI)
The AVI file format is based on the Resource Interchange File Format (RIFF).
The Microsoft AVI file format is a RIFF file specification used with applications that
capture, edit, and play back audio-video sequences. In general, AVI files contain multiple
streams of different types of data. Most AVI sequences use both audio and video streams.
A simple variation for an AVI sequence uses video data and does not require an audio
stream.
Moving Picture Experts Group 4 (MPEG-4)
MPEG4 was created by the Moving Pictures Experts Group (MPEG), the working
group within the International Organization for Standardization that also gave us the
widely used standards MPEG-1, MPEG-2 and MPEG-3, popularly known as MP3.
MPEG-4 is a universal multimedia standard that can deliver good quality audio and video
70
streams over a range of bandwidths, from cell phones to websites.
For developers, MPEG-4 enables the production of content that has greater
reusability and greater flexibility than is possible today with individual technologies such
as digital television, animated graphics, World Wide Web pages and their extensions. For
end users, MPEG-4 brings higher levels of interaction with content, within the limits set
by the developer. End user applications include interactive multimedia broadcast and
mobile communications.
3rd Generation Partnership Project (3GPP)
3GPP and 3GPP2 are the worldwide standards for the creation, delivery and
playback of multimedia over 3rd generation, high-speed wireless networks. 3GPP was
established in December 1998 by the signing of the “The 3 rd Generation Partnership
Project Agreement”.
The original scope of 3GPP was to produce global applicable Technical
Specifications and Technical Reports for a 3rd Generation Mobile System based on
evolved GSM core networks and the radio access technologies that they support (e.g.
Universal Terrestrial Radio Access, Frequency Division Duplex and Time Division
Duplex modes). The scope was subsequently amended to include the maintenance and
development of the Global System for Mobile communication Technical Specifications
and Technical Reports including evolved radio access technologies (e.g. General Packet
Radio Service and Enhanced Data rates for GSM Evolution).
Appendix B: IP Cameras
71
IP cameras are cameras that basically plug directly into a network. They are also
digital, meaning that the video is broken down into data packets, which allows compres-
sion and throttling to take place. IP cameras do the compressing at the camera. Throttling
is basically managing the amount of data that is sent. Additionally, IP cameras allow you
to alter the frames per second and the resolution. .
IP cameras offer flexibility in the access of information and video. Analog camera
systems require a point-to-point mode, where a constant video stream of frames is sent
from the camera to the DVR. With analog camera systems, traditionally viewing could
normally only be done on designated stations that have hardware connected directly to
the camera. IP cameras allow access to the camera via the basic web browser as long as
one has access to the network.
IP cameras are ideal for traffic control, video conferencing, process control, or
marketing and advertising. They are perfect for companies that want multiple persons to
have access to view their facility, like the travel industry. IP cameras are also used for ap-
plications that just want to drop in a camera for temporary purposes: Covert operations,
construction sites, or remote facilities that have difficulty housing a recording device on-
site, due to lack of environmental or vandal safe structures. IP cameras also allow offsite
recording of video.
To be considered a network IP camera, all that is required is that the camera be
connected directly (wired or wireless) to the network to send and receive video informa-
tion. Image quality, resolution, frame speed and the amount of bandwidth required to
transmit are typical considerations in choosing IP cameras, but one must also consider the
embedded operating systems, storage capability (for example, 560 images at 320x240)
72
and software that allows integration to other security and surveillance solutions. IP cam-
eras eliminate the need for point-to-point connection to a PC. The IP camera maintains its
own IP/TCP or UDP address and its operating software to manage the video and integrate
with other devices such as access control. The PC is only needed for programming, play-
back, viewing and recording. But the IP camera industry now uses IP servers that allow a
single controller (or multiple controllers if the application calls for it) to manage hun-
dreds even thousands of cameras.
Appendix C: Flashvars Options
73
Flashvars are configuration options that can be inserted into HTML code to
control both behavior and appearance of the player. In the lists below, all flashvars are
explained.
BASIC FLASHVARS
file (url): The location of the file to play. It can be a single file (MP3/FLV/RTMP/JPG/SWF/PNG/GIF) or a playlist for the players. The rotator only accepts playlists.
image (url): If you play MP3 of FLV files, you can use this flashvar to show a preview image or album cover. It can be a JPG/SWF/PNG/GIF file.
displayheight (number): This flashvar is used by the players and sets the height of the display. It defaults to the height of the SWF object minus the controlbar (20px), but if you set it to a smaller height, the playlist will show up. If you set it to exactly the height of the SWF object, the controlbar wil disappear as well.
transition (fade,bgfade,blocks,circles,fluids,lines,random): This flashvar is only used by the rotator. It sets the transition to use between images. "random" will show all transitions randomly. The default is "fade".
shownavigation (true,false): Another flashvar only for the rotator. It enables/disables the navigation bar.
1. COLOR FLASHVARS
backcolor (color): Backgroundcolor of the player/rotator. In the "extras" folder of this download there's a colorpicker script with which you can pick a color value. The default for the players is 0xFFFFFF (white) and for the rotator 0x000000 (black).
frontcolor (color): Texts / buttons color of the player/rotator. The default for the players is 0x000000 (black) and for the rotator 0xFFFFFF (white).
lightcolor (color): Rollover/ active color of the player/rotator. The default for the players is 0x000000 (black) and for the rotator 0xCC0000 (red).
2. DISPLAY FLASHVARS
showicons (true,false): Show or hide the play and activity icons in the middle of the display. Defaults to true for the players and false for the rotator.
overstretch (true,false,fit,none): Defines how to stretch images/movies to make them fit the display. "true" will stretch them proportionally to fill the display, "false" will stretch them to fit. "fit" will stretch them disproportionally to fit both height and width. "none" will show all items in their original dimensions. Defaults to "fit" for the players and "false" for the rotator.
logo (url): Set this flashvar to put a watermark logo in the bottom right corner of the display. If you've set the "link" flashvar as well, the logo will link to there. Again, all image formats are supported, but transparent PNG files give the best results.
74
captions (url): You can set this flashvar to the location of a textfile with captions. The players support SMIL's TimedText format and the SRT format used with ripped DVD's. An example of both formats can be found in the "extras" folder of the download.
showeq (true,false): Set to true to show a fake equalizer in the display. It adds a nice graphical touch when you are playing MP3 files.
showdigits (true,false): Set this to false if you don't want the elapsed/remaining time to display in the controlbar of the players. Quite handy to save some space.
thumbsinplaylist (true,false): If you have a playlist that also includes preview images with the <image> element, you can set this flashvar to "true" to show them in the playlist.
autoscroll (true,false): By default, the playlist area of the players will have a scrollbar if the number of items is too long. If you set this flashvar to "true", the scrollbar wil disappear and the playlist will scroll automatically, depending upon the mouse position.
3. FULLSCREEN FLASHVARS
fullscreenpage (url): The players automatically show a fullscreen button if a user has installed a flashplayer capable of true fullscreen (from 9.0.28). With this flashvar, you can also present a sort-of fullscreen for users who have an older version of the Flash plugin. A click on the fullscreen button will jump to the HTML page you specified here. In this HTML page, you can present a full-browser-screen version of the flvplayer/mediaplayer (just like in the download's example).
fsreturnpage (url): To let the browser know what page to jump to when somebody wants to close the semi-fullscreen, you can set the "normal" page as the fsreturnpage flashvar. It will be passed through to the fullscreen page with a flashcookie.
fullscreenmode (true,false): Set this flashvar to true for embedding of the player in the fullscreen page. The player will then get the "file","image","id" and "fsreturnpage" flashvars from a cookie and will present the "normal screen" button in the playlist, instead of the "full screen" button.
showfsbutton (true,false): Set this flashvar to false to hide the fullscreenbutton, even if flash9 is detected.
4. INTERACTION FLASHVARS
link (url): If you have set a watermark logo, you can set this flashvar to a web address you want the logo to link to.
linkfromdisplay (true,false): Additionally, you can set this flashvar to "true" to make a click on the image/video display result in a jump to the "link" webpage.
linktarget (frame): The targetframe a link (from logo, display or playlist buttons) will open into. The default is "_self". Set it to "_blank" to open links in a new window.
callback (url): Set this flashvar to the location of a serverside script (PHP/ASP) that can process callbacks. The players will send a callback every time an item
75
starts/stops, so you can save statistics with the serverside script. More info can be found in this demonstration page. An example callback script is placed in the "extras" folder of the downloads.
enablejs (true,false): Set this to true to enable javascript interaction. This'll only work online! Javascript interaction includes playback control, asynchroneous loading of media files and return of track information to javascript.An example of all supported javascript functions can be found on this page.
5. PLAYBACK FLASHVARS
autostart (true,false): Set this to "true" to make the player automatically start playing when the page loads.
volume (number): The default volume for playback of sounds/movies is 80, but you can set another value with this flashvar.
shuffle (true,false): If you use a playlist, the players and rotator will automatically shuffle the entries to prevent boredom. Set this flashvar to "false" to play all items sequentially.
repeat (true,false,list): By default, the players will stop playback after every item to preserve bandwidth (repeat=false). You can set this to "list" to playback all items in a playlist once, or to "true" to continously playback your song/movie/playlist. The rotator's default is "true".
rotatetime (number): Use this flashvar to set the number of seconds you want an image to display. The default is "10" for the mediaplayer and "5" for the rotator.
bufferlength (number): This sets the number of seconds an FLV should be buffered ahead before the player starts it. Set this smaller for fast connections or short videos. Set this bigger for slow connections. The default is 5 seconds.
streamscript (url): This flashvar is the URL of an optional script to use for 'fake streaming' FLV files, eg. through PHP, ASP or LigHTTPD. The parameters 'file' and 'pos' are sent to the script.