One More Thing: AirPods will measure your Body Temperature and Respiratory Rate

Wireless. Effortless. Magical.

It is mid-Sep. It is Apple time. iPhone and Apple Watch get the spotlight. They are great products. But I am more interested in AirPods because it is something new, and magical.

Hearable? Yes
Audio Computing? Yes
Life saving???

In my previous posts (this and this) in 2014, I predicted “iWatch” would be health centric and could measure life vitals – pulse rate, body temperature and blood pressure. Only pulse (heart) rate came true. I think we will have in coming Oct two more vitals – body temperature and respiratory rate.

Vitals” width=”169″ height=”300″> iPhone Health app > Vitals

According to, eardrum is a good point to measure core body temperature from because it is recessed inside the head. We put a tympanic (ear) thermometer inside the external ear canal to measure the infrared radiation from the eardrum. Tympanic thermometer is fast and creates no discomfort. The key measurement component is infrared sensor.

Ear Thermometer (source:

Ear Thermometer (source:

There are recent researches to estimate respiratory rate using tri-axial accelerometer. Recode reported in mid-2014 that Spire developed breath monitoring device. One of the key component is accelerometer.

With W1s, infrared sensors and motion accelerometers, AirPods are capable to re-invent tympanic thermometers and respiratory rate measurement devices.

Simultaneous out-of-range readings of multiple life vitals possibly indicate unhealthy or even adverse condition. If this happens, Apple Watch will alert you (to use the Breath app to calm down). If this happens for a prolong period and alerts are unattended, then Apple Watch SOS will initiate a call with local emergency. It may save a life!

Apple Watch SOS

Apple Watch SOS

It is more than magical.

Apple One More Thing always brings good surprise. Thank you.

How to take an ear temperature |
Respiratory Rate and Flow Waveform Estimation from Tri-axial Accelerometer Data | IEEE
The AirPods are Apple’s first ear computer | Slate
A New Wearables Platform | Above Avalon
Gadget Lab Podcast – The Thing That Gets You to The Thing | Wired

iPhone 7 is gorgeous. Hong Kong Victoria Harbour too.


The iPhone 7 is gorgeous. At the end of “Introducing iPhone 7” video, there is a another gorgeous scene – the Hong Kong Victoria Harbour. There are similar scenes in other iPhone ad…

iPhone 7 ad – Introducing iPhone 7 (2min 6sec)

iPhone 6s ad – The Only Thing That’s Changed Is… (56sec)

iPhone 5 ad – Music Every Day (58sec)





How to use HolaCDN to load share from multiCDN

In my previous post I showed how to use HolaCDN to improve the performance of a mp4 video which is already accelerated using CDN service.

This time I would like to show how to use HolaCDN MultiCDN feature to improve the performance of a multi-birate HLS video. HolaCDN MultiCDN will automatically measure performance of multiples CDNs (defined by user) and select the optimal CDN to use.

In this demo, HolaCDN will select among the customer origin, a 3rd party CDN and HolaCDN.

In the screen capture below, Chrome Developer Tools shows the HolaCDN JS client loads video chunks from serveral hosts: (customer origin), (a 3rd party CDN) and (a HolaCDN server).


The following picture shows the result generated by the command hola_cdn.get_stats() in the Chrome Develop Tools Console: 20% of traffic is from the customer origin, 18% from the 3rd party CDN, and the remaining is from HolaCDN.


How to set up HolaCDN MultCDN feature in this demo?
Step 1: create a new Zone named “hlsmulti” by defining the Page URL as

Step 2: in the MultiCDN selection algorithm, I input the $0.5 as the cost of HolaCDN and $0.05 as the cost of “My existing CDN”. Doing so to instruct HolaCDN to use My existing CDN unless HolaCDN improve performance (better video start/seek time, less buffering, higher video quality/bitrate).

Step 3: for demo purpose, HolaCDN will take actions – collects QoE statistics and deliver video content – if the user is using Chrome browser. For every 100 pageviews from Chrome users, all will colllect QoE statistics, and HolaCDN will try to deliver video content in 90 pageviews.

Step 4: define “My existing CDN”. In this demo, the are two “CDNs” – and

Step 5: I use Static MultiCDN switching mode. If HolaCDN finds and perform better than HolaCDN, then 50% possibility that video will be retrieved from and 50% possibility that video will be loaded from


That’s all.

In other to do a control experiment, I use Firefox to browse the demo page. Based on my setup, HolaCDN will do nothing and the browser will get all HLS TS chunks from the host defined in the html source code. Here is the result from Firefox + Firebug:


Want to try it yourself? Go to apply a HolaCDN free trial account now!

How to use Hola!CDN for MP4 progressive download

Hola is a Spanish word meaning Hello.

Hola! is a startup headquartered in Netanya, Israel. Hola!’s goal is to make the web faster, more open and cheaper to operate.

Hola!CDN is the first CDN purpose built for video. It is developed and operated by Hola!. Hola!CDN makes Internet video delivery Faster, Cheaper and More Reliable.

It is my pleasure to share with readers that I am now working at Hola!CDN!

In my last blogpost I talked my first Israel visit. The main objective of the trip was to attend Hola!CDN training.

The unique Hola!CDN architecture makes it possible to do Five things that other CDNs cannot do:

  1. Significantly speeds up your video delivery (start time, buffering, seek time, bit rate, failure rate)
  2. Provides accurate statistics on your viewers’ quality of experience
  3. Enables mid stream switching of multiple CDNs (configure Hola!CDN’s dashboard to work with several CDNs, taking each video chunk from the fastest and cheapest)
  4. Reduces video delivery cost substantially, with same low cost from first byte, to anywhere in the world
  5. Keeps your existing CDN – Hola will only participate where its faster and cheaper

The new architecture is comprised of a client side JavaScript code that manages the video delivery from the viewers’ browser. The integration of the Hola!CDN client side module with the Hola!CDN server module creates a fast, seamless user experience, and a low cost of delivery.

Detail Hola!CDN implementation guide can found at GitHub:

In this blogpost I would like to SHOW how to implement Hola!CDN in a webpage with MP4 progressive download.

Step 1: apply a Hola!CDN account account. We offer 14-day free trial account at

Step 2: configure Hola!CDN service. The minimum step is to add your Video Source(s). Video Source is the hostname of the CDN or customer origin that your video is cached/stored.

Hola!CDN customer portal

Hola!CDN customer portal

Step 3:  insert the codes in the header section to instruct the browser to downland the Hola!CDN JavaScript client with your specific configuration, and insert another codes at the end of the body section to instruct the browser to download the Hola!CDN JavaScript client asynchronously

HTML codes to implement Hola!CDN

HTML codes to implement Hola!CDN

Three steps. That’s all. No DNS change is required!


Below is the screen shot of Chrome DevTools of the original page:

Chrom DevTools of original page

Chrome DevTools of original page

This is the screen shot of Chrome DevTools of the page implemented Hola!CDN:

Chrome DevTools of the page implemented Hola!CDN

Chrome DevTools of the page implemented Hola!CDN

There are 6 HTTP requests in the original page and 65 in the page implemented Hola!CDN. Why?

Let’s talk more next time.

Shalom Israel! HKG-TLV-HKG

Shalom is a Herbrew word meaing peace, armony, wholeness, completeness, prosperity, welfare and tranquility and can be used idiomatically to mean both hello and goodbye.

I visited Israel recently. My first time in Canaan, the Promised Land.

The distance between Hong Kong and Israel is 7764km, almost one-third of the Equator length. It is lucky that there is direct flight between Hong Kong (HKG) and Tel Aviv Yafo (TLV), Israel. EL AL Israel Airline operates the direct flights from Sunday to Thursday. I guess due to Sabbath (Friday 6pm to Saturday 6pm) there is no flight on Fri and Sat. HKG-to-TLV is about 12hr 30min, TLV-to-HKG is 11hr! Long flights!

Passengers should arrive the boarding gate at Hong Kong International Airport one hour before the departure time. EL AL will do security check of hand carry baggage again at the boarding gate and the process is about 20 to 30 minutes. One should arrive Ben Gurion International Airport two hours before departure time. There is security check of hand carry baggage at the custom and it will also take 20 to 30 minutes. Keep hand carry baggage minimal!

Israel area is about 20,770 square kilometers (21 times that of HK) and the population is 8.4m (while HK is 7.4m). 75% are Jewish and 20% are Arab. The electricity plug in Israel is Type C (CEE 7/16 “Europlug”). It is better to bring a plug adaptor if you travel to Netanya. It is not easy to get an adaptor in hotel or buy one in shopping area.

Hola! is a startup based in Netanya. Mission: to make the Internet more Open, more Transparent, and Faster!

Hola! is a startup based in Netanya. Mission: to make the Internet more Open, more Transparent, and Faster!

I spend most of the time in Netanya. There are many technology companies. Cisco and Microsoft have huge campus there. There are many ambitious and energetic startups as well.

Beach at Netanya

Beach at Netanya

Netanya is a beautiful city. There are great beaches and many surfers! Mostly sunny day. Bright blue sky, white sand, navy blue Mediterranean Sea. Apartments are built with large balconies. Enjoy the sunshine and the breeze!

Apartments with large balconies at Netanya

Apartments with large balconies at Netanya

I was lucky to have a Tel Aviv leisure trip by end of the trip. Tel Aviv Is the major commercial centre in IsraeI and a popular travel destination. It took me about 30min by taxi from Netanya to Tel Aviv.  I visited the Sarona Market area in the morning. There are many old German-style buildings. They are turned into shops, boutiques and designer stores. (Sound familiar? Xintiandi in Shanghai!) I bought some very nice Hamsa there!

The old German style building in the Sarona Market area are turned in different kind of shops.

The old German style buildings in the Sarona Market area are turned in different kind of shops.

I had Hummus as lunch. Falafel and Turkish coffee too.

Hummus. Delicious.

Hummus. Delicious.

I visited Jaffa area in the afternoon. Jaffa, with many thousand years of history, is one of the oldest port in the world!  The area was called Joppa in the past. Jaffa is famous for its association with the biblical stories of Jonah and Saint Peter.

Saint Peter's Church, located Jaffa area of Tel Aviv. Built in 1645.

Saint Peter’s Church, located Jaffa area of Tel Aviv. Built in 1645.

I wondered how difficult and dangerous it was for Saint Peter and other disciples to spread Jesus’ teaching under the Jewish and Roman persecutions. I was in the place where all these were happening nearby two thousand year ago. Thank God.

Saint Peter’s Church interior

Saint Peter’s Church interior

“Go therefore and make disciples of all nations, baptizing them in the name of the Father and of the Son and of the Holy Spirit, teaching them to observe all that I have commanded you. And behold, I am with you always, to the end of the age.”
Matthew 28:19-20

How to use AWS S3 as Customer Origin for HLS videos

Hello AWS!

Finally I use the famous Amazon Web Service. I use AWS Simple Storage Service (S3) to test something about online videos.

Why AWS?

  1. Web server support of Cross-Origin Resource Sharing (CORS) is a common requirement for video players.
  2. AWS is a popular platform. I don’t know how to set up Cross Origin Resource Sharing (CORS) on my existing hosting provider GoDaddy. While there are more Google results about “AWS S3 CORS”.
  3. AWS offers free trial. Many AWS services are free at low volume usages. S3 is free is usage is less than 5GB & 20000 Get Request & 2000 Put Request per month.
  4. GoDaddy becomes more difficult to use. GUI becomes more chaotic and slow!

There are many motivations for me to use AWS. The remaining question is learning curve. I spend sometime of the recent Chinese New Year holidays studying how to use AWS as customer origin for HLS videos. It was quite easy and interesting to learn and use AWS.

And now I am thinking to move my demo sites from GoDaddy to AWS!

Lesson learnt: cloud service provider should provide user-friendly support information and free trial to help people to become its users.

Since HLS is not supported by many desktop browsers, I need to use a video player to help desktop users to view my testing HLS videos. I pick Flowplayer because there is good support information (adequate and useful for me) and it is free (again)!

I created two S3 buckets, one for html files and one for video content. Serve-side CORS support is required by Flowplayer. I used the suggestions from an AWS doc and a StackOverflow discussion (see the online resources below). I verified Access-Control-Allow-Origin response header was returned by AWS S3 by the command curl -sI -H "Origin:" -H "Access-Control-Request-Method: GET"

Below was the command output:

HTTP/1.1 200 OK
x-amz-id-2: ufXH6929lMlXDveTkzj1IDPW1Q1q0/LtW/joHnui0LBM7l0TQ/hNQ59+0mxLUPGjPoBqyxBcopg=
x-amz-request-id: 37DE725CA5A9B471
Date: Sat, 20 Feb 2016 18:32:20 GMT
Access-Control-Allow-Methods: HEAD, GET
Access-Control-Expose-Headers: Content-Range, Date, Etag
Access-Control-Max-Age: 600
Access-Control-Allow-Credentials: true
Vary: Origin, Access-Control-Request-Headers, Access-Control-Request-Method
Last-Modified: Sat, 20 Feb 2016 18:31:34 GMT
ETag: "53252b004b38563c1afdd13a3647b7fa"
Content-Type: text/html
Content-Length: 581
Server: AmazonS3

Moreover, I wrote a simple crossdomain.xml file suggested by FlowPlayer, uploaded it to the video content bucket. With all these, my new testing site is now up and running! I use iPhone, Android 5+ device and MacBook (Safari, Chrome and Firefox) to check browser compatibility.

I am not going to re-invent the wheel. Please find below the online resources I find very useful about how to use AWS S3 as customer origin for HLS videos!

Shalom! Wish you have a great Friday evening!

PS: My CDN demo site will be under re-construction and not available between 26-Feb and 11-Mar.

Hi Year of Monkey! Hi MSE!

Gong Xi Fa Cai! Wish everyone has a happy and healthy Year of Monkey.

It is the fifth day of the new Chinese New Year. It is time to write something new.

I am studying Media Source Extensions (MSE) recently. In a nutshell, MSE enables browsers to play streaming media without plugins.

What is MSE?
-W3C: MSE is a W3C specification that allows JavaScript to send byte streams to media codecs within web browsers that support HTML5 video. The first public draft was released in Jan 2013. Among other possible uses, this allows the implementation of client-side prefetching and buffering code for streaming media entirely in JavaScript.

-Microsoft: build custom adaptive streaming solutions using MSE. Such an adaptive streaming solution would look for the optimal bit rate based on network bandwidth and CPU utilisation to provide the highest quality streaming experience. For example, if the network bandwidth drops, you can use MSE to programmatically switch the video stream to a lower bit rate. This reduces the quality of the image, but allows the video to keep playing without interruptions.

-Netflix: This makes it possible for Netflix to download audio and video content from our content delivery networks and feed it into the video tag for playback. Since we can control how to download the audio/video content in our JavaScript code, we can choose the best HTTP server to use for content delivery based on real-time information, and we can implement critical behaviour like failing over to alternate servers in the event of an interruption in content delivery. In addition, this allows us to implement our industry-leading adaptive streaming algorithms (real-time selection of audio/video bitrates based on available bandwidth and other factors) in our JavaScript code. Perhaps best of all, we can iterate on and improve our content delivery and adaptive streaming algorithms in JavaScript as our business needs change and as we continue to experiment.

More and more video providers are moving away from browser plug-ins to MSE. Youtube and BBC are two examples.

Not all browsers are created equal. At the moment Chrome v34 (both desktop Android 4.4+ versions) and IE 11 on Windows 8 are the best browsers supporting MSE.

Safari on iOS does not support MSE.

Maybe I need an Android tablet.

HTML5 Video at Netflix | Netflix

The Current State of Media Source Extensions | Wowza

The State of HTML5 Video | JW Player

How to Build a Streaming HTML5 Video Player |

PS: My CDN demo site will be under re-construction and not available between 26-Feb and 11-Mar.