Wednesday, June 30, 2010


Concerns about patents and licensing have prevented some browsers from supporting H.264; this in turn has prevented the HTML5 spec from requiring support for a standard format. We believe the web needs an open video format option. One that not only helps address the licensing concerns, but is also optimized for the unique attributes of serving video on the web. To that end, we’re excited about the new WebM project. Google is open sourcing and contributing the VP8 codec to the WebM effort. Google, Mozilla, and Opera have all committed to support WebM, and we have already started making YouTube videos available in the WebM format. Adobe has also committed to support VP8, the video codec for WebM, in an upcoming Flash Player release.

Full article here:

Tons of html 5 video sample are available at mostly ogg

You’ll probably already have read up on and experimented with the new HTML5 video element, which allows us to include video inside an HTML page without the need for plugins (if not, read our Introduction to HTML5 video before going any further.) You’ll probably also be aware that there is somewhat of a disagreement over codecs going on. Opera and Firefox currently support the Ogg Theora video codec, while Safari supports the H.264 codec. Google Chrome supports both, while Microsoft have announced support for H.264 in IE9. This is not ideal, as to implement a cross-browser video with HTML5 you would need to encode and reference multiple video formats. For example:

Enter WebM
Help is just around the corner — Google has released the VP8 video codec and WebM container format under royalty-free terms, with the aim of making a high quality, open video format available across different browsers and platforms. This was announced publicly at the 2010 Google I/O conference. Opera has created an experimental WebM-enabled build, which you can play with today.

Windows standard installer
Windows classic installer

Mac universal binary
Mac intel package

Linux 32-bit
Linux 64-bit

It is clear that Adobe now needs to integrate webm support in Flash Player and FLash Media Server ASAP.


by providing the user the ability to decide on various fallback

If your browser supports it, HTML5 video is used.
If HTML5 video is not supported, Adobe Flash is used.
Finally, if all else fails, a placeholder image is shown
This is all done without JavaScript and requires only two video encodes, one OGG file, and one MP4 file.

It’s compatible with HTML 4, HTML5 (valid markup), XHTML 1 and additionally also works when served as application/xhtml+xml

Ensure your server is using the correct mime-types. Firefox will not play the OGG video if the mime-type is wrong. Place these lines in your .htaccess file to send the correct mime-types to browsers
AddType video/ogg .ogv
AddType video/mp4 .mp4
AddType video/webm .webm

Now I am wondering how Microsoft is going to handle ism file format and how non microsoft browser are going to respond. The fallback mecanism should work with IE9 and support ism file format.

Thursday, June 24, 2010


Tom Krcha (platform evangelist at Adobe) has a bunch of stuff on his website about RTMFP.
lately he's been focusing on some of the new advanced topics, like RTMFP Groups, but he has materials
covering the spectrum of P2P topics. I went to and sign up to test RTMFP with
Flash Builder 4.0. The video tutorial are fantastic and the COCOMO SDK is very complete and fully loaded
with MXML sample.

Few interesting articles: . articles and tutorials on using RTMFP

When using the COCOMO sample avoid basic and simple authentication which hardcode
the login and password inside the MXML. Instead take advantage of authentication using

Quicktime 7 / Quicktime X

QuickTime 7.x QuickTime 7 represents one of the largest architectural changes to the QuickTime lineage since its first version Initially released on April 29,2005 in conjunction with Mac OS X v10.4 (for version 10.3.9 and 10.4.x), QuickTime 7.0 featured the following:
• Improved MPEG-4 compliance
• H.264/MPEG-4 AVCcod ec
• Core Graphics (Quartz) for screen drawing, allowing for live resizing and playback on an OpenGL surface
• Core Audior eplacin g Sound Manager, supporting high resolution sound
• Support for using Core Image filters in Mac OS X v10.4 on live video, also known as Core Video
• Support for Quartz Composer (.qtz) animations
• Support for distinct decode order and display order
• The QTKit, aCocoa framework for QuickTime After a couple of preview Windows releases, Apple released 7.0.2 as the first stable release on September 7, 2005
for Windows 2000 and Windows XP. Version 7.0.4, released on January 10, 2006 was the first universal binary version. But it suffered numerous bugs, including a buffer overrun, which is more problematic to most users. Apple dropped support for Windows 2000 with the release of QuickTime 7.2 on July 11,2007. The last
version available for Windows 2000, 7.1.6, contains numerous security vulnerabilities. Apple has not
indicated that they will be providing any further security updates for older versions. QuickTime 7.2 is the first version for Windows Vista.

