Anti-Hacker Standard Practices
The task of protecting your software from hackers is not easy. Put simply, complete and total protection - is not possible. If the hacker has access to your complete program, they can eventually break any and all protections you put in their way. This is not opinion - it is a fact. This is simply because they control the hardware at the most "intimate" level on which your program is running. As you know, a program is simply a set of instructions. Since the hacker controls the hardware on which those instructions are executed, eventually they will find the instructions in your program where your protections lie and simply change them.
A simple analogy illustrates this point: You have a lock on the front-door to your home don't you? When you leave the house, do you lock it? Of course you do. Why? You lock it because you don't want people to steal your stuff. If the door was unlocked, they would walk in and rob you. But, ask yourself, if they really wanted to get in, could they? If they had a crowbar and a chain-saw of course they could, sometimes they could simply kick in the door. If you had a great deal of valuables, you might get an alarm-system or a stronger door, but again, if they really wanted to rob you - they could. Software that resists hackers is just like a home with a locked door. You must make a reasonable attempt to keep your software safe since that will "keep the honest people honest", but at the same time, do not delude yourself into a false sense of security.
Of course - all is not lost. We recommend that, in light of this knowledge and accepting the facts as they are, instead of playing "the game" of protection with the intent to "win" (to completely stop the hackers) - we play for an impasse. Since we know that a "win" is impossible, we play the "game" for the next best thing - a tie. What we mean by a "tie" is that you should engineer your protections in such a way that:
It is as difficult, tedious and time consuming as possible for a cracker to crack.
Is difficult to crack successfully or without breaking some key part of the program.
If cracked, can be quickly and easily changed so the crack no longer works with the current version of the software.
What can you, as a developer, do to make your implementation of you software licensing solution as secure as possible?
What can you, as a developer, do on an ongoing basis, in order to make your software as secure as possible?
Anti-hacker standard practices are just that - standard. They should not be limited solely to your implementation of the licensing System and the code around it. So, in fact, the two concerns above are one and the same. Below are several simple "tricks" you should consider, that when used together, will force crackers trying to defeat your system to invest incrementally more time in doing so. When used in conjunction with the licensing System, their job will be unpleasant to say the least. Please be sure you understand that the purpose of playing the "game" is an impasse.
Here are several standard things you should do in any software you wish to protect to slow down crackers:
1 - Never give any registration or protection testing function a self describing name. Never use a function name like "IsActivated". Crackers will quickly locate these names (in most high level languages) and simply remove or rewrite them.
2 - Avoid unnecessary error messages. If your program gives an error message after an unsuccessful activation attempt, the crackers will be able to quickly locate the error message and know that at some point in the call stack immediately before it - a protection or activation-test function call failed.
3 - Wait using a timer in a separate thread to provide error messages. When an error message is unavoidable, you may wish to set a timer in a separate thread that will fire several seconds or minutes later to warn the user and take action. This makes tracing back to the protection call that caused the timer to start up more difficult and will slow the cracker down.
4 - Encrypt any and all protection strings. When an error message in unavoidable, be sure to dynamically generate the message string itself. The best way to do this is to store it in encrypted form in the binary and decrypt only immediately before you need it. This makes searching for the string very difficult. Better yet - encrypt all your programs strings.
5 - Use random tests for activation. Test that the program is correctly activated at random time intervals; hours, days or even weeks after it was first installed and run. Possibly test only after certain key functions (unrelated to activation) are used. This will often be missed by crackers and again will slow them down or make their crack worthless.
6 - Don't start the activation test for several seconds (or even minutes) after the activation. you may wish to store any Activation Codes input by the user temporarily in memory and after a brief pause try to activate them. You may even wish to require the user to restart the program before you input the value. This makes it difficult to trace and will slow the cracker down.
7 - Use CRC checksums in your application and dlls. Have your EXEs check themselves, check other DLLs, or even have them check each other. Consider computing a checksum on just a small section of the file itself instead of the whole thing - this makes the crackers job more difficult.
8 - Use Anti-Debugging tricks. Be sure you have read the Anti-Debugging section for more information on how to slow down crackers by having your software resist debuggers.
9 - Use Anti-Disassembling tricks. Be sure you have read the Anti-Disassembling section for more information on how to slow down crackers by having your software resist disassembling.
10 - Use more activation checking routines than the minimum necessary. You should test in several places, and in places where the crackers might not expect it. Check at random time intervals too (see above). One routine requires a time investment from the cracker to remove, then more routines will require even more time to break.
11 - Use Honey Pots. A "Honey Pot" is a fake or decoy routine (or set of routines) you code into your program that seem to check activation, but in fact - does nothing. Have it write and read registry keys, manipulate files, jump all over in memory computing useless values and doing meaningless comparisons. Use your imagination here. Name honey pots to draw the crackers attention (like "CheckReg"). The point is to waste their time with a ruse.
12 - Wrap Activation testing routines in ridiculously long code. Consider using several long procedures which do a huge amount of unnecessary (but seemingly meaningful) processing. At some point during this useless processing, legitimately check the activation. Consider even checking it two or three times in different ways. This make the crackers job of tracing through this giant jumble of assembly looking for the "real" code a more frustrating experience. This will slow them down. Your testing routines can safely take 5 to 20 seconds to execute on a reasonably fast machine.
13 - If you use a demo version of your software with limited features, make sure you don't have "grayed out" buttons or menu options. A cracker can simply change the enabled property of these controls which will effectively make your features visible again. It is always preferable to dynamically create these controls only when they are available.
If you use a demo version of your software with limited features, consider not distributing the actual binary code to execute those functions. The simplest way to do this is to include the "paid version only code" inside a DLL which is called from your program when it is legitimately purchased. Then when a customer purchases your software, give them an Activation Code to release your software protections as well as the required DLL containing the code for the missing features.
14 - If your program has been cracked, release a new version. This is probably the most important principle which makes all the above tricks worth while. Once you have wasted the crackers time as much as possible, slowing them down with all these tricks (and others you may think up yourself), you must immediately make all their hard work go to waste - release a new version fast. Change a few things around, re-organize the code, update the version number, test - and re-release. The cracker will have to start all over again. Reaction time is important too. Expect to move quickly if a crack is released. Try and release a new version as rapidly as possible to maximize the frustration effect.
cyclic redundancy check
A CRC (cyclic redundancy check) is a numeric value computed from some source (file, string, digest, etc). Unlike encryption, a CRC value is always the same size regardless of the source size. A CRC is also commonly referred to as a hash or a checksum.
There are numerous sources on the internet for information on what a CRC is, so the algorithms wont be discussed in depth here. Regardless - it may be preferable from a security standpoint for you to develop your own CRC algorithm variation based on a well-known cryptographically secure one.
A CRC can be used to help slow down hackers by computing a CRC checksum of some file (on Windows your EXE or a DLL) and comparing the computed value with a stored value from a known and trusted source. If any of the instructions have been changed, the CRC checksum will not match.
This can be used by your software team in a couple ways to slow down the crackers:
Trojan Server Attack
A cracker may try to replace the DLL (in case of COM with a Trojan COM server with the exact same interface but whose functions always returns true values). You can use a CRC value to attempt to defeat this attack:
The basic premise is:
On Windows Operating Systems, read from the registry the location of the DLL based on the known GUID of the COM server you want to check.
If that file exists, calculate a CRC checksum on it. (Any CRC or hashing algorithm can be used - it doesn't matter).
Compare the checksum calculated against your known checksum which you have previously computed on a trusted copy of the COM server. Take action depending on the match.
Perform a CRC check on the dll every time your program starts but before you actually use the system. Check the return value of the CRC check on the dll against a value you store inside your program. If they are not the same - the dll has been swapped, damaged or altered. To make this even more secure have the value inside the program you check against be stored in three different places, and assemble it just before you use it. A C++ example follows where, at development time, you have already run your CRC function on a trusted copy of the dll file and you know it should return a value of 3070908778 :
char buffer1[25] = {'\0'};
char buffer2[25] = {'\0'};
const char * val1 = "778"; // declared in a different module somewhere
const int val2 = 3070; // declared in a different module somewhere
static int val3 = 908; // maybe read from the registry where your installer wrote it.
if (CRCCheck("mydll.dll") != atol(strcat(strcat( itoa(val2, buffer1, 10), itoa(val3, buffer2, 10)), val1)))
{
// DefeatAttempt! - shut down.
}
You can even implement or use you own version of itoa, atol and strcat
CRCChecks can be quite simple to implement. We suggest that you use your own CRC to ensure that it is original.
Binary Instruction Replacement Attack
A cracker may simply replace the protection calls in your program to do nothing - ignoring the COM server altogether. In fact - this is a very common attack used by most crackers. You can use a CRC value to attempt to defeat this attack:
All 32-bit executables have a CRC checksum field in their programs PE header. You can force your compiler to generate this checksum. Then, using the Win32 API MapFileAndCheckSumA() you can get both the computed checksum and the stored one. Then simply compare them. This of course only works if the cracker doesn't change the stored one, but can sometimes be effective. There are many more sophisticated approaches to using CRCs in your program to detect the integrity of both itself and external modules (dlls) but they are beyond the scope of this help file.
You may even wish to consider computing the checksum on just a small section of the file itself instead of the whole thing - this makes the crackers job more difficult. Don't just have EXEs and DLLs check themselves, have them check each other.
Anti-Debugging
Debuggers are tools just like your IDE that allow crackers to trace a programs execution as they are running - instruction by instruction.
There are numerous anti-debugging tricks that are documented in books and on-line, but all approach the problem from two specific angles:
They attempt to detect any debugger that is currently attached to the process or running in the background.
They attempt to detect specific debuggers (like SoftICE and others).
Protected software should use some sophisticated techniques to protect you from debuggers in both these ways, However, this is only effective when the Binary/DLL methods are actually called to perform some action. To be even more resistant you should consider implementing anti-debugging tricks of your own.
There are simply too many well-documented ways to detect specific debuggers (like SoftICE) available to discuss them here. Many of them are very complex to implement or are ineffective. Instead, we suggest you make at least a simple attempt to detect debuggers. The simplest way to do this is with the Win32 API function call "IsDebuggerPresent". Although this is relatively simple to replace by most crackers, and only works on Windows NT, 2000 and XP, placing it in various unexpected locations in your program can sometimes be quite effective at slowing them down.
Anti-Disassembling
Disassemblers are tools crackers use to translate application code back into assembler or even a higher level language. There are several disassemblers on the market of various quality. Some even write comments on the translated code, which makes it easier for the cracker to understand.
Since the purpose of disassembling is to understand the programs code, a good way to counter disassemblers is to make it more incomprehensible internally. The simplest way to defend against disassemblers is to insert numerous small bits of code in between the legitimate program code instructions that do nothing meaningful, but appear to, and are complex to understand.
A simple way to do this is to define a number of anti-disassembling macros and inline functions. Use your imagination to write these macros and functions. Do lots of pointer arithmetic and mathematical transformations. Conditionally and unconditionally jump all around in memory. Make sure your anti-disassembling routines are macros or inline functions so the anti-disassembling code gets pre-processed and duplicated everywhere it is placed (instead of a simple function call which can be found and replaced in a single location by a cracker).
Then, sprinkle these macros and functions liberally around areas of your programs you wish to protect from disassembling. Increase the density of the routines around sensitive areas. Naturally this will increase the footprint of your binary and can potentially impact performance so use this trick very wisely. You may wish to reserve its use for areas only around your protections and licensing code.
The more you can make the crackers job tedious, the more time he will have to invest in cracking your software - which is the ultimate goal - to slow them down as much as possible.
Reading
http://www.amazon.com/gp/search?index=books&linkCode=qs&keywords=1597494224
http://www.amazon.com/gp/search?index=books&linkCode=qs&keywords=0321294319
http://www.amazon.com/gp/search?index=books&linkCode=qs&keywords=0072262877
http://blogs.technet.com/b/markrussinovich/archive/2005/10/31/sony-rootkits-and-digital-rights-management-gone-too-far.aspx
http://www.amazon.com/IDA-Pro-Book-Unofficial-Disassembler/dp/1593271786/ref=pd_sim_b_7
Monday, July 26, 2010
Qualcomm Snapdragon vs OMA Texas Instrument

The Qualcomm Snapdragon platform continues to generate robust industry attention to accompany its steadily expanding customer base. At the recent COMPUTEX 2010 show, Qualcomm unveiled the sampling of the third generation of its Snapdragon platform – namely its first dual-CPU Snapdragon chipsets consisting of the MSM8260, MSM8660 and QSD8672 products that feature enhanced dual cores that can run at up to 1.2GHz and 1.5GHz respectively, and are targeted at the high-end smartphone market area (the third generation Snapdragon platform is expected to support commercial products by the end of 2010). The new third-generation Snapdragon products complement its first-generation QSD8x50 1GHz core product and the second-generation MSM8x55 and QSD8x50A products with 1GHz enhanced core, including multimedia optimizations and 1.3GHz enhanced core respectively.
The Snapdragon platform can be viewed as competing within the mobile application processor market segment (also referred to as the mobile multimedia processor market segment). Today the application processor segment includes IC platforms that typically integrate the application processor core along with additional functions such as baseband modem andwireless connectivity functions onto a single system-on-a-chip (SoC); this includes the Qualcomm Snapdragon. The application processor market also consists of IC platforms that exclude integration of baseband modems (e.g., TI’s OMAP 4). The application processor platform segment addresses a wide range of mobile devices including smartphones, mobile Internet devices (MIDs), netbooks and portable media devices. By its nature, the mobile application processor market segment attracts a wide swath of competition from the top-tier mobile silicon players, including Samsung, Apple, Intel and TI. Due to Qualcomm’s historically solid competitive foundation, based heavily on its CDMA chipset royalties, and the burgeoning traction of the Snapdragon platform (in over 140 device designs), it presents a mounting competitive challenge and thus generates the key issue of how the competition can position against the overall Snapdragon platform.
Perspective Current Perspective
The Snapdragon platform has been commercially available since Q4 2008 through the QSD8650 and QSD8250 first generation product offerings. From its inception, Qualcomm positioned the Snapdragon platform as an innovative breakthrough offering since it uses the in-house custom developed Scorpion CPU as the core application processor based on the ARMv7-based Cortex-A8 core. This approach has enabled Qualcomm to engineer improvements over standard off-the-shelf ARMv7-based Cortex-A8 processors in areas such as power consumption (e.g., the first Scorpion processor required 150 mW less power consumption at 600 MHz than the non-customized ARM equivalent and so on) as well as optimizing the processor design for the low-power (LP) process. As a result, the Snapdragon platform has proven a stalwart in the smartphone application processor market, as evidenced by the Snapdragon platform’s incorporation in over 140 device designs that include mobile devices that range from HTC’s Droid Incredible and Nexus One smartphones to Huawei’s S7 tablet, to name a few.
For the first generation Snapdragon QSD82x0 products and the second generation Snapdragon MSM8x55 and QSD8x50A products, Qualcomm shares platform and product metrics in areas such as core processor clock speed/performance, flexible wireless connectivity functions, HD video/3D/display/camera support and O/S versatility. This gives rivals a wide range of product areas to seek selective differentiation against the Qualcomm Snapdragon platform, although Qualcomm is hardly unique in that regard.
The topic of core processor clock speed and performance, for example, represents a straightforward and intuitive product area for rivals to assert competitive differentiation. The Snapdragon platform’s first-generation QSD8x50 supports a 1GHz core processor while the second-generation MSM8x55 and QSD8x50A products support a 1GHz enhanced core, including multimedia optimizations and a 1.3GHz enhanced core respectively. In contrast, Intel asserts that its x86 processor-based Moorestown platform via the Atom Z6xx processor series can support up to 1.5GHz clock speed for smartphone devices and up to 1.9 GHz clock speed for tablet devices. Such metrics will still match the third generation Snapdragon QSD8672 product that is designed to run dual cores that operate at 1.5GHz (this product should appear in mobile devices at retail by the end of 2010). This complements Intel’s overall efforts to position its Moorestown platform as prime time ready for smartphone technology due to the improvements realized in areas such as power consumption advances in battery life spans (based on 1500 mAh batteries) in support of 1080p/720p video (e..g, up to four hours for 1080p video) and browsing applications as well as multi-fold improvements gained in Java script, Web page, graphics and video performance. This includes up to fourfold Java script performance improvement and at least a doubling of Web page download performance and graphic performance in relation to the Qualcomm Snapdragon platform as well as wielding the industry’s only across-the-board support of 1080 HP/MP/BP 30 fps and 720 HP/MP/BP 30 fps video capabilities. Intel’s overall R&D investment and marketing blitz on behalf of the Moorestown platform is certainly targeted at Snapdragon, as well as advancing Intel’s longstanding ambition to promote the x86 processor architecture as a viable alternative to the ARM processor architecture that dominates the mobile device silicon market today. Intel hopes to play a more prominent role within the overall mobile device silicon market beyond netbook silicon. There is a bit of irony here as Intel is looking to use the Intel Moorestown platform to attack the ARM-centric Snapdragon platform in Qualcomm’s backyard of smartphone and tablet silicon, while Qualcomm is developing the Snapdragon platform to help more directly challenge Intel’s prominence within the netbook silicon segment.
Apple, Samsung and TI are Qualcomm rivals that also use the customization of the ARMv7-based Cortex-A8 processor to achieve select advancements over the standard ARM offering. Samsung and Apple currently have a strange bedfellow arrangement that can influence how they position their respective platforms against the Snapdragon platform. Samsung collaborated with Intrinsity in developing and introducing its 45nm-based Hummingbird platform during 2009. In April 2010, it was revealed that Apple acquired Intrinsity in stealth mode to lock up the FastCore intellectual property (IP) that was instrumental in realizing the iPad A4 processor’s enhancements to standard issue ARM Cortex-8 core processor technology (e.g., achieving 1 Ghz clock speed on a 45nm process). Through the acquisition, Apple can promote that its A4 processor development efforts are dedicated exclusively to the support of Apple products such as the iPad and iPhone, and the company can avoid the dissipation of processor engineering resources that its rivals, such as Qualcomm, are obliged to perform through the open-ended support of multiple OEM products. Samsung should look to further elucidate its plans to license the Hummingbird technology to other mobile device vendors and what if any impact this has on its Apple relationship. The Apple acquisition of Intrinsity does not change the fact that Apple’s A4 technology remains based on Samsung’s 45nm SoC technology and Samsung continues to have access and wield the Hummingbird IP gained from its joint collaboration with Intrinsity prior to the Apple acquisition of Intrinsity.
Samsung continues to register significant product development and marketing advances with its Hummingbird SC5PC110 processor. The Hummingbird S5PC110 runs the Samsung Galaxy S smartphone, which Samsung asserts will launch in an astonishing 110 countries. One area the Samsung can assert clear product differentiation against Qualcomm is in the area of 3D graphics. The S5PC110 processor can scale up to support 90 million triangles per second. In contrast, the Qualcomm QSD8650 delivers only 22 million triangles per second while the pending QSD8672 will do up to 80 million triangles per second. Additionally, in the related area of 2D graphics rendering, Samsung’s S5PC110 product can support up to one billion pixels per second while Qualcomm’s QSD8650 supports only 133 million pixels per second and the upcoming QSD8672 product still comes up short against Samsung with an improved 500 million pixels per second.
TI’s OMAP 4 platform using the OMAP4440 processor is slated to support mobile device products that will hit retail in late 2010/early 2011. The OMAP processor series is already found in well-known mobile handset products such as the Nokia N-series, the Motorola DROID, and the Palm Pre. However, OMAP 4 dual core clock speeds are limited to just 1 GHz, and that’s for a product that is not yet in generally available mobile products. In this regard, OMAP 4 only ties the Qualcomm Snapdragon’s first generation 1 GHz product and trails both the second and third generation 1.2Ghz-1.5Ghz products. However, TI has already staked out a competitive position against Qualcomm in this area showing how apples-to-apples comparisons can prove dicey at times in the mobile silicon space. TI asserts that the OMAP 4 can deliver improved resolution display and still image metrics in relation to the Snapdragon platform, despite the core processor clock speed differentials. For example, the OMAP 4 can deliver 20-megapixel camera support while the QSD8x50 product can only handle 12-megapixel cameras. Moreover, TI advocates the OMAP 4 platform will prove more flexible in hardware support of future video codecs in relation to the Snapdragon platform. TI will also invoke that its OMAP4440 processor will use the ARM Cortex-9 architecture, which can yield performance improvements over ARM Cortex-A8 products (up to 30 percent according to ARM) and more flexible dual core power management arrangements.
Overall the most serious long-term competitive threats to the Qualcomm Snapdragon platform within the smartphone and tablet application processor market will prove to be the major mobile silicon players such as Samsung, Apple and TI, as well as Intel, who already possess competitive application processor platforms targeted specifically at smartphone, MID and tablet products. Mobile silicon rivals such as Marvell, Freescale, NVIDIA and ST-Ericsson all sport viable mobile application processor platforms but need to prove they can move the market needle more within the mobile application processor market segment to mount a serious challenge to Qualcomm in the evolving smartphone/tablet silicon market segment. Marvell and Freescale have achieved market distinction within the ereader niche, for example, but are not able to match the Snapdragon’s presence in over 140 device design wins. Samsung, Apple, Intel and TI all possess the product differentiators in areas such as core processor clock speed/performance, power consumption metrics, and HD video/3D/display/camera video performance and the global channels to challenge the Snapdragon’s early market prominence in this area into the foreseeable future.
Recommended Actions Vendor Actions
• Mobile application processor vendors that target emerging 4G/LTE silicon devices should consider getting out ahead of the market in explaining how their platforms optimally complement the region-sensitive E-UTRA LTE bands (TDD/FDD modes). In general, mobile application processor vendors should posit the 4G/LTE market represents a new level playing field in the market as Qualcomm’s dominance in the CDMA/3G silicon market will not directly translate into the same type of dominance within the 4G/LTE space.
• Mobile application processor vendors should note that they generally rely on third-party partners to supply fundamental mobile silicon components such as baseband modems and RF transceivers to complement their application processor platforms while Qualcomm uses integrated in-house baseband modem and RF transceiver components as part of the Snapdragon offering. This provides some latitude in asserting that they can select best-of-breed components in these areas and have more supply chain flexibility in relation to Qualcomm’s single vendor approach.
• Intel should continue to pointing out that the smartphone/tablet market is still in its developing stages, which gives Intel ample opportunity to capitalize on new market opportunities in this fast growing segment. This includes pointing out that the Atom Z6xx series is already in the advanced demo stage in smartphones with 3.8”+ displays and ~15mm thin tablets and the x86 platform supports rising mobile O/Ss such as Android and MeeGo.
User Actions
• Smartphone and tablet OEMs need to test and contrast the Intel Atom Processor Z6xx series (prior codename Lincroft SoC) against competing ARM-based mobile device SoCs, such as Qualcomm’s Snapdragon platform, due to factors such as its compact package (i.e., 13.8x13.8x1.1mm with 0.5mm pitch), support of 19 power islands with on-die clock and power gating, new ultra low-power states (i.e., SOi1, SOi3), and the leveraging of Intel’s Hi-K 45nm LP SoC process.
• Smartphone and tablet OEMs should investigate the new OS power management (OSPM) capability that accompanies the overall Moorestown platform. This includes support of integrated PMUs, software-based OS power management options, and fine-grain power management functions that create power islands for sub-systems (i.e., power is only allocated to the application running and not dispersed to idle applications, etc.) and factor in such capabilities in seeking apples-to-apples validation of Intel’s power conservation claims on behalf of the Atom Moorestown platform in relation to the Snapdragon platform
Wednesday, July 21, 2010
Android WebKIT JS/HTML framework : PhoneGap
This guide will help you setup your first android project but not a basic one. One taking advantage of WebKIT Javascript framework.
The first thing to do is to download and install all the required dependencies.
Please contribute platform specific instructions where needed.
Installing dependencies
1. Java JDK
If you do not already have the java JDK installed on you'r system, install the Java SE Development Kit - JDK 6 from here:
http://java.sun.com/javase/downloads/index.jsp
If you're running Windows this is a standard installer file, just follow the on screen instructions for installation.
2. Eclipse
Install the Eclipse IDE for Java Developers from http://www.eclipse.org/downloads/. This a ZIP archive file, extract the folder “eclipse” for me I extracted eclipse
under C:\eclipse . Most other flavors of Eclipse (like Aptana or platform specific builds) will also work, provided that you install all the necessary Eclipse plug-ins.
3. Android SDK
Install the Android SDK Package from here:
http://developer.android.com/sdk/index.html
Extract the downloaded archive and place it somewhere you'll remember like C:\sdk\android-sdk-windows
and add the tools sub directory to your environment PATH. Additional information and instructions for adding the Android SDK to your PATH can be found at:
http://developer.android.com/sdk/installing.html
Be sure to do the following (WINDOWS):
Add android SDK to your Path
Add android sdk tools (\android-sdk-windows\tools) to your path. This is necessary
for ruby to find the command "android create project" later on.
4. ADT Plug-in for Eclipse
Install the ADT Plug-in for Eclipse as described here:
http://developer.android.com/sdk/eclipse-adt.html
5. Adding Android SDK components
Install at least the required Android SDK components using the Eclipse ADT plug-in, as described here:
http://developer.android.com/sdk/adding-components.html
You can also launch the ADT tool by running android in your terminal.
To verify your installation of Eclipse, Android SDK, ADT, and Java, you can build a sample “Hello World” application using the instructions located here:
http://developer.android.com/guide/tutorials/hello-world.html.
6. Apache ANT
Windows - download and unzip Apache ANT and add it to your PATH http://ant.apache.org/index.html.
7. Ruby
Windows - download and install Ruby from the official site http://www.ruby-lang.org/en/downloads/ or use the RubyInstaller (recommended) here http://rubyinstaller.org/
8. Installing PhoneGap
Now make sure you download the latest version of PhoneGap here:
http://github.com/phonegap/phonegap-android.
9. edit the droidgap ruby file
change target_id = 5 to target_id = 6 to target Android 2.0.1 if your phone is running 2.0.1
10. Build framework and sample application
C:\Dev\mydroid\phonegap-android>ruby ./droidgap c:/sdk/android-sdk-win
dows/ phonegap com.phonegap.droid.demo c:/Dev/mydroid/phonegap-android/example/ c:/dev/mydroid
/phonegap-android/phonegap/
11. Once the phonegap app has been generated launch eclipse
To load eclipse and be able to see the workspace location use the -showlocation parameter
c:\eclipse\eclipse -showlocation
12. Next is to import the generated project in eclipse, fix any compilation errors, include the phonegap jar in your project build path and finally edit AndroidManifest.xml otherway you are going to see few crashes when trying to access lower level java class
I replaced the < by { and > by }
{?xml version="1.0" encoding="utf-8"?}
{manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.tuniverse.droid"
android:versionCode="1"
android:versionName="1.0"}
{uses-permission android:name="android.permission.INTERNET" /}
{uses-permission android:name="android.permission.CAMERA" /}
{uses-permission android:name="android.permission.VIBRATE" /}
{uses-permission android:name="android.permission.ACCESS_GPS" /}
{uses-permission android:name="android.permission.ACCESS_ASSISTED_GPS" /}
{uses-permission android:name="android.permission.ACCESS_LOCATION" /}
{uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" /}
{uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /}
{uses-permission android:name="android.permission.READ_PHONE_STATE" /}
{uses-permission android:name="android.permission.RECEIVE_SMS" /}
{uses-permission android:name="android.permission.RECORD_AUDIO" /}
{uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" /}
{application android:icon="@drawable/icon" android:label="@string/app_name"}
{activity android:name=".WebActivity"
android:label="@string/app_name" android:configChanges="orientation|keyboardHidden"}
{intent-filter}
{action android:name="android.intent.action.MAIN" /}
{category android:name="android.intent.category.LAUNCHER" /}
{/intent-filter}
{/activity}
{/application}
{/manifest}

13. When your app will build with no error, you can run the application
in the debugger or in the emulator.
To view the android log (emulator) open a shell (usually the same one than the one
used to lauch eclipse and run
abt logcat

If you want a nicer logcat output you can use some very cool python script to output the android log in color !!! Install python first from here
As you can see, the colored adb logcat is a huge improvement.
To easily use the code, copy the files color_console.py, coloredlogcat.py and logcat.bat to your Android SDK/Tools path like c:\android-sdk-windows-1.5_r3\tools\logcat.bat. Now, instead of running "adb logcat" just run "logcat".
You can download the files here colored_logcat.zip (3 KB)
Thanks go to
Jeff Sharkey
André Burgaud

To install APK applications on your Android phone do the following:
Copy the APK file you want to install to your phone's memory card and insert
the card into your Android phone.
Go to Android Market and search for the Apps Installer application.
Open it and click on the Install button.
After it is installed, just open it. It will show you all the APK files stored directly in the root directory of your memory card.
Just click on the application you want to install and it will be installed.
Using the Android SDK and USB driver
There is one more method that can be used, you can install APK files into your phone using the Android SDK. Download the Android SDK.
First of all, install the Android SDK on your computer. You will also need
to install the Android USB drivers to connect the SDK to your phone via USB. You can get instruction on how to install it from here
To install applications from other sources, you also need go to Settings -> Application Settings and enable Unknown Sources. Also go to Settings -> SD Card and Phone Storage -> Disable Use for USB Storage. You can enable it again later.
Next, just open Command Prompt and type: adb install path/file.apk
where path is the full path to the APK file and file is the name of the APK application file. Your application is now installed. This is all you need to do, now just open the application on your phone and use it.
The first thing to do is to download and install all the required dependencies.
Please contribute platform specific instructions where needed.
Installing dependencies
1. Java JDK
If you do not already have the java JDK installed on you'r system, install the Java SE Development Kit - JDK 6 from here:
http://java.sun.com/javase/downloads/index.jsp
If you're running Windows this is a standard installer file, just follow the on screen instructions for installation.
2. Eclipse
Install the Eclipse IDE for Java Developers from http://www.eclipse.org/downloads/. This a ZIP archive file, extract the folder “eclipse” for me I extracted eclipse
under C:\eclipse . Most other flavors of Eclipse (like Aptana or platform specific builds) will also work, provided that you install all the necessary Eclipse plug-ins.
3. Android SDK
Install the Android SDK Package from here:
http://developer.android.com/sdk/index.html
Extract the downloaded archive and place it somewhere you'll remember like C:\sdk\android-sdk-windows
and add the tools sub directory to your environment PATH. Additional information and instructions for adding the Android SDK to your PATH can be found at:
http://developer.android.com/sdk/installing.html
Be sure to do the following (WINDOWS):
Add android SDK to your Path
Add android sdk tools (\android-sdk-windows\tools) to your path. This is necessary
for ruby to find the command "android create project" later on.
4. ADT Plug-in for Eclipse
Install the ADT Plug-in for Eclipse as described here:
http://developer.android.com/sdk/eclipse-adt.html
5. Adding Android SDK components
Install at least the required Android SDK components using the Eclipse ADT plug-in, as described here:
http://developer.android.com/sdk/adding-components.html
You can also launch the ADT tool by running android in your terminal.
To verify your installation of Eclipse, Android SDK, ADT, and Java, you can build a sample “Hello World” application using the instructions located here:
http://developer.android.com/guide/tutorials/hello-world.html.
6. Apache ANT
Windows - download and unzip Apache ANT and add it to your PATH http://ant.apache.org/index.html.
7. Ruby
Windows - download and install Ruby from the official site http://www.ruby-lang.org/en/downloads/ or use the RubyInstaller (recommended) here http://rubyinstaller.org/
8. Installing PhoneGap
Now make sure you download the latest version of PhoneGap here:
http://github.com/phonegap/phonegap-android.
9. edit the droidgap ruby file
change target_id = 5 to target_id = 6 to target Android 2.0.1 if your phone is running 2.0.1
10. Build framework and sample application
C:\Dev\mydroid\phonegap-android>ruby ./droidgap c:/sdk/android-sdk-win
dows/ phonegap com.phonegap.droid.demo c:/Dev/mydroid/phonegap-android/example/ c:/dev/mydroid
/phonegap-android/phonegap/
11. Once the phonegap app has been generated launch eclipse
To load eclipse and be able to see the workspace location use the -showlocation parameter
c:\eclipse\eclipse -showlocation
12. Next is to import the generated project in eclipse, fix any compilation errors, include the phonegap jar in your project build path and finally edit AndroidManifest.xml otherway you are going to see few crashes when trying to access lower level java class
I replaced the < by { and > by }
{?xml version="1.0" encoding="utf-8"?}
{manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.tuniverse.droid"
android:versionCode="1"
android:versionName="1.0"}
{uses-permission android:name="android.permission.INTERNET" /}
{uses-permission android:name="android.permission.CAMERA" /}
{uses-permission android:name="android.permission.VIBRATE" /}
{uses-permission android:name="android.permission.ACCESS_GPS" /}
{uses-permission android:name="android.permission.ACCESS_ASSISTED_GPS" /}
{uses-permission android:name="android.permission.ACCESS_LOCATION" /}
{uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" /}
{uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /}
{uses-permission android:name="android.permission.READ_PHONE_STATE" /}
{uses-permission android:name="android.permission.RECEIVE_SMS" /}
{uses-permission android:name="android.permission.RECORD_AUDIO" /}
{uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" /}
{application android:icon="@drawable/icon" android:label="@string/app_name"}
{activity android:name=".WebActivity"
android:label="@string/app_name" android:configChanges="orientation|keyboardHidden"}
{intent-filter}
{action android:name="android.intent.action.MAIN" /}
{category android:name="android.intent.category.LAUNCHER" /}
{/intent-filter}
{/activity}
{/application}
{/manifest}

13. When your app will build with no error, you can run the application
in the debugger or in the emulator.
To view the android log (emulator) open a shell (usually the same one than the one
used to lauch eclipse and run
abt logcat

If you want a nicer logcat output you can use some very cool python script to output the android log in color !!! Install python first from here
As you can see, the colored adb logcat is a huge improvement.
To easily use the code, copy the files color_console.py, coloredlogcat.py and logcat.bat to your Android SDK/Tools path like c:\android-sdk-windows-1.5_r3\tools\logcat.bat. Now, instead of running "adb logcat" just run "logcat".
You can download the files here colored_logcat.zip (3 KB)
Thanks go to
Jeff Sharkey
André Burgaud

To install APK applications on your Android phone do the following:
Copy the APK file you want to install to your phone's memory card and insert
the card into your Android phone.
Go to Android Market and search for the Apps Installer application.
Open it and click on the Install button.
After it is installed, just open it. It will show you all the APK files stored directly in the root directory of your memory card.
Just click on the application you want to install and it will be installed.
Using the Android SDK and USB driver
There is one more method that can be used, you can install APK files into your phone using the Android SDK. Download the Android SDK.
First of all, install the Android SDK on your computer. You will also need
to install the Android USB drivers to connect the SDK to your phone via USB. You can get instruction on how to install it from here
To install applications from other sources, you also need go to Settings -> Application Settings and enable Unknown Sources. Also go to Settings -> SD Card and Phone Storage -> Disable Use for USB Storage. You can enable it again later.
Next, just open Command Prompt and type: adb install path/file.apk
where path is the full path to the APK file and file is the name of the APK application file. Your application is now installed. This is all you need to do, now just open the application on your phone and use it.
Wednesday, June 30, 2010
HTML VIDEO OPEN STANDARD GOOGLE MOVING TOWARDS VP8 (ON2)
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:
http://apiblog.youtube.com/2010/06/flash-and-html5-tag.html
Tons of html 5 video sample are available at http://oggtv.com/ 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:
Windows standard installer
Windows classic installer
Mac:
Mac universal binary
Mac intel package
Linux:
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.
How:
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

http://camendesign.com/code/video_for_everybody
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.
Full article here:
http://apiblog.youtube.com/2010/06/flash-and-html5-tag.html
Tons of html 5 video sample are available at http://oggtv.com/ 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:
Windows standard installer
Windows classic installer
Mac:
Mac universal binary
Mac intel package
Linux:
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.
How:
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

http://camendesign.com/code/video_for_everybody
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
RTMFP
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 https://afcs.acrobat.com/ 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:
http://www.flashrealtime.com/basics-of-p2p-in-flash/
http://www.flashrealtime.com/ .
http://www.ealeyes.com/ articles and tutorials on using RTMFP
http://www.adobe.com/devnet/flashmediaserver/articles/p2p_rtmfp_groups.html
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
hash.
http://livedocs.adobe.com/labs/acrobatcom/com/adobe/rtc/authentication/AdobeHSAuthenticator.html
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 https://afcs.acrobat.com/ 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:
http://www.flashrealtime.com/basics-of-p2p-in-flash/
http://www.flashrealtime.com/ .
http://www.ealeyes.com/ articles and tutorials on using RTMFP
http://www.adobe.com/devnet/flashmediaserver/articles/p2p_rtmfp_groups.html
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
hash.
http://livedocs.adobe.com/labs/acrobatcom/com/adobe/rtc/authentication/AdobeHSAuthenticator.html
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
http://developer.apple.com/technologies/mac/graphics-and-animation.html
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.
http://developer.apple.com/legacy/mac/library/documentation/QuickTime/Conceptual/QTKitProgrammingGuide/Chapter01/Introduction.html
QTKit is also the name of an open-source wrapper around QuickTime that was made outside of Apple. For information on that wrapper, http://sourceforge.net/projects/qtkit/.
• 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
http://developer.apple.com/technologies/mac/graphics-and-animation.html
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.
http://developer.apple.com/legacy/mac/library/documentation/QuickTime/Conceptual/QTKitProgrammingGuide/Chapter01/Introduction.html
QTKit is also the name of an open-source wrapper around QuickTime that was made outside of Apple. For information on that wrapper, http://sourceforge.net/projects/qtkit/.
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 smooth@microsoft.com.
Download the Smooth Streaming Format SDK Beta 2 here:
SSFSDK_64.msi
SSFSDK_32.msi
Resources
* 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
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 smooth@microsoft.com.
Download the Smooth Streaming Format SDK Beta 2 here:
SSFSDK_64.msi
SSFSDK_32.msi
Resources
* 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:
#include
#if defined(__WIN32__) || defined(_WIN32)
#define snprintf _snprintf
#endif
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
\bin\vcvarsall.bat"
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.
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:
#include
#if defined(__WIN32__) || defined(_WIN32)
#define snprintf _snprintf
#endif
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
\bin\vcvarsall.bat"
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.
HTTP SMOOTH STREAMING AND FRAGMENTED MPEG-4
| Microsoft IIS Smooth Streaming | Adobe Flash Dynamic Streaming | Apple HTTP Adaptive Bitrate Streaming | |
|---|---|---|---|
| Cost per Streaming Server | Free download1 + $469 for OS2 | $45003 + OS cost4 | Cost of Web server5 + segmenter OS6 |
| On-demand & Live Streaming | ![]() | ![]() | ![]() |
| Live Streaming DVR7 | ![]() | Pause & Seek | |
| Streaming Protocol | HTTP | RTMP | HTTP |
| Scalability via HTTP Edge Caches | ![]() | ![]() | |
| Stateless Server Connection8 | ![]() | ![]() | |
| Supported Platforms | Silverlight, Xbox 360, other Smooth Streaming-compatible players, and iPhone OS 3.09 | Flash Player 10, AIR | iPhone OS 3.0, devices running QuickTime X |
| DRM Support for Live, VOD | PlayReady | None10 | None |
| DRM ASP & Encoder ISV Support | ![]() | ||
| Interoperable DRM (DECE Approved)11 | ![]() | ||
| Real-time Client and Server Logging | 12 | ||
| Programmable Client Side Switching Logic | ![]() | ![]() | |
| Live In-Stream Ad Integration | ![]() | ||
| Built-in Analytics Framework | ![]() | ||
| Delivery to Mobile Devices | ![]() | ![]() | |
| Native 64-bit Server Support | ![]() | ![]() | |
| Media Container | MPEG 4 – Part 12 (Fragmented MP4) | MPEG 4 – Part 12 (MP4), FLV | MPEG-2 TS |
| Supported Video Codecs | Codec Agnostic (currently supports VC-1 Advanced Profile & H.264 Baseline, Main, and High) | H.264 Baseline, Main, and High; VP6 | H.264 Baseline Level 3.0 |
| Supported Audio Codecs | Codec Agnostic (currently supports WMA & AAC) | AAC, MP3 | MP3, HE-AAC, AAC-LC |
| Maximum Bit Rate | No limit | No limit | 1.6 Mbps |
| Default Fragment Length | 2 seconds | n/a | 10 seconds |
| End-To-End Latency | As low as 1.5 seconds (configurable) | 6 seconds | 30 seconds13 |
| File Type on Server | Contiguous | Contiguous | Fragmented |
| Client Programming Platform | Microsoft .NET Framework | Adobe ActionScript | Objective-C |
Footnotes...
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.
http://www.iis.net/download/SmoothStreaming
http://www.iis.net/download/SmoothFormatSDK
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:
http://on10.net/blogs/benwagg/Beta-Release-of-Smooth-Streaming/
More importantly, zambelli had a great post showing how Microsoft is using the file format:
http://alexzambelli.com/blog/2009/02/10/smooth-streaming-architecture/
And we now have some sample files up that I encoded, including the media files and manifest files:
http://on10.net/blogs/benwagg/Big-Buck-Bunny-Smooth-Streaming-sample-for-download/
(if you're curious how it was encoded)
http://on10.net/blogs/benwagg/Behind-the-Scenes-at-SmoothHDcom-Encoding-Big-Buck-Bunny/
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
http://www.streamingmedia.com/Articles/Editorial/Featured-Articles/Note-to-Apple-Safari-%26-QuickTime-are-Not-Web-Standards-67645.aspx
http://www.streamingmedia.com/Articles/Editorial/Featured-Articles/Note-to-Apple-Safari-%26-QuickTime-are-Not-Web-Standards-67645.aspx
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/Keychain.app.
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...
• 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/Keychain.app.
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...
Thursday, May 13, 2010
RTMP PLAYER SERVER AND SWF2VIDEO
The most famous client RTMP is the Adobe Flash Player that can do streaming video and audio from RTMP servers.
Adobe Open Source Media Framework
http://opensource.adobe.com/wiki/display/osmf/Open+Source+Media+Framework
Moyea Web Player version 2. 0 with RTMP Stream Plugin supports playback of live video streaming and SMIL presentations and streaming video from RTMP servers.
http://www.moyeasoft.com/web-player/web-player-kits.html
JW Player
http://www.longtailvideo.com/
Flowplayer RTMP as well.
http://flowplayer.org/
Sublime Video Player
http://jilion.com/
RTMP server software
The only full RTMP server application is Adobe Flash Media Server, Onlinelib VCS Video Communication Server (including iPhone Support), Wowza media server and WebORB Integration Server (free of charge and available. NET, Java and ColdFusion), both commercial and closed source implementations. There is a reverse engineered open source project called Red5, which aims to produce a feature-complete written in Java. Finally my current favorite is C++ RTMP Server http://www.rtmpd.com/
SWF2Video
Moyea SWF to Video Converter V3.2
http://www.moyeasoft.com/news/update_081027.html
Adobe Open Source Media Framework
http://opensource.adobe.com/wiki/display/osmf/Open+Source+Media+Framework
Moyea Web Player version 2. 0 with RTMP Stream Plugin supports playback of live video streaming and SMIL presentations and streaming video from RTMP servers.
http://www.moyeasoft.com/web-player/web-player-kits.html
JW Player
http://www.longtailvideo.com/
Flowplayer RTMP as well.
http://flowplayer.org/
Sublime Video Player
http://jilion.com/
RTMP server software
The only full RTMP server application is Adobe Flash Media Server, Onlinelib VCS Video Communication Server (including iPhone Support), Wowza media server and WebORB Integration Server (free of charge and available. NET, Java and ColdFusion), both commercial and closed source implementations. There is a reverse engineered open source project called Red5, which aims to produce a feature-complete written in Java. Finally my current favorite is C++ RTMP Server http://www.rtmpd.com/
SWF2Video
Moyea SWF to Video Converter V3.2
http://www.moyeasoft.com/news/update_081027.html
Wednesday, April 28, 2010
Software for 2D-3D conversion - Avatar follower
StereoTracer is designed for creating 3D image out of one 2D image by means of «depth-map». The depth-map (disparity image or Z-image) serves to convert a two-dimensional image into a three-dimensional one. In the depth-map the gray color gradation shows each pixel's distance from the viewer. The lighter area in the depth-map correspond to the areas nearer to the viewer, the darker ones correspond to more distant areas.
A «depth-map» can be created from source one 2D image or stereopair automatically in StereoTracer. "How to" is available here.
StereoTracer generates a number of images which all have a slightly different viewing angle. This process models shooting of a scene from different points across the horizontal line. Resultant series of images is used for creating 3D (stereo) image by method of anaglyph encoding or making multi-view 3D lenticular picture in Triaxes 3DMasterKit or other lenticular generating application. Also a series of frames can be exported into a movie clip (AVI or animated GIF) and used for presentation purposes.
http://triaxes.com/
A «depth-map» can be created from source one 2D image or stereopair automatically in StereoTracer. "How to" is available here.
StereoTracer generates a number of images which all have a slightly different viewing angle. This process models shooting of a scene from different points across the horizontal line. Resultant series of images is used for creating 3D (stereo) image by method of anaglyph encoding or making multi-view 3D lenticular picture in Triaxes 3DMasterKit or other lenticular generating application. Also a series of frames can be exported into a movie clip (AVI or animated GIF) and used for presentation purposes.
http://triaxes.com/
Monday, April 26, 2010
Sublime HTML5 HD Video Player
All tests run on the following hardware:
Model Identifier: MacPro3,1
Processor Name: Quad-Core Intel Xeon
Processor Speed: 3 GHz
Number of Processors: 2
Total Number of Cores: 8
L2 Cache: 12 MB
Memory: 8 GB
Bus Speed: 1.6 GHz
For browsers, the latest release browser versions were used. For Flash Player, I used the latest labs release (Flash Player 10.1 Beta 3 : 10,1,51,95).
Mac OS X Versions
=================
Mac OS X 10.6.2
Google Chrome 5.0.307.9 beta
Safari 4.0.4 (6531.21.10)
Firefox 3.6
Flash Player MAC 10,1,51,95
Windows 7 Versions
==================
Windows 7 7600
Google Chrome 4.0.249.89 (38071)
Safari 4.0.4 (531.21.10)
Firefox 3.6
Internet Explorer 8.0.7600.16385
Flash Player WIN 10,1,51,95
Sublime HTML 5 HD Video Example
===============================
Mac Windows
Google Chrome 85% 24%
Safari 21% 104%
Firefox 85% 80%
Internet Explorer NA Did Not Work
http://jilion.com/sublime/video
An other interesting HTML5 Video Sample page (Opera)
http://annevankesteren.nl/2008/fronteers-html5-video
And Finally a future yet to be release HTML5 book
http://diveintohtml5.org/video.html
Other interesting benchmark
http://themaninblue.com/writing/perspective/2010/03/22/
Conclusion HTML5 is catching up...
Model Identifier: MacPro3,1
Processor Name: Quad-Core Intel Xeon
Processor Speed: 3 GHz
Number of Processors: 2
Total Number of Cores: 8
L2 Cache: 12 MB
Memory: 8 GB
Bus Speed: 1.6 GHz
For browsers, the latest release browser versions were used. For Flash Player, I used the latest labs release (Flash Player 10.1 Beta 3 : 10,1,51,95).
Mac OS X Versions
=================
Mac OS X 10.6.2
Google Chrome 5.0.307.9 beta
Safari 4.0.4 (6531.21.10)
Firefox 3.6
Flash Player MAC 10,1,51,95
Windows 7 Versions
==================
Windows 7 7600
Google Chrome 4.0.249.89 (38071)
Safari 4.0.4 (531.21.10)
Firefox 3.6
Internet Explorer 8.0.7600.16385
Flash Player WIN 10,1,51,95
Sublime HTML 5 HD Video Example
===============================
Mac Windows
Google Chrome 85% 24%
Safari 21% 104%
Firefox 85% 80%
Internet Explorer NA Did Not Work
http://jilion.com/sublime/video
An other interesting HTML5 Video Sample page (Opera)
http://annevankesteren.nl/2008/fronteers-html5-video
And Finally a future yet to be release HTML5 book
http://diveintohtml5.org/video.html
Other interesting benchmark
http://themaninblue.com/writing/perspective/2010/03/22/
Conclusion HTML5 is catching up...
Monday, April 05, 2010
Android WebView
WebView allows you to create your own window for viewing web pages (or even develop a complete browser). In this tutorial, you'll create a simple Activity that can view and navigate web pages.

1.Create a new project named HelloWebView.
2.Open the res/layout/main.xml file and insert the following:
android:layout_width="fill_parent"
android:layout_height="fill_parent"/>
3.Now open the HelloWebView.java file. At the top of the class, declare a WebView object:
WebView mWebView;
Then use the following code for the onCreate() method:
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
mWebView = (WebView) findViewById(R.id.webview); mWebView.getSettings().setJavaScriptEnabled(true); mWebView.loadUrl("http://www.thomasyounsi.com");
}
This initializes the member WebView with the one from the Activity layout;
requests a WebSettings object with getSettings();
and enables JavaScript for the WebView with setJavaScriptEnabled(boolean).
Finally, an initial web page is loaded with loadUrl(String).
4.Because this application needs access to the Internet, you need to add the appropriate permissions to the Android manifest file.
Open the AndroidManifest.xml file and add the following as a child of the element:
What is very powerful with WebView is that you can use a two way communication between the content which is display in the web view and the Java application. This can be accomplished by using JavaScript running inside the WebView calling out Java code to get the updated fragment for the HTML div bloc that require to be use to update the content running inside the view. This means you can use HTML div to layout your content and expand/collapse a div based on user action. The content can come from a remote database, a web service or as a JSON Object.
http://www.youtube.com/watch?v=Ex7YsQ_YH2U

1.Create a new project named HelloWebView.
2.Open the res/layout/main.xml file and insert the following:
android:layout_height="fill_parent"/>
3.Now open the HelloWebView.java file. At the top of the class, declare a WebView object:
WebView mWebView;
Then use the following code for the onCreate() method:
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
mWebView = (WebView) findViewById(R.id.webview); mWebView.getSettings().setJavaScriptEnabled(true); mWebView.loadUrl("http://www.thomasyounsi.com");
}
This initializes the member WebView with the one from the Activity layout;
requests a WebSettings object with getSettings();
and enables JavaScript for the WebView with setJavaScriptEnabled(boolean).
Finally, an initial web page is loaded with loadUrl(String).
4.Because this application needs access to the Internet, you need to add the appropriate permissions to the Android manifest file.
Open the AndroidManifest.xml file and add the following as a child of the
What is very powerful with WebView is that you can use a two way communication between the content which is display in the web view and the Java application. This can be accomplished by using JavaScript running inside the WebView calling out Java code to get the updated fragment for the HTML div bloc that require to be use to update the content running inside the view. This means you can use HTML div to layout your content and expand/collapse a div based on user action. The content can come from a remote database, a web service or as a JSON Object.
http://www.youtube.com/watch?v=Ex7YsQ_YH2U
Apple iPad / Microsoft Surface
In 2007, Microsoft annonced Microsoft Surface
Microsoft Surface represents a new category of computing. With capabilities like direct interaction, multi-touch, multi-user, and object recognition, Microsoft Surface computing is a unique and cutting edge platform for application development.
The Microsoft Surface platform goes beyond the capabilities of its core operating system foundation running Windows Vista SP1, yet it keeps the development process simple. The Microsoft Surface SDK 1.0 SP1 provides all the controls a developer needs to create innovative experiences on Microsoft Surface. And with the new capabilities that come with Service Pack 1, application development is easier than ever with new WPF controls and API enhancements that give developers more control, flexibility, and efficiency in creating applications.
Plus, in order to enable a broad developer audience, Microsoft Surface is compatible with familiar programs and tools developers use today, such as:
Microsoft® Windows Presentation Foundation (WPF)
Microsoft® XNA™
Microsoft® Visual C#® 2008 Express Edition
Microsoft® Visual Studio® 2008 SP1
Microsoft® Expression® Studio 2
Microsoft® Expression Blend™ 2
http://www.microsoft.com/surface/en/us/Pages/Product/Platform.aspx
In 2010 Apple launched the iPad.
The sdk is the same than the sdk used by the Apple iPhone
http://developer.apple.com/ipad/sdk/
The specs have been posted on Apple's web site.
http://www.apple.com/ipad/specs/
Screen size = 1024x768 and my interest will go immediately for TV and video
Support for 1024 by 768 pixels with Dock Connector to VGA Adapter; 576p and 480p with Apple Component AV Cable; 576i and 480i with Apple Composite AV Cable
H.264 video up to 720p, 30 frames per second, Main Profile level 3.1 with AAC-LC audio up to 160 Kbps, 48kHz, stereo audio in .m4v, .mp4, and .mov file formats; MPEG-4 video, up to 2.5 Mbps, 640 by 480 pixels, 30 frames per second, Simple Profile with AAC-LC audio up to 160 Kbps, 48kHz, stereo audio in .m4v, .mp4, and .mov file formats; Motion JPEG (M-JPEG) up to 35 Mbps, 1280 by 720 pixels, 30 frames per second, audio in ulaw, PCM stereo audio in .avi file format.
iPad Price starting at 499$
It would be nice to see microsoft coming with a small tablet "surface capable" 1280x720 P resolution where people could put there camera or phone in place on top of the tablet running an application in "surface application mode" to exchange and share contents (picture/music/video).
A commercial Microsoft Surface unit is $12,500 (unit only), whereas a developer Microsoft Surface unit costs $15,000 and includes a developer unit, five seats and support. However, Microsoft said it expects prices to drop enough to make consumer versions feasible in 2010. Microsoft would have to come with a price 20x lower than the actual Microsoft Surface unit to compete with the iPad. I think it is time to come up with a product...
Microsoft Surface represents a new category of computing. With capabilities like direct interaction, multi-touch, multi-user, and object recognition, Microsoft Surface computing is a unique and cutting edge platform for application development.
The Microsoft Surface platform goes beyond the capabilities of its core operating system foundation running Windows Vista SP1, yet it keeps the development process simple. The Microsoft Surface SDK 1.0 SP1 provides all the controls a developer needs to create innovative experiences on Microsoft Surface. And with the new capabilities that come with Service Pack 1, application development is easier than ever with new WPF controls and API enhancements that give developers more control, flexibility, and efficiency in creating applications.
Plus, in order to enable a broad developer audience, Microsoft Surface is compatible with familiar programs and tools developers use today, such as:
Microsoft® Windows Presentation Foundation (WPF)
Microsoft® XNA™
Microsoft® Visual C#® 2008 Express Edition
Microsoft® Visual Studio® 2008 SP1
Microsoft® Expression® Studio 2
Microsoft® Expression Blend™ 2
http://www.microsoft.com/surface/en/us/Pages/Product/Platform.aspx
In 2010 Apple launched the iPad.
The sdk is the same than the sdk used by the Apple iPhone
http://developer.apple.com/ipad/sdk/
The specs have been posted on Apple's web site.
http://www.apple.com/ipad/specs/
Screen size = 1024x768 and my interest will go immediately for TV and video
Support for 1024 by 768 pixels with Dock Connector to VGA Adapter; 576p and 480p with Apple Component AV Cable; 576i and 480i with Apple Composite AV Cable
H.264 video up to 720p, 30 frames per second, Main Profile level 3.1 with AAC-LC audio up to 160 Kbps, 48kHz, stereo audio in .m4v, .mp4, and .mov file formats; MPEG-4 video, up to 2.5 Mbps, 640 by 480 pixels, 30 frames per second, Simple Profile with AAC-LC audio up to 160 Kbps, 48kHz, stereo audio in .m4v, .mp4, and .mov file formats; Motion JPEG (M-JPEG) up to 35 Mbps, 1280 by 720 pixels, 30 frames per second, audio in ulaw, PCM stereo audio in .avi file format.
iPad Price starting at 499$
It would be nice to see microsoft coming with a small tablet "surface capable" 1280x720 P resolution where people could put there camera or phone in place on top of the tablet running an application in "surface application mode" to exchange and share contents (picture/music/video).
A commercial Microsoft Surface unit is $12,500 (unit only), whereas a developer Microsoft Surface unit costs $15,000 and includes a developer unit, five seats and support. However, Microsoft said it expects prices to drop enough to make consumer versions feasible in 2010. Microsoft would have to come with a price 20x lower than the actual Microsoft Surface unit to compete with the iPad. I think it is time to come up with a product...
Thursday, March 18, 2010
how to Install Apache, PHP, MySQL and phpMyAdmin on Windows XP
This tutorial will show you step-by-step how to install:
Apache 2
PHP 5
MySQL 5
phpMyAdmin on Windows
For those who want to install an all in one solution on Windows I recommend
WampServer
http://www.wampserver.com/en/
The WampServer package is usually delivered with the latest
releases of Apache, MySQL and PHP.
Once WampServer is installed, you can add other releases by downloading them on this
website. They will then appear in the WampServer menu and you will be able to
switch releases with a simple click.
Each release of Apache, MySQL and PHP has its own settings and its own files (datas
for MySQL).
Using wampserver
The “www” directory will be automatically created (usually c:\wamp\www)
Create a subdirectory in “www” and put your PHP files inside.
Click on the “localhost” link in the WampSever menu or open your internet browser and
go to the URL : http://localhost
Et Voila!
Double click on the downloaded file and just follow the instructions. Everything is
automatic. The WampServer package is usually delivered with the latest
releases of Apache, MySQL and PHP.
Once WampServer is installed, you can add other releases by downloading them on this
website. They will then appear in the WampServer menu and you will be able to
switch releases with a simple click.
Each release of Apache, MySQL and PHP has its own settings and its own files (datas
for MySQL).
Using wampserver
The “www” directory will be automatically created (usually c:\wamp\www)
Create a subdirectory in “www” and put your PHP files inside.
Click on the “localhost” link in the WampSever menu or open your internet browser and
go to the URL : http://localhost
Et Voila!
or XAMPP
http://www.apachefriends.org/en/xampp-windows.html
The Apache Server combined with the power of PHP, MySQL, and phpMyAdmin, creates one of the best possible development environments for a web programmer. Getting everything properly configured can take 20-30 minutes. And it can work on a non expensive OS such as Windows XP or Windows 7 Home Edition.
Installing Apache:
Follow the steps carefully.
1 Go to http://httpd.apache.org/download.cgi and download "Win32 Binary (MSI Installer): apache_2.2.4-win32-x86-no_ssl.msi" to your desktop.
Note: Make sure that you download Apache version 2.2.4 (Win32 Binary MSI Installer)!
2 Double click "apache_2.2.4-win32-x86-no_ssl.msi", and if prompted, click "run".
3 An installation wizard will appear:

Click "Next".
4 The next page contains the terms of agreement. Select "I accept", and click "Next".
5 Read about the Apache Server, and click "Next"
6 The next screen will ask you for specific server information. Enter the values seen below:

Click "Next".
7 On the next screen, select "Typical Installation" and click "Next".
8 Click "Next".
9 Click "Install".
10 Open up Internet Explorer and type in "http://localhost". If you see a page that says "It works!" then the Apache server has been installed successfully.
Note that if you install Flash Media Server an other instance of Apache will be installed which could cause conflict on the following default Apache server. It would be nice if the FMS team could handle this nicely in their installer....

A few notes on your Apache Server Configuration:
Apache is installed by default in your "C:\Program Files\Apache Software Foundation\Apache2.2" directory.
Inside that directory there is a folder called "htdocs" (matching of your \www\ or \public_html\ directory on a unix system). You can develop your applications inside this folder and access them by going to http://localhost/my_file_name.html
The Apache Configuration settings are defined in a file named "httpd.conf" located in the "conf" directory. Do not attempt to change these settings unless you know what you're doing.
Installing PHP:
Next we will be installing PHP version 5. Follow the steps carefully.
1 Go to http://www.php.net/downloads.php and download the "PHP 5.2.0 zip package" to your desktop. (Be patient while it downloads, the ZIP file is over 9MB!)
Note: Make sure that you download the PHP 5.2.0 zip package! The rest of the tutorial is written using this version.
2 Create a new folder called "php" in your C Drive. Copy the "php-5.2.0-Win32.zip" file to there ("C:\php") and extract it using WinZIP or a similiar program.
3 Your "C:\php" directory should now look like:

4 Next copy the "php.ini-dist" file from "C:/php/" to "C:/WINDOWS" and rename it to "php.ini". This is your PHP configuration file. We'll come back to this later.
5 Now it's time to tell Apache that PHP exists. Open up your Apache configuration file ("C:\Program Files\Apache Software Foundation\Apache2.2\conf\httpd.conf") in notepad and add these four lines to the bottom of the "LoadModule" section:
LoadModule php5_module "c:/php/php5apache2_2.dll"
AddHandler application/x-httpd-php .php
# configure the path to php.ini
PHPIniDir "c:/windows"
6 In your "htdocs" directory, create a file called "info.php". Open it in notepad and add this line of code to it:

7 Restart your Apache Server for the changes to take effect:
Start > All Programs > Apache HTTP Server 4.2.4 > Control Apache Server > Restart
or faster use the Apache Service Monitor seating in the tray icon bottom right bar on Windows XP
8 Open up Internet Explorer and type in: http://localhost/info.php. If your browser takes you to a page that looks like this, then PHP has been installed successfully!

Modifying your PHP Configuration File:
1 Your PHP configuration (php.ini) file is located in "C:/WINDOWS/php.ini". You can modify it with notepad or a similiar text editor. My favorite is Notepad++
2 Open it up and find the line that says:
extension_dir = "./"
and change it to
extension_dir = "C:\php\ext"
Find the line that says:
;session.save_path = "/tmp"
and change it to
session.save_path = "C:\WINDOWS\temp"
Installing MYSQL:
Next we will be installing MySQL version 5.
Follow the steps carefully.
1 Go to http://dev.mysql.com/downloads/mysql/5.0.html#downloads and download the "Windows (x86) ZIP/Setup.EXE (version 5.0.27)" to your desktop. (To do this you'll need to register an account with MySQL.)
2 Once "mysql-5.0.27-win32.zip" has finished downloading, you can extract it using WinZIP or a similiar program.
3 Once extracted, double click on the "Setup.exe" file. An installation wizard will appear.

Click "Next".
4 Select "Typical" Installation and click "Next".
5 Click "Install". (Be patient, this can take up to several minutes).
6 The next screen will ask you to "Sign Up". Select "Skip Sign-Up" for now.
7 The next screen will tell you that the installation wizard is complete. Make sure that the "Configure the MySQL Server now" field is checked before clicking "Finish".

8 The MySQL Server Instance Configuration Wizard should appear. Click "Next".
9 Select "Detailed Configuration" and click "Next".
10 Select "Developer Machine" and click "Next".
11 Select "Multifunctional Database" and click "Next".
12 Click "Next".
13 Select "Decision Support (DSS)/OLAP" and click "Next".
14 Select "Multifunctional Database" and click "Next".
15 Make sure "Enable TCP/IP Networking" is checked, the Port Number is set to "3306", and "Enable Strict Mode" is checked. Click "Next".
16 Select "Standard Character Set" and click "Next".
17 Check "Install As Windows Service", set the Service Name to "MySQL", and check "Launch the MySQL Server automatically". Make sure that the "Include Bin Directory in Windows Path" is NOT checked. Click "Next".
18 On the next screen, check the box that says "Modify Security Settings". Enter a password for the default "root" account, and confirm the password in the box below. Do NOT check the boxes "Enable root access from remote machines" or "Create An Anonymous Account". Click "Next".
19 Click "Execute". (This may take a few minutes. Be patient).
20 Click "Finish".
21 To test if MySQL was installed correct, go to: Start > All Programs > MySQL > MySQL Server 5.0 > MySQL Command Line Client. The MySQL Command Line Client will appear:

22 It will ask you for a password. Enter the password you created in step 18. (If you enter an incorrect password MySQL will automatically close the command line)
23 Next, type in the commands shown below: (shown in blue)

If you don't get any errors, and it returns the information shown above, then MySQL has been successfully installed! Next we will need to configure PHP to work with MySQL.
Configuring PHP to work with MySQL:
Now that both PHP and MySQL are installed, we have to configure them to work together.
1 Open up your php.ini file (C:/WINDOWS/php.ini) and find the line:
;extension=php_mysql.dll
To enable the MySQL extension, delete the semi-colon at the beginning of that line.
2 Next we must add the PHP directory to the Windows PATH. To do this, click: Start > My Computer > Properties > Advanced > Environment Variables. Under the second list (System Variables), there will be a variable called "Path". Select it and click "Edit". Add ";C:\php" to the very end of the string and click "OK".
3 Restart your computer for the changes to take effect.
4 Create a new file in your "htdocs" directory called "mysql_test.php".
5 Copy the following code into "mysql_test.php" and click save. (Make sure to replace the MYSQL_PASS constant with the MySQL Password you specified during the MySQL installation).

6 Open up Internet Explorer and type in "http://localhost/mysql_test.php". If the "mysql_test.php" page returns something similiar to:
ID: 1
Name: John
Then PHP & MySQL have been successfully configured to work together. Congratulations! The next and final step is to install phpMyAdmin.
Installing phpMyAdmin:
Now that both Apache, PHP and MySQL are installed, we can install phpMyAdmin, a tool that allows you to easily manage your MySQL databases.
1 Go to http://www.phpmyadmin.net/home_page/downloads.php and download "english.zip" under the phpMyAdmin 2.9.2 section to your desktop (I assume that since you are reading this article that you understand English).
2 Create a new folder called "phpmyadmin" in your "htdocs" directory. Extract the contents of the "phpMyAdmin-2.9.2-english.zip" ZIP file here. Your C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\phpmyadmin" directory should now look like:

3 Create a new file in the "phpMyAdmin" directory (above) called "config.inc.php". Place this code inside it and be sure to replace "YOUR_PASSWORD_HERE" (in both places below) with your MySQL Password:

4 phpMyAdmin has now been successfully installed! To use it, open up Internet Explorer and type in "http://localhost/phpmyadmin". This will bring you to the main phpMyAdmin page. Note is is always recommended not to install admin tool in default location if deployed on a server open to internet access for security reason.
Enjoy using Apache, PHP, MySQL, and phpMyAdmin!
Apache 2
PHP 5
MySQL 5
phpMyAdmin on Windows
For those who want to install an all in one solution on Windows I recommend
WampServer
http://www.wampserver.com/en/
The WampServer package is usually delivered with the latest
releases of Apache, MySQL and PHP.
Once WampServer is installed, you can add other releases by downloading them on this
website. They will then appear in the WampServer menu and you will be able to
switch releases with a simple click.
Each release of Apache, MySQL and PHP has its own settings and its own files (datas
for MySQL).
Using wampserver
The “www” directory will be automatically created (usually c:\wamp\www)
Create a subdirectory in “www” and put your PHP files inside.
Click on the “localhost” link in the WampSever menu or open your internet browser and
go to the URL : http://localhost
Et Voila!
Double click on the downloaded file and just follow the instructions. Everything is
automatic. The WampServer package is usually delivered with the latest
releases of Apache, MySQL and PHP.
Once WampServer is installed, you can add other releases by downloading them on this
website. They will then appear in the WampServer menu and you will be able to
switch releases with a simple click.
Each release of Apache, MySQL and PHP has its own settings and its own files (datas
for MySQL).
Using wampserver
The “www” directory will be automatically created (usually c:\wamp\www)
Create a subdirectory in “www” and put your PHP files inside.
Click on the “localhost” link in the WampSever menu or open your internet browser and
go to the URL : http://localhost
Et Voila!
or XAMPP
http://www.apachefriends.org/en/xampp-windows.html
The Apache Server combined with the power of PHP, MySQL, and phpMyAdmin, creates one of the best possible development environments for a web programmer. Getting everything properly configured can take 20-30 minutes. And it can work on a non expensive OS such as Windows XP or Windows 7 Home Edition.
Installing Apache:
Follow the steps carefully.
1 Go to http://httpd.apache.org/download.cgi and download "Win32 Binary (MSI Installer): apache_2.2.4-win32-x86-no_ssl.msi" to your desktop.
Note: Make sure that you download Apache version 2.2.4 (Win32 Binary MSI Installer)!
2 Double click "apache_2.2.4-win32-x86-no_ssl.msi", and if prompted, click "run".
3 An installation wizard will appear:

Click "Next".
4 The next page contains the terms of agreement. Select "I accept", and click "Next".
5 Read about the Apache Server, and click "Next"
6 The next screen will ask you for specific server information. Enter the values seen below:

Click "Next".
7 On the next screen, select "Typical Installation" and click "Next".
8 Click "Next".
9 Click "Install".
10 Open up Internet Explorer and type in "http://localhost". If you see a page that says "It works!" then the Apache server has been installed successfully.
Note that if you install Flash Media Server an other instance of Apache will be installed which could cause conflict on the following default Apache server. It would be nice if the FMS team could handle this nicely in their installer....

A few notes on your Apache Server Configuration:
Apache is installed by default in your "C:\Program Files\Apache Software Foundation\Apache2.2" directory.
Inside that directory there is a folder called "htdocs" (matching of your \www\ or \public_html\ directory on a unix system). You can develop your applications inside this folder and access them by going to http://localhost/my_file_name.html
The Apache Configuration settings are defined in a file named "httpd.conf" located in the "conf" directory. Do not attempt to change these settings unless you know what you're doing.
Installing PHP:
Next we will be installing PHP version 5. Follow the steps carefully.
1 Go to http://www.php.net/downloads.php and download the "PHP 5.2.0 zip package" to your desktop. (Be patient while it downloads, the ZIP file is over 9MB!)
Note: Make sure that you download the PHP 5.2.0 zip package! The rest of the tutorial is written using this version.
2 Create a new folder called "php" in your C Drive. Copy the "php-5.2.0-Win32.zip" file to there ("C:\php") and extract it using WinZIP or a similiar program.
3 Your "C:\php" directory should now look like:

4 Next copy the "php.ini-dist" file from "C:/php/" to "C:/WINDOWS" and rename it to "php.ini". This is your PHP configuration file. We'll come back to this later.
5 Now it's time to tell Apache that PHP exists. Open up your Apache configuration file ("C:\Program Files\Apache Software Foundation\Apache2.2\conf\httpd.conf") in notepad and add these four lines to the bottom of the "LoadModule" section:
LoadModule php5_module "c:/php/php5apache2_2.dll"
AddHandler application/x-httpd-php .php
# configure the path to php.ini
PHPIniDir "c:/windows"
6 In your "htdocs" directory, create a file called "info.php". Open it in notepad and add this line of code to it:

7 Restart your Apache Server for the changes to take effect:
Start > All Programs > Apache HTTP Server 4.2.4 > Control Apache Server > Restart
or faster use the Apache Service Monitor seating in the tray icon bottom right bar on Windows XP
8 Open up Internet Explorer and type in: http://localhost/info.php. If your browser takes you to a page that looks like this, then PHP has been installed successfully!

Modifying your PHP Configuration File:
1 Your PHP configuration (php.ini) file is located in "C:/WINDOWS/php.ini". You can modify it with notepad or a similiar text editor. My favorite is Notepad++
2 Open it up and find the line that says:
extension_dir = "./"
and change it to
extension_dir = "C:\php\ext"
Find the line that says:
;session.save_path = "/tmp"
and change it to
session.save_path = "C:\WINDOWS\temp"
Installing MYSQL:
Next we will be installing MySQL version 5.
Follow the steps carefully.
1 Go to http://dev.mysql.com/downloads/mysql/5.0.html#downloads and download the "Windows (x86) ZIP/Setup.EXE (version 5.0.27)" to your desktop. (To do this you'll need to register an account with MySQL.)
2 Once "mysql-5.0.27-win32.zip" has finished downloading, you can extract it using WinZIP or a similiar program.
3 Once extracted, double click on the "Setup.exe" file. An installation wizard will appear.

Click "Next".
4 Select "Typical" Installation and click "Next".
5 Click "Install". (Be patient, this can take up to several minutes).
6 The next screen will ask you to "Sign Up". Select "Skip Sign-Up" for now.
7 The next screen will tell you that the installation wizard is complete. Make sure that the "Configure the MySQL Server now" field is checked before clicking "Finish".

8 The MySQL Server Instance Configuration Wizard should appear. Click "Next".
9 Select "Detailed Configuration" and click "Next".
10 Select "Developer Machine" and click "Next".
11 Select "Multifunctional Database" and click "Next".
12 Click "Next".
13 Select "Decision Support (DSS)/OLAP" and click "Next".
14 Select "Multifunctional Database" and click "Next".
15 Make sure "Enable TCP/IP Networking" is checked, the Port Number is set to "3306", and "Enable Strict Mode" is checked. Click "Next".
16 Select "Standard Character Set" and click "Next".
17 Check "Install As Windows Service", set the Service Name to "MySQL", and check "Launch the MySQL Server automatically". Make sure that the "Include Bin Directory in Windows Path" is NOT checked. Click "Next".
18 On the next screen, check the box that says "Modify Security Settings". Enter a password for the default "root" account, and confirm the password in the box below. Do NOT check the boxes "Enable root access from remote machines" or "Create An Anonymous Account". Click "Next".
19 Click "Execute". (This may take a few minutes. Be patient).
20 Click "Finish".
21 To test if MySQL was installed correct, go to: Start > All Programs > MySQL > MySQL Server 5.0 > MySQL Command Line Client. The MySQL Command Line Client will appear:

22 It will ask you for a password. Enter the password you created in step 18. (If you enter an incorrect password MySQL will automatically close the command line)
23 Next, type in the commands shown below: (shown in blue)

If you don't get any errors, and it returns the information shown above, then MySQL has been successfully installed! Next we will need to configure PHP to work with MySQL.
Configuring PHP to work with MySQL:
Now that both PHP and MySQL are installed, we have to configure them to work together.
1 Open up your php.ini file (C:/WINDOWS/php.ini) and find the line:
;extension=php_mysql.dll
To enable the MySQL extension, delete the semi-colon at the beginning of that line.
2 Next we must add the PHP directory to the Windows PATH. To do this, click: Start > My Computer > Properties > Advanced > Environment Variables. Under the second list (System Variables), there will be a variable called "Path". Select it and click "Edit". Add ";C:\php" to the very end of the string and click "OK".
3 Restart your computer for the changes to take effect.
4 Create a new file in your "htdocs" directory called "mysql_test.php".
5 Copy the following code into "mysql_test.php" and click save. (Make sure to replace the MYSQL_PASS constant with the MySQL Password you specified during the MySQL installation).

6 Open up Internet Explorer and type in "http://localhost/mysql_test.php". If the "mysql_test.php" page returns something similiar to:
ID: 1
Name: John
Then PHP & MySQL have been successfully configured to work together. Congratulations! The next and final step is to install phpMyAdmin.
Installing phpMyAdmin:
Now that both Apache, PHP and MySQL are installed, we can install phpMyAdmin, a tool that allows you to easily manage your MySQL databases.
1 Go to http://www.phpmyadmin.net/home_page/downloads.php and download "english.zip" under the phpMyAdmin 2.9.2 section to your desktop (I assume that since you are reading this article that you understand English).
2 Create a new folder called "phpmyadmin" in your "htdocs" directory. Extract the contents of the "phpMyAdmin-2.9.2-english.zip" ZIP file here. Your C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\phpmyadmin" directory should now look like:

3 Create a new file in the "phpMyAdmin" directory (above) called "config.inc.php". Place this code inside it and be sure to replace "YOUR_PASSWORD_HERE" (in both places below) with your MySQL Password:

4 phpMyAdmin has now been successfully installed! To use it, open up Internet Explorer and type in "http://localhost/phpmyadmin". This will bring you to the main phpMyAdmin page. Note is is always recommended not to install admin tool in default location if deployed on a server open to internet access for security reason.
Enjoy using Apache, PHP, MySQL, and phpMyAdmin!
Subscribe to:
Posts (Atom)