Apple dropped support for Flash content in QuickTime 7.3,
breaking content that relied on Flash for interactivity, or animation tracks and those feature were removed from Flash CS4 on Adobe's side.
Security concerns seem to be part of the decision. In QuickTime 7.3, a processor that supports SSE is required. QuickTime 7.4 does not require SSE. Unlike versions 7.2 and 7.3, QuickTime 7.4 refuses to be installed on Windows XP SP1 system (its setup program checks if Service Pack 2 is installed). QuickTime 7.5 was released on June 10,2008.

QuickTime X QuickTime X (pronounced Quicktime Ten) is the next version of QuickTime. It was announced at WWDCon June 9, 2008. It will ship with Mac OS X v10.6 in mid-2009. It will be built upon media technology first used in iPhone OS and will have support for modern codecs and more efficient media playback.
Creating software that uses QuickTime QuickTime consists of two major subsystems: the Movie Toolbox and the Image Compression Manager. The Movie Toolbox consists of a general API for handling time-based data, while the Image Compression Manager provides services for dealing with compressedr aster data as produced by video and photo codecs.
Developers can use the QuickTime software development kit (SDK ) to develop multimedia applications for Mac or Windows with the C programming language or with the Java programming language (see QuickTime for Java ), or, under Windows, using COM/ActiveX from a language supporting this. The COM/ActiveX option was introduced as part of QuickTime 7 for Windows and is intended for
programmers who want to build standalone Windows applications using high-level QuickTime movie playback and control with some import, export, and editing capabilities. This is considerably easier than mastering the original QuickTime C++ API.

QuickTime 7 for Windows introduces a completely redesigned COM/ActiveX control that is fully scriptable from Visual Basic, C#, JavaScript, C++ and other applications that can host COM objects. This means that its even easier for Windows programmers to build standalone Windows applications that use QuickTime without needing to master QuickTime’s C/C++ API. Fully scriptable using either JavaScript or VBScript, automating your QuickTime workflow just got a whole lot easier.

For example, if your Windows server can run a Visual Basic, C# or a JavaScript application that uses QuickTime, you have the ability to create custom QuickTime content dynamically for delivery via the Web. As long as your clients have QuickTime installed, your content will work with Windows and Mac clients, Internet Explorer and non-Internet Explorer browsers.

In order to access these capabilities all you need to do is download the QuickTime 7 for Windows Software Development Kit (SDK). The old link for quicktime now point to

QuickTime 7 for Mac introduced the QuickTime Kit (aka QTKit), a developer framework that is intended to replace previous APIs for Cocoa developers. This framework is for Mac only, and exists as Objective- C abstractions around a subset of the C interface. Mac OS X v10.5 extends QTKit to full 64-bit support.

QTKit is an Objective-C interface to QuickTime available on Tiger, and also available with QT7 on Panther. It supercedes the Cocoa classes NSMovieView and NSMovie with a larger set of classes which provide a comprehensive interface into QuickTime from Objective-C. In addition to basic playback and tweaking, QTKit allows full-blown editing and other such goodies.

QTKit is also the name of an open-source wrapper around QuickTime that was made outside of Apple. For information on that wrapper,

Tuesday, June 22, 2010

Microsoft IIS Smooth Streaming Format SDK 1.0 Beta 2

On June 18 2010, Microsoft released Beta 2 of the Microsoft IIS Smooth Streaming Format SDK 1.0.

The IIS Smooth Streaming Format SDK provides application developers the capability to mux encoded video and audio elementary streams into Smooth Streaming fragmented-MP4 format that is compliant with the Smooth Streaming Format and Protected Interoperable File Format (PIFF) specifications. The IIS Smooth Streaming Format SDK includes a native C++ static library that can be linked into your applications to support the muxing of fragmented-MP4 into files or sent live via HTTP POST to a server running Internet Information Services (IIS) 7.0 and IIS Media Services 3.0 and IIS Media Services 4.0 Beta 1. The SDK is available for download here.

Documentation for the SDK can be found online here – IIS Smooth Streaming Format SDK MSDN documentation and the release notes are available here – IIS Smooth Streaming Format SDK Beta 2 Release Notes.

The primary purpose of the IIS Smooth Streaming Format SDK is to enable developers to create applications that can generate PIFF compliant Smooth Streaming formatted fragmented-MP4 files for use in video-on-demand and live streaming scenarios. In addition, the SDK can be used to encrypt content using standard AES encryption as required by the PIFF specification (this SDK only supports the PlayReady specific protection headers).

It is expected that the video and audio encoding functionality is done externally from the SDK. Encoding for VC-1 can be accomplished by using the Microsoft VC-1 Encoder SDK – Professional. If you wish to do H.264 encoding, you will need to acquire a 3rd party H.264 encoding SDK and AAC audio encoder. There are lots of encoding library choices available both free and commercial.

The components of the SDK include:

1. A static-linked packaging library ssfsdk.lib, along with appropriate header files, that delivers f-MP4 wrapping capability to an application for use with the following video and audio codec combinations:
* Closed GOP encoded VC-1 with Elementary Stream Sequence Headers and WMA Pro, or WMA audio
* H.264 (AVC1 closed-GOP streams only with IDR frames at the first sample of a GOP – must not be an Annex B stream. PPS and SPS NAL units are not supported in the stream)
* AAC-LC audio
2. Sample source code for a basic on-demand muxing application that uses DirectShow to source from files.
3. Link to online MSDN documentation.

Updates included in the Beta 2 release of the Smooth Streaming Format SDK are:

* H.264 PlayReady sub-sample encryption support.
* PIFF 1.1 spec compliance.
* Multi-language audio muxing.
* Text stream and TTML track muxing support.

This is in addition to the following supported features:

* Support for Protected Interoperable File Format (PIFF) 1.1 compliant fragmented-MP4 file output.
* Support for ISO Base Media (ISO/IEC 14496-12:2008) spec compliance.
* Support for muxing live and on-demand content.
* Support for appropriate header boxes and formatting required for live streaming using IIS Media Services.
* Support for AES-CTR encryption of VC-1 and H.264 encoded content for use with PlayReady licensing servers and Silverlight 4.0 or higher.
* Support for writing out a compliant Smooth Streaming Transport Protocol server manifest files.
* Support for writing out a compliant Smooth Streaming Transport Protocol client manifest files.

NOTE: Beta 2 includes a “Go-Live” license if you would like to use this SDK in production applications.

If you have questions on how to use this SDK in your applications, comments, or feedback on the SDK please send them to me directly or to

Download the Smooth Streaming Format SDK Beta 2 here:




* Download the Protected Interoperable File Format specification
* Download the IIS Smooth Streaming Transport Protocol Specification
* Download the Smooth Streaming Client 1.0
* API documentation for Smooth Streaming Client
* More Information on Smooth Streaming
* More Information on Live Smooth Streaming
* Supporting documentation on getting started with Smooth Streaming
o Smooth Streaming for IIS 7.0 – Getting Started
o Live Smooth Streaming for IIS 7.0 – Getting Started
o Smooth Streaming Deployment Guide
o Building your first Smooth Streaming Player using SSME

Monday, June 14, 2010

Compile Live555 using VS2008

Compile Live555 using VS2005
Live555 is a media library to support local and streaming play media files. Its source code is easy to understand and extensible so it's suitable for doing some quick experimentals or demos. It's a cross-platform solution which supports Windows and Linux. But the original source package cannot generate the correct make file for VS2005. We need do some modification listed step by step here.

1. Modify the line "TOOLS32 = ..." in win32config to point to the VS2005 installed directory in your host machine. For example, "TOOLS32 = C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC" is corresponding to my desktop's configuration. Note that I have Windows 7 64 Bit.

2. Modify the line "LINK_OPTS_0 = $(linkdebug) msvicrt.lib" in win32config to "LINK_OPTS_0 = $(linkdebug) msvcrt.lib", otherwise VS2008 will report msvicrt.lib cannot be found.

3. Run genWindowsMakefiles.cmd to generate *.mak for VS2005/VS2008

4. Modify liveMedia/RTSPOverHTTPServer.cpp to add the following code:
#if defined(__WIN32__) || defined(_WIN32)
#define snprintf _snprintf

Not require with live.2010.06.11

5. Modify groupsock/Makefile.head. Change from "INCLUDES = -Iinclude -I../UsageEnvironment/include" to "INCLUDES = -Iinclude -I../UsageEnvironment/include -DNO_STRSTREAM".

6. Save the following commands into a bat file in the src directory.
call "C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC
cd liveMedia
nmake /B -f liveMedia.mak
cd ../groupsock
nmake /B -f groupsock.mak
cd ../UsageEnvironment
nmake /B -f UsageEnvironment.mak
cd ../BasicUsageEnvironment
nmake /B -f BasicUsageEnvironment.mak
cd ../testProgs
nmake /B -f testProgs.mak
cd ../mediaServer
nmake /B -f mediaServer.mak

7. run the saved bat file. Done :)

Now it's turn to debug using VS2008, because we don't have a solution file for VS2008, so we need to find another method to debug run.
1. you need to modify win32config to enable debug mode. Just comment the line "NODEBUG=1".
2. File->Open->Project/Solution to load a exe file to be debugged.
3. Debug->Step Over, it will stop at the main function entry point.


IIS Smooth Streaming
Flash Dynamic Streaming
HTTP Adaptive Bitrate Streaming
Cost per Streaming Server Free download1 + $469 for OS2$45003 + OS cost4Cost of Web server5 + segmenter OS6
On-demand & Live Streaming
Live Streaming DVR7Pause & Seek
Streaming ProtocolHTTPRTMPHTTP
Scalability via HTTP Edge Caches 
Stateless Server Connection8 
Supported PlatformsSilverlight, Xbox 360, other Smooth Streaming-compatible players, and iPhone OS 3.09Flash Player 10, AIRiPhone OS 3.0, devices running QuickTime X
DRM Support for Live, VODPlayReadyNone10None
DRM ASP & Encoder ISV Support  
Interoperable DRM (DECE Approved)11  
Real-time Client and Server Logging12  
Programmable Client Side Switching Logic 
Live In-Stream Ad Integration   
Built-in Analytics Framework  
Delivery to Mobile Devices  
Native 64-bit Server Support  
Media ContainerMPEG 4 – Part 12 (Fragmented MP4)MPEG 4 – Part 12 (MP4), FLVMPEG-2 TS
Supported Video CodecsCodec Agnostic (currently supports VC-1 Advanced Profile & H.264 Baseline, Main, and High)H.264 Baseline, Main, and High; VP6H.264 Baseline Level 3.0
Supported Audio CodecsCodec Agnostic (currently supports WMA & AAC)AAC, MP3MP3, HE-AAC, AAC-LC
Maximum Bit RateNo limitNo limit1.6 Mbps
Default Fragment Length2 secondsn/a10 seconds
End-To-End LatencyAs low as 1.5 seconds (configurable)6 seconds30 seconds13
File Type on ServerContiguousContiguousFragmented
Client Programming PlatformMicrosoft .NET FrameworkAdobe ActionScriptObjective-C

1 IIS Smooth Streaming is part of the free IIS Media Services download for Windows Server 2008 and Windows Server 2008 R2 .
2 Runs on any edition of Windows Server® 2008 or Windows Server 2008 R2 including Windows® Web Server, which has a list price of $469.
3 Assumes use of Adobe Flash Media Interactive Server to support Pause, Seek, Authentication, and higher scalability
4 Requires Windows Server 2003 SP2, Windows Server 2008, Red Hat® Enterprise Linux® 4, or Red Hat Enterprise Linux 5.2.
5 Runs on any Web server. Also requires the Apple streaming segmenter – see next note.
6 The Apple stream segmenter is a utility that receives encoded MPEG2-TS and breaks it into 10 second “chunks” for delivery. This free download requires an Intel-based Mac, with a Mac Pro or an XServe having two Ethernet network interfaces recommended.
7 Full DVR features include Pause, Seek, Fast Forward (e.g., 2x, 5x playback speeds), Fast Rewind, Go To Live, Instant Replay, and Slow Motion.
8 A stateless (non-persistent) connection between server and client increases scalability and allows seamless failover or rollover between load-balanced servers.
9 Support for adaptive streaming to the Apple iPhone from IIS Media Services 4 was announced on October 18th, 2009.
10 Future support was announced Sept. 10, 2009. Proposed availability is H1 CY10 for delivery to a future version of Adobe® Flash® Player and Adobe AIR™.
11 Digital Entertainment Content Ecosystem (DECE, LLC) is a consortium of major Hollywood studios, consumer electronics manufacturers and retailers, network hardware vendors, systems integrators and Digital Rights Management (DRM) vendors chartered to develop a set of standards for the digital distribution of premium Hollywood content.
12 Real-time logging for Silverlight applications using the IIS Advanced Logging extension.
13 Encoded live streams are processed by the Apple stream segmenter. This intermediate step results in increased latency for live delivery.

It's an adaptive streaming technology combining IIS and Silverlight. The core file format is fragmented MPEG-4, where each "chunk" of video is transmitted as a moof fragment starting with a Closed GOP, via a single HTTP request. A chunk will typically be 2-4 seconds long. Audio can be either muxed into the same chunk, or be provided in a parallel series of chunks to enable multilangauge audio or what have you.

The file format used is straight-up ISO fragmented MPEG-4, using XML and SMIL manifests to indicate what bitrates in the file set and where the fragments in those file are. We're not trying to make up a new file format here; just take advantage of existing technologies in a novel way.

Lots of other details to be had, including this roundup of links:

More importantly, zambelli had a great post showing how Microsoft is using the file format:

And we now have some sample files up that I encoded, including the media files and manifest files:

(if you're curious how it was encoded)

The current samples are VC-1 and WMA 10 Pro, but we'll be supporting H.264 and AAC-LC payloads with the next version of Silverlight later in 2009.

So, if you start seeing these *.ismv files out there, just know that they're
Fragmented MPEG-4
With VC-1 or H.264 for video
WMA 10 Pro or AAC-LC for audio

For apple http streaming, a tool called mediastreamsegmenter will take an MPEG2 transport stream and split it into smaller size chunk. Mediastreamsegmenter documentation is available here

Tuesday, June 08, 2010

HTM5 Video Tag using QuickTime

Very Interesting article about HTML 5 VIDEO TAG using SAFARI

Thursday, June 03, 2010

My First iPhone application

Here's what I have in the (default) login keychain:
• A valid intermediate CA: "Apple Worldwide Developer Relations Cerfitication Authority"
• A valid cert named "iPhone Developer: FirstName LastName" issued by the aforementioned CA
• A RSA 2048-bit private and public key, each named "FirstName iPhone Dev Key"
The keychain application is available through Application/Utilities/
Once your certificate has been deployed you should see under My Certificate something like iPhone Developer: FirstName LastName.
So far, so good. Meanwhile, on the Program Portal, you need to:
• Registered your iPod touch
• Add an App ID (com.mycompany.myapp). I usually create one for each app keeping the com.mycompany the same.
• Create a Development Provisioning Profile for the aforementioned App ID, device and certificate.

A Provisioning Profile is a collection of digital entities that uniquely ties developers and devices to an authorized iPhone Development Team and enables a device to be used for testing. A Development Provisioning Profile must be installed on each device on which you wish to run your application code. Each Development Provisioning Profile will contain a set of iPhone Development Certificates, Unique Device Identifiers and an App ID.

Devices specified within the provisioning profile can be used for testing only by those individuals whose iPhone Development Certificates are included in the profile. A single device can contain multiple provisioning profiles.

Click here to access the Developer Portal and then
click on iPhone Provisioning Portal on the top right corner.
In the ‘Provisioning’ section of the Portal, click on iPhone Provisioning Portal. Team Admins should click 'Add' on the Development tab. Enter a name for the provisioning profile.
Specify which devices will be associated with the provisioning profile. You must specify a device in order for that device to utilize the provisioning profile. If a device's UDID is not included in the provisioning profile the profile and your application cannot be installed on that device.
Specify which iPhone Development Certificates will be associated with the provisioning profile. You must specify an iPhone Development Certificate in order for the application code signed with that same certificate to run on the device.
Specify a single App ID for the Development Provisioning Profile. Each Development Provisioning Profile can specify only ONE App ID, therefore, if you have applications requiring different Keychain access, you will need to create a separate Development Provisioning Profile for each of those applications. If you are installing a suite of applications with the same required Keychain access or have a set of applications not requiring access to the Keychain, use an App ID containing the wild-card asterisk character to build all of your applications.
Click ‘Submit’ to generate your Development Provisioning Profile.

NOTE: On the Portal, the Certificate only shows as "FirstName LastName" and not "iPhone Developer: FirstName LastName".

Installing a Development Provisioning Profile
All Team Agents, Admins and Members can download a Development Provisioning Profile from the ‘Provisioning’ section of the Portal after it has been created. Only those developers whose Apple device IDs and iPhone Development Certificates are included in the provisioning profile will be able to install and test their application on their device.

In the ‘Provisioning’ section of the Provisioning Portal, click the download button next to the desired provisioning profile.
Drag the downloaded file onto the Xcode application icon in the dock or into the ‘Organizer’ window within Xcode. This will automatically copy the .mobileprovision file to the proper directory. Alternatively, you can drag the .mobileprovision file onto the iTunes icon in the dock or copy the file to ‘~/Library/MobileDevice/Provisioning Profiles’. If the directory does not exist you will need to create it. Click on the ‘+’ button in the Provisioning section of the Organizer window to install your .mobileprovision file.
I recommend to create the Library/MobileDevice/Provisioning Profiles else after each download you will end up with all provisioning profile under you Download Folder.

Now, on to the home stretch! In Xcode 2.2.1, you must have:
• REMOVED my build directory (before launching Xcode with said project - OPTIONAL) or just perform a full project clean using XCode for the project in question .
• Docked/synced your iPod touch
• Dragged-and-dropped your downloaded provisioning profile into the appropriate spot in the Organizer. It's not grayed out, and the profile is also in your Library in the expected location.
• Chosen "iPhone Device 2.2.1" as the active SDK.
• Under Targets, select your app, then picked Get Info.
• Under the Build tab, verified Base SDK is set to "iPhone Device 2.2.1". For Code Signing Identity, Any iPhone OS Device, there is a value of "iPhone Developer" - fine.
• Under the Properties tab (right click on Targets then select Get Info, change the Identifier to match my App ID com.mycompany.myappid. Be careful not to add any extra leading space by mistakes (EG copy past from the web) Xcode is too stupid to remove spaces.... lame...