How To Live Stream To YouTube from a RetroPie

In my last post I showed how you can live stream to Twitch from a RetroPie and in this post I will build off of that and show how you can stream to YouTube.

The basics of this guide are very similar to the Twitch guide so I suggest you give it a read as I will assume that you already know how to do things like ssh into your RetroPie and work with the config files.

YouTube Account and Stream Key

The first step is to get your YouTube live account setup. To do so visit: https://gaming.youtube.com/ and click the “Go Live” button at the top right. If you don’t have a YouTube live account you will be prompted to create one.

screenshot-from-2016-10-17-19-20-13

Then go to your YouTube Live dashboard and scroll to the bottom of the screen. At the bottom of the screen you will see your Encoder Server URL and Stream key:

screenshot-from-2016-10-17-19-14-03

You will need to press the reveal button to actually get your YouTube Stream key. Keep that around but like your Twitch stream key do not share it with anyone.

Streaming Config File

Now that our account is set up we will need to create an FFmpeg config file for our YouTube streaming. We could share the Twitch file but to make this guide easier we will create a new file, plus I think that their settings will need to be different. SSH into your RetroPie and create your YouTube config file with the following command:

$ nano /home/pi/RetroPie/recording/youtube.cfg

screenshot-from-2016-10-17-19-28-38

Then paste the following config settings into the file:

vcodec = libx264
acodec = libfdk_aac
pix_fmt = yuv420p
threads = 2
scale_factor = 1
format = flv
 
video_preset = ultrafast
video_profile = main
video_tune = animation
video_bufsize = 512k
video_minrate = 512k
video_maxrate = 512k
video_r = 60
video_g = 120
video_keyint_min = 60
 
sample_rate = 44100
audio_preset = aac_he_v2
audio_global_quality = 1

screenshot-from-2016-10-17-19-29-36

Then save (CTRL+O) and exit nano (CTRL+X).

Note: I’ve noticed that the video quality on YouTube using these settings is a little worse than what I was seeing on Twitch. So they will need to be tweaked a little bit in the future.

Emulator Configuration

Now we need to edit the config file for the emulators that we want to stream. More information on this can be found in my game play stream tutorial. All emulator config files can be found using the following path:

/opt/retropie/configs/$$SYSTEM$$/emulators.cfg

Where $$SYSTEM$$ is the name of the system that you want to configure. For this example we will be adding a YouTube livestream entry to the NES config file. To do so we edit it with the following command:

$ nano /opt/retropie/configs/nes/emulators.cfg

Then we will add a ‘lr-fceumm-record-youtube’ entry that will stream to YouTube:

lr-fceumm-record-youtube = "/opt/retropie/emulators/retroarch/bin/retroarch -L /opt/retropie/libretrocores/lr-fceumm/fceumm_libretro.so --config /opt/retropie/configs/nes/retroarch.cfg --record rtmp://a.rtmp.youtube.com/live2/$$STREAM_KEY$$ --recordconfig /home/pi/RetroPie/recording/youtube.cfg %ROM%"

Where:

rtmp://a.rtmp.youtube.com/live2/$$STREAM_KEY$$

is the YouTube URL we are streaming to and $$STREAM_KEY$$ is the YouTube stream key we got earlier.

And:

--recordconfig /home/pi/RetroPie/recording/youtube.cfg

tells FFmpeg to use the config file we created earlier.

Then save (CTRL+O) and exit nano (CTRL+X).

Streaming Your GamePlay

screenshot-from-2016-10-17-21-22-34

Now that we have everything setup we can stream to YouTube by starting a NES game and then pressing the ‘A’ button while the game is loading. This will load the configuration screen, from there select ‘Select emulator for rom’. You will now see the new ‘lr-fceumm-record-youtube’ entry that we added. Select it (it will now be the default so be sure to change it if you don’t want to stream next time you play) and when you launch the game you should now be streaming to YouTube.

That’s it.

You can check out my live YouTube here: https://gaming.youtube.com/user/selsine/live

How To Live Stream To Twitch from a RetroPie

This article will show your how to live stream from your RetroPie directly to Twitch.com.

If you want to stream from your RetroPie to Twitch you will first need to get gameplay recording working (installing FFmpeg and rebuilding RetroArch with FFmpeg support) which you can do by following along with my earlier post: How To Record A GamePlay Video From A RetroPie

Once that is set up the next steps are pretty simple, I thought that it would be more difficult but it turns out it’s pretty straight forward to get a RetroPie to stream something to Twitch.

The big problem is the performance of the games as you are playing them. The performance is alright but I’d love to be able to up the quality a bit without having the games slow down as you play them, but I thought that I would post this and maybe a reader who knows FFmpeg better than I do could give me some tips.

Note: You can see my test stream here: https://www.twitch.tv/selsine

Assumptions

I’m going to assume that you can already ssh into your RetroPie and that you can already record gameplay videos. If not checkout my post: How To Record A GamePlay Video From A RetroPie or RetroResolutions: Recording Live Gameplay in RetroPie’s RetroArch Emulators Natively on the Raspberry Pi

Getting A Twitch Account and Stream Key

If you want to stream to Twitch you will need a Twitch account (of course) to do so visit: https://www.twitch.tv/signup and signup.

Once you have an account you will need your Twitch stream key. You can get this by visiting the ‘Stream Key’ tab on your twitch dashboard at the following URL:

https://www.twitch.tv/<>/dashboard/streamkey

screenshot-from-2016-10-16-11-56-58

From there hit the ‘Show Key’ button and grab your stream key.

Note: Keep your stream key private. Anyone that has it can stream to your Twitch account, and you don’t want that happening.

Twitch Config File

Now that we have our twitch account setup we will need to create a Twitch config file for FFmpeg so that the recordings it does are compatible with the Twitch servers.

To do that ssh into your Raspberry Pi and use the following command to create the config file:

$ nano /home/pi/RetroPie/recording/twitch.cfg

screenshot-from-2016-10-16-12-02-37

I based my config file off of what I found on the RetroArch wiki however when ever I had my audio codex set to ‘libmp3lame’ I would get a “bus error” at the following location: ‘/opt/retropie/supplementary/runcommand/runcommand.sh: line 855: 16499’

Switching to ‘aac’ as the audio code solved the issue and got me streaming to Twitch, however there were lots of lag issues, so I spent a long time configuring the settings trying to get the games to play smoothly locally and stream at the same time.

In the end these are the settings that I settled on:

vcodec = libx264
acodec = libfdk_aac
pix_fmt = yuv420p
threads = 2
scale_factor = 1
format = flv

video_preset = ultrafast
video_profile = main
video_tune = animation
video_bufsize = 512k
video_minrate = 512k
video_maxrate = 512k
video_r = 60
video_g = 120
video_keyint_min = 60

sample_rate = 44100
audio_preset = aac_he_v2
audio_global_quality = 1

There is only a bit of audio distortion but the stream gets an excellent rating on Twitch.

Once you have pasted the above settings into your config file save (CTRL+O) and exit (CTRL+X).

Emulator Configuration

Now we need to add an entry into our emulator config file that will start a twitch stream rather than a regular recording or normal emulation.

Note: For more information on emulator config files checkout my first recording howto.

For this example we are going to edit the NES system’s config file using the following command (you have to ssh in):

$ nano /opt/retropie/configs/nes/emulators.cfg

Then we need to add an entry that will stream to Twitch. We will call it: ‘lr-fceumm-record-twitch’ and we will use the following command:

lr-fceumm-record-twitch = "/opt/retropie/emulators/retroarch/bin/retroarch -L /opt/retropie/libretrocores/lr-fceumm/fceumm_libretro.so --config /opt/retropie/configs/nes/retroarch.cfg --record rtmp://live.twitch.tv/app/$$STREAM_KEY$$ --recordconfig /home/pi/RetroPie/recording/twitch.cfg %ROM%"

Where we specify the Twitch config file that we created earlier:

--recordconfig /home/pi/RetroPie/recording/twtich.cfg

And the RMTP Twitch URL that we will stream to:

--record rtmp://live.twitch.tv/app/$$STREAM_KEY$$

Where $$STREAM_KEY$$ is the stream key that you got from your Twitch account earlier.

screenshot-from-2016-10-16-12-13-12

Then save (CTRL+O) and exit (CTRL+X).

Note: You may want to check out the list of Twitch servers and choose one that is the closest to you.

Streaming Your Gameplay

That’s it for the setup. Now you can go into the NES section on your RetroPie and start a game. While the game is loading hit the ‘A’ button to enter the configuration and select ‘Select emulator for rom’. There you will see the new ‘lr-fceumm-record-twitch’ entry that we added. Select it (it will now be the default so be sure to change it if you don’t want to stream next time you play.) and when you launch the game you should now be streaming to twitch.

You can check my stream to see if I’m playing anything: https://www.twitch.tv/selsine

screenshot-from-2016-10-16-20-07-41

How To Record A GamePlay Video From A RetroPie

(Proof that this works)

Introduction

If you saw my last post you probably know that I’m into retro video games. What you might not know is that I do my retro gaming using a RetroPie. I can take screen shots of my games while I’m playing, but the RetroPie does not come with the built-in ability to create game play videos. As a result I did some Googling and found a fantastic blog post detailing how to accomplish this on RetroResolution.com: Recording Live Gameplay in RetroPie’s RetroArch Emulators Natively on the Raspberry Pi. The following is a log of how I accomplished this following RetroResolution’s instructions.

Everything I did here I did on an Ubuntu machine running 16.04 LTS. I’m sure you can do all of this Mac box without any changes, but on Windows you’ll need Bash (Windows 10) or an equivalent installed to ssh and perform the backup. If you follow along and if everything goes well I would expect this to take about one full evening.

Note: This post is basically my implementation of the details laid out on retroresolution.com. Be sure to read the original author’s post for all the nitty-gritty details.

Warning

This worked for me but please be careful when following the instructions and be sure to backup all your SD Card before proceeding. Proceed at your own risk.

Backup

Before starting anything we should backup the Rsapberry Pi’s SD card so that we can get RetroPie running again if we break anything. To do this I plugged my retro pie into my USB to SD Card reader and then plugged it into my computer.

The USB was mounted to ‘/media/selsine/’ as two partitions: ‘/media/selsine/boot’ and ‘/media/selsine/retroppie’. But I didn’t want to backup each partition separately I wanted to backup the entire SD Card. To do that I needed to figure out which disk in ‘/dev/’ was the SD Card. To figure that out I used the following command:

$ mount | grep "/media/selsine"

screenshot-from-2016-10-13-21-42-38

The output showed me that the two partitions from the SD Card were under ‘/dev’ as ‘/dev/sdb1’ and ‘/dev/sdb2’ that meant that I needed to backup ‘/dev/sdb’.

I did so using the following command which created a compressed image of the disk in a folder named ‘backup’ in my home directory:

$ sudo dd if=/dev/sdb | gzip > ~/backup/retro_pie_backup.gz

screenshot-from-2016-10-13-22-50-55

It took about 15 minutes for the backup to complete so go do something interesting while that happens. After that I popped the SD card back into the Raspberry Pi and starting working.

Note: Use the following command to restore if something foes wrong:

$ gzip -dc ~/backup/retro_pie_backup.gz | dd of=/dev/sdb

ssh

Much of what we need to do we will do by ssh’ing into the Raspberry pPi. To do this you will need the IP address of your RetroPi on the local network. You can get this by going to the RetroPi setup within RetroPie and then selecting “Show IP Address” from the menu. Once you have your IP address you are good to go.

Then you can SSH into the RetroPi using the following command (where 192.168.3.103 is your retro pie’s IP address:

$ ssh pi@192.168.3.103

NOTE: The default login to a RetroPie is: User=pi Password=raspberry

screenshot-from-2016-10-14-18-36-01

Update

Before going any further I recommend that you update your RetroPie to the latest version of RetroPie. The makes sure that you don’t run into any issues where you’ve updated one part of RetorPie but not another. To update your RetroPie ssh in and run the following command:

sudo ~/RetroPie-Setup/retropie_setup.sh

This will bring up the RetroPie setup screen:

screenshot-from-2016-10-14-21-11-30

From there select ‘Update RetroPie-Setup script’ to update the setup script.

After that we will update all installed packages via the ‘Update all installed packaged’ menu item. Once all of that is done we are ready to proceed.

screenshot-from-2016-10-14-22-26-15

Note: My splash screen stopped loading after this, so in order to fix that select “Configuration / tools” from the menu:

screenshot-from-2016-10-14-23-08-38

Then ‘splashscreen – Configure splashscreen’

screenshot-from-2016-10-14-23-09-35

The select “Choose Splashscreens” | “RetroPie Splashscreens” | “retropie-default.png”.

You can also update your splashscreen from within the RetroPie settings inside of EmulationStation.

Install FFmpeg

As per the RetroResolution instructions the next step is to compile FFmpeg on the RetroPie. This is a relatively simple step since Retro Resolution has provided us with the complete script that we need to compile FFmpeg and it’s related codecs.

I recommend you read his article as it will walk you though all the why’s that I’m about to skip.

The first thing that we need to do is SSH into the RetroPie if you have not already (based on the above instructions). Now that we have logged in we need to create and execute a shell script that will install FFmpeg for us.

First we will create a “tools” directory in the “pi” user’s home directory and then create a script file within that directory:

$ mkdir /home/pi/tools
$ nano /home/pi/tools/ffmpeg-install.sh

The nano command: ‘$ nano /home/pi/tools/ffmpeg-install.sh’ will start the nano text editor and create the shell-script file “ffmpeg-install.sh” in the tools directory.

Then we need to copy the shell script from retro resolution into our nano editor.

screenshot-from-2016-10-14-18-56-43

Once you have pasted the script hit CTRL+O to save the file and CTRL+X to exit nano.

We are almost done with our script, we just need to make the script executable so that we can run it:

$ chmod +x /home/pi/tools/ffmpeg-install.sh

screenshot-from-2016-10-14-19-15-12

Now that we have our script, and it’s executable, we need to launch it as root:

$ sudo /home/pi/tools/ffmpeg-install.sh

screenshot-from-2016-10-14-19-17-25

Then we wait for a long time. I suggest having a beer while this compiles.

screenshot-from-2016-10-14-19-41-48

Fast-forward 1.5 hours on a Raspberry Pi 2 and the compilation and installation of FFmpeg is complete:

screenshot-from-2016-10-14-20-53-00

Re-Build RetroArch

Now that we have FFmpeg on our Raspberry Pie we need to rebuild RetroArch to take advantage of FFmpeg. We’re going to create a script to enabled the FFmpeg headers in RetroArch and then rebuild RetroArch in a very similar way to what we did above with FFmpeg.

First we’ll create a build-retroarch-with-ffmpeg.sh script to do the work for us:

$ nano /home/pi/tools/build-retroarch-with-ffmpeg.sh

Then we will paste in the following script:

#!/bin/bash

cd ~/RetroPie-Setup/
# remove the config that disables ffmpeg on the RPI
sed -i "s/--disable-ffmpeg//" scriptmodules/emulators/retroarch.sh
# build new retroarch from source
sudo ./retropie_packages.sh retroarch
# put the file back how it was
git checkout scriptmodules/emulators/retroarch.sh

screenshot-from-2016-10-14-22-58-44

Then save (CTRL+O) and exit (CTRL+X).

Next we need to make the script executable:

$ chmod +x /home/pi/tools/build-retroarch-with-ffmpeg.sh

And finally execute it, but NOT as root:

$ /home/pi/tools/build-retroarch-with-ffmpeg.sh

It should finish after about 10 minutes.

screenshot-from-2016-10-14-21-42-08

We now need to see if it worked by restarting the raspberry pie and then starting a game. Once the game has started hit select+X on your controller to bring up the RetroArch menu. For me the RetroArch menu was now lacking icons, but you need to select ‘Driver’ from the menu and then look at the ‘recording’ entry and verify that it says ‘ffmpeg’ instead of ‘null’

Mount a USB Drive for Recording

We are going to save our videos onto a USB drive connected to the Raspberry Pie. RetroResolution says that this is a better, more efficient, way to record the videos. If you want you can record to the SD card and skip this step.

If we are going to save the videos on a USB drive we need to plug a USB drive into the Raspberry Pie and get the OS to mount it automatically at boot time. So plug the USB drive in, ssh into the Raspberry Pie, and then list all of the drives using the following command:

$ ls -l /dev/disk/by-uuid/

screenshot-from-2016-10-14-23-48-37

From my output I know that SDA1 is the drive that I want. So what I want to do is add the following line to my FSTAB file, using the UUID of the drive from the output to automatically mount my USB drive:

UUID=1BE2-9CBE /media/usb_video vfat nofail,user,umask=0000 0 2

Note: The above command is for a USB device that is using the FAT file system. If your USB drive is NTFS, HFS+, EXT3, or any other file system you will have to use a different command. This article on ubuntu.com should help.

We will edit the fstab file as root using the following command:

$ sudo nano /etc/fstab

screenshot-from-2016-10-14-23-55-30

Then make our mount directory as root;

$ sudo mkdir /media/usb_video

We can test to make sure that our drive can be mounted using the following command, which we execute not as root, to be sure that the default pi user can mount the drive:

$ mount /media/usb_video/

If we don’t see an error the drive will be mounted on boot going forward.

Enable the Recording

Now we have everything in place to start recording our games. The first step is to create a recording config file. This config file will tell FFmpeg which options we want during the recording.

Created the config file with the following command:

$ mkdir /home/pi/RetroPie/recording
$ nano /home/pi/RetroPie/recording/config.cfg

Paste the following into the config file (which come from RetroResolution)to start, you can play with the settings once your recording is working:

format = matroska
threads = 3
vcodec = libx264rgb
video_preset = ultrafast
video_tune = animation
pix_fmt = bgr24
video_qp = 0
acodec = flac

screenshot-from-2016-10-15-00-31-14

Now we need to tell RetroArch to record when we play the games from certain systems. To do so we need to edit the ’emulators.cfg’ file for each system. To start I’ll show you how to edit the NES config file.

Each system’s config file exists in the following path, where <> is the gaming system:

/opt/retropie/configs/<>/emulators.cfg

So for the original Nintendo we need to edit the following config file:

/opt/retropie/configs/nes/emulators.cfg

What we are going to do is add two entries that will launch an emulator and start a recording. Here is the command to edit the NES config file in nano:

$ nano /opt/retropie/configs/nes/emulators.cfg

We will add the following two config entries that will start a recording. The first will use the config file that we created above, and the second will record with the default FFmpeg settings:

With Config:
lr-fceumm-record-hdd = "/opt/retropie/emulators/retroarch/bin/retroarch -L /opt/retropie/libretrocores/lr-fceumm/fceumm_libretro.so --config /opt/retropie/configs/nes/retroarch.cfg --record /media/usb_video/recording_NES_$(date +%Y-%m-%d-%H%M%S).mkv --recordconfig /home/pi/RetroPie/recording/config.cfg %ROM%"

Without Config
lr-fceumm-record-hdd-no-config = "/opt/retropie/emulators/retroarch/bin/retroarch -L /opt/retropie/libretrocores/lr-fceumm/fceumm_libretro.so --config /opt/retropie/configs/nes/retroarch.cfg --record /media/usb_video/recording_NES_$(date +%Y-%m-%d-%H%M%S).mkv %ROM%"

The magic happens in this part of the command:

--record /media/usb_video/recording_NES_$(date +%Y-%m-%d-%H%M%S).mkv

Where we tell RetroArch to record a video and create a recording file on the USB drive that we mounted earlier. We use a timestamp in the file name: ‘$(date +%Y-%m-%d-%H%M%S)’ (which comes from a suggestion on the RetroPie forums) so that we don’t override any previous recordings.

This part of the first command tells FFmpeg to use our config file to configure itself:

--recordconfig /home/pi/RetroPie/recording/config.cfg

Now launch an NES game and press ‘A’ while the game is loading. Then select ‘Select emulator for ROM’ (to make it ROM specific) or ‘Select default emulator for nes’ for all NES games, and pick one of the above options that we added. I suggest ‘lr-fceumm-record-hdd’. Play the game for a few seconds and then quit.

Now check the USB for the files:

$ ls /media/usb_video/

If all has gone well you should see one recordings from the game that you just played (I tested a few times so I have more that one recording):

screenshot-from-2016-10-15-13-18-42

That’s It

That’s it. If everything has gone well you should have an updated RetroPie that can now create gameplay videos. If you have any questions or run into any issues please leave a comment.

Be sure to checkout RetroResolution.com without whom getting this done would have taken a lot longer than it did.

Happy gaming.

Mega Man

For some reason I’ve been playing a lot of retro video games lately instead of writing about, or podcasting about, technology. I still think about technology a lot, and work in the industry during the day, but I just haven’t found the time to work on it in the evenings .

One of my favourite games to revisit has been the original Mega Man series. Anyone that played on the original NES will remember Mega Man, probably Mega Man 2.

Just today I beat the original Mega Man for the first time. In lieu of a lengthy post extolling the virtues of Mega Man, here are some screen shots from my victory. I’m going to be working on setting up a live stream of my game play once I get some time.

retroarch-1006-033530

retroarch-1006-042512

retroarch-1008-043329

retroarch-1008-051541

retroarch-1008-051502

retroarch-1008-051512

retroarch-1008-051731

retroarch-1008-051732

retroarch-1008-051804

retroarch-1008-051822

retroarch-1008-051842

retroarch-1008-051902

retroarch-1008-051935

The OS is dead long live the Platform

What follows was supposed to be a short write-up on my post Microsoft Build thoughts, but instead my thoughts got away from me. I still want to talk about Microsoft build and Facebook’s F8 conferences but that will have to happen in another post.

Instead of being a post-Build blog post, this post is about a trend I see happening in modern computing: the death of the operating system and the rise of a new platform layer. In order to explain that statement I’m going to try to explain what I think happened in the past and how it leads us to today. What I hope to show is the decline in power of the Operating System (OS) over time where I think we are headed.

Since this post started with a different focus and evolved into a totally different discussion the arguments contained are a tad short, but bear with me and I will try to expand on this further in the future. Or leave a comment taking me to task and I will try to answer you.

Pre-Historic

This is the mainframe, mini, and hobby PC era. I am going to leave this aside and focus on modern computing instead. I’ll start somewhere in the mid eighties when the personal computer began to assert it’s dominance within the enterprise and eventually at home:

The Desktop Operating System Era

era1

This is the era where the winner was Microsoft. During this time operating systems were very important, you would pay hundreds of dollars for them 1 and each new release was surrounded by unbelievable fanfare.2 The era of the desktop operating system was dominated by large expensive desktop apps (we used to call them applications or programs) that were very tightly integrated with the operating system they ran on.

The Internet Era

era2

After the desktop era came the rise of the internet. This was the heyday of the “world wide web”, when the western world came online and companies like Yahoo, AltaVista, GeoCities, Netscape, and Google came to dominate the computing landscape3.

One of the things that was significant about the internet era was that dominated by a layer that sat on top of all operating systems equally. This meant that you could be on a Mac, a PC, or a Linux box 4 and the layer that was the “web” remained largely the same, e.g. outside the control of the operating system and the company that dominated it. It also meant that aside from the web browser being used, users were spending less and less time in desktop apps.

During the rise of the internet the operating system lost it’s position of dominance, to the point where, for most consumers, using the computer meant starting up a browser and visiting Facebook, Gmail, or some other website. This era began the decline of the consumer desktop app and the rise of the free-to-use website.5 Notice that the “software” (e.g. websites) that most people used online were free, or free and ad supported in contrast with the expensive applications in the previous era.

The Mobile Era

era3

Next came the mobile era where we moved from desktop computers and the web browsers that ran on top of them, to smartphone operating systems and the apps they ran. This is the era where the entire world came online. In this era the internet moved from being the front end user experience layer to becoming the back-end that powered the smartphone apps that dominated computing. These apps, like the desktop apps of the past, were tightly bound to the mobile operating systems they were designed for. 6

In this era operating systems went from costing a lot of money to being free. Mobile operating systems never seemed to cost anything, unless you include them in the cost of the phone purchase and, even if you do, the updates were free and no one thought that the sales of mobile operating systems would be directly profitable.

On the desktop Apple was releasing new versions of OS X for $25 and then finally, with the release of Mavericks, OS X was free. On the Windows side Microsoft continued to charge for upgrades and new versions of Windows up until Windows 10, where they made the consumer upgrade to Windows 10 free for the first year. The days when sales of your operating system to consumers are a direct profit center are done. Linux, the other major desktop operating system, continued being free during this period.

The start of the mobile era renewed the importance of the operating system as iOS and Android competed for apps and features. After almost nine years of this both operating systems reached basic feature and app parity, a level of maturity where the importance of the operating system again (as seen earlier on the desktop) begins to decline.

The BOT Era or The Rise of The Mobile Platforms

era4

Now we appear to be on the verge or entering a new era. We are a few years away from virtual reality and augmented reality reaching their true potential, but something else appears to be happening. I think that a new platform is emerging on top of the most popular apps that sit on top of the most popular mobile operating systems. This new platform seems to be doing what the “world wide web” did within browsers on top of operating systems twenty years ago.

What commentators on the Internet 7 are all talking about now are Bots. Bots are a layer of technology, or a platform, that will sit on top of the apps and operating systems that we use the most often. They will use natural language processing, deep learning, and the back-end connected cloud to be able to answer our questions, deliver us content, purchase products, and solve problems for us.

This is similar to the “world wide web” in that it is a platform that is sitting on top of another platform. In this case it won’t matter which messaging app, or digital assistant, you choose to use, you will be able to talk to the giphy, weather channel, FedEx, blood sugar, or whichever bots become the most popular.

To put it another way, you will be able to interact with this new “bot” layer in the same way whether you are in Facebook messenger, Skype, using Siri, Google Now, Cortana, or the Amazon Echo. The device, operating system, or app that sits at the bottom of the stack will no longer matter instead it will the be the platform that sits on the top that will rise in importance.

Finally

In conclusion I think that bots could be a very big deal, I think that the advances in natural language processing, artificial intelligence, and always-on mobile connections, have brought us to a point where a new interaction layer is possible.

The fact that SDKs are being developed and released means that small developers and companies will be able to populate this layer with bots that operate at a level of sophistication that was not possible at the largest organizations five years ago.

Letting this technology loose onto the billions of people uses the most popular apps and onto the developers eager to serve these new customers will lead to new interactions that we have not yet thought of. This is the bot as operating system and I for one am excited.

Pebble as smartwatch low-end disruptor

A thought crossed my mind as I saw the newly announced Huawei smartwatch, and the new LG smartwatch (LG announced two actually one that runs Android wear and one that does not, more on that in another post) and how they relate to the newly kick-started Pebble Time: what if the Pebble smartwatch is actually a low-end disruptor to the smart-watch category?

Disruptive innovation is a theory put forth by Clayton M. Christensen, low-end disruption being one part of the overall theory:

“Low-end disruption” occurs when the rate at which products improve exceeds the rate at which customers can adopt the new performance. Therefore, at some point the performance of the product overshoots the needs of certain customer segments. At this point, a disruptive technology may enter the market and provide a product which has lower performance than the incumbent but which exceeds the requirements of certain segments, thereby gaining a foothold in the market. – Via Wikipedia

Disruptivetechnology

Of course the Pebble was released before the other smartwatches; and we still have to see what the Apple Watch and whatever Samsung announces today at Mobile World Congress do; so it’s not exactly classic low-end disruption. Maybe instead of disruption other products within the category (none of which have sold very well yet) the Pebble is actually a low-end disruptor of the entire smartwatch category?

What if we think we want a Dick Tracy-style smartphone on our wrist, but what we really want is something that tells the time, shows some notifications on our wrist, and has a batter charge that lasts all week?

Up until now I have not been much of a fan of the Pebble, I thought it was too limited. I might just have to re-think what the smartwatch category is all about.

Microsoft: A Story of Relevance and Irrelevance

A Brief History of Microsoft

Microsoft has been a central figure in the computer revolution. However like IBM, HP, and Dell a place in computer history does not mean relevance today.

Microsoft_logo_(2012).svg

Founded in 1976, Microsoft rose to prominence on the back of a contract IBM awarded them to produce a version of the CP/M operating system for the first IBM PC. Not having a CP/M operating system Microsoft purchased a clone to fulfill the contract. This purchased clone would later become MS-DOS and lead Microsoft to operating system dominance. From Wikipedia:

On August 12, 1981, after negotiations with Digital Research failed, IBM awarded a contract to Microsoft to provide a version of the CP/M operating system, which was set to be used in the IBM PC. For this deal, Microsoft purchased a CP/M clone called 86-DOS from Tim Paterson of Seattle Computer Products for less than US$100,000, which IBM renamed to IBM PC DOS. Microsoft did not have an operating system when they closed the deal with IBM and IBM had not done their homework. Due to potential copyright infringement problems with CP/M, IBM marketed both CP/M and PC DOS for US$240 and US$40, respectively, with PC DOS eventually becoming the standard because of its lower price.

MS-DOS became the de facto operating system for IBM PCs and PC clones. At the time PCs were business tools largely being bought in the enterprise, who continued to purchase the majority of PCs during the nineteen eighties and nineties. A brief quote from the Benedict Evans article: Apple, open and learning from history:

In the 1990s, the PC market was mostly a corporate market (roughly 75% of volume). Corporate buyers wanted a commodity. They were buying 500 or 5000 boxes, they wanted them all the same and they wanted to be able to order 500 or 5000 more roughly the same next year.

When consumers did purchase computers for home use in significant numbers they largely purchased the computers that they had been using at work: PCs. Cheap commodity PCs that came with MS-DOS and later Windows.

This dominance in the enterprise served Microsoft very well. Their operating systems and other software offerings (most notably Office) became huge money makers for them, propelling Bill Gates (the founder and CEO of Microsoft) to the top of the “world’s richest” list.

Does it matter who buys Windows?

The thing about the enterprise, as Ben Thompson has pointed out on more than one occasion and most notably in What Clayton Christensen Got Wrong is that within the enterprise the purchaser of the product (the PC or the OS for the PC) isn’t the end user of the purchased product. The concerns of the CIO when purchasing for the company are quite different from the concerns of consumer purchasing a computer that they are going to use themselves. In other words, compare the reasons a company purchases a fleet of vehicles, with the reasons a person purchases their own car:

A CIO, for example, must justify a software purchase, and said justification usually comes down to balancing lists of features versus prices. Whatever solution scores best, wins.

This, Thompson argues, and I fundamentally agree with, is different from the way in which a consumer purchases a product. If it wasn’t I assume we’d see very few sports cars being sold. Yes consumers behave somewhat rationally and look at price and features, but we also care about the colour of the car and the way it looks, things that have little to no baring on the way it performs. CIOs don’t care what colour your PC is.

Microsoft was never as relevant for consumers as they were in the enterprise. Yes consumers used Microsoft’s operating system but not really out of choice, Windows was the default operating system that came with your family PC or the operating system that you ran at work not much more. Very few consumers made a conscious choice to choose Windows. And yes Microsoft Office became the dominant “office productivity suite” (for lack of a better term) but this was, again, an enterprise driven decision and not a result of consumer choice. Office is a good suite of software but not something that most people need to use at home unless it is for work, this includes students whose job (school) often requires Office.

The Post-PC Era

In the late 2000’s (2007 if you want a year) the computing landscape, and Microsoft’s position in said landscape, changed dramatically with the rise of the smartphone. I would argue that Microsoft didn’t so much miss mobile as many have argued (Windows Mobile, Windows CE, and Pocket PC all predate the iPhone) instead they failed to find success in mobile because it was consumers and not CIO’s that were purchasing the devices.

It wasn’t just who was purchasing smartphones it was how many smartphones were being purchased. Sales of smartphones surpassed sales of PCs in late 2011 and haven’t looked back. Consumers were, and are, purchasing smartphones (running iOS or Android) in numbers that dwarf the sales of PCs. For example in 2013 there were 317,648 PCs sold compared to 1,806,964 smartphones (source: Gartner) and virtually none of those smartphones were running Microsoft’s OS. This meant that Microsoft’s share, and I would argue relevance, declined rapidly. You can see this in the following graph from Benedict Evan’s aptly titled post: The Irrelevance of Microsoft, where you can see Micrsoft’s share of connected devices drop from a peak of 90% down to 20% in four years:

Via: Benedict Evans
Via: Benedict Evans

It wasn’t so much that sales of PCs slowed or declined (which they have) it was that sales of computing devices that were not PCs running Windows exploded:

Via:  Business Insider
Via: Business Insider

Note: An argument can be made that the rise in the Internet also hurt the relevance of Microsoft earlier than the mobile revolution. This argument is succinctly made by Benedict Evans in the above mentioned post: The Irrelevance of Microsoft. I think you cal look at the failure of Silverlight and many of Microsoft’s web technologies as evidence for this.

A Case for a Less Relevant Microsoft

In a nutshell this is what happened to Microsoft’s relevance:

  1. In the beginning the enterprise purchased the majority of the computing devices, and thus played a large role in shaping computing.
  2. Microsoft grew to operating system dominance on the backs of the enterprise who largely settled on purchasing PCs running Microsoft operating systems and software products.
  3. Consumers also purchased PCs that ran MS-DOS and Windows but largely due to the workplace and PC monopoly. E.G. Windows just came on the PC.
  4. Microsoft was relevant to the enterprise and not to consumers.
  5. Consumers began to purchase smartphones running iOS and Android in huge numbers and, like the enterprise earlier, began to shape the face of computing.
  6. The volume of smartphone sales meant that Microsoft’s share of total device sales went from 90% down to 20%.

In reality it was two things happening in tandem: the change in who was driving the majority of computing sales (moving from PCs to smartphones meant moving from enterprise to consumers) and the sheer volume of smartphones being sold resulted in a Microsoft that controlled a much smaller percentage of the computing landscape. The loss of control resulted in a loss of relevance. Now that consumer buying power controls what happens in computing, companies like Apple, Google, Facebook have overtaking Microsoft for relevance in the same way that Microsoft overtook IBM.

It is also worth noting that Microsoft is trying to reverse this trend through a variety of methods including decreasing the cost of Windows to OEMs for PCs, tablets, and smartphones (even giving it to them at zero cost in some cases); as well as releasing touch-first Office for iOS and Android before Windows. The latter being, as they said, is an attempt to go where the customers are. While many of these are smart moves that will help Microsoft (Azure looks to be a good business for them) it’s not clear that any of them will have any resonance with the consumer market.

It’s also possible for a company to make a very healthy profit by focusing only on the enterprise, and I’m not claiming that Microsoft is going away anytime soon. However one has to only look at the fortunes of IBM, HP, and Dell to see what a lack of relevance can do to a company. Remember this is the first time consumer buying power has directed computing, we are in uncharted waters here and it is not clear what it will do to enterprise focused companies.

Final Thoughts

Microsoft played a huge role in the computer revolution. They set out (according to the older mission statement) to “put a computer on every desk and in every home” and in the western world they largely succeeded. The downside to this was that they mistook that success for consumer acceptance as opposed to the result of the monopoly position their operating system had in the enterprise.

If you think about it, there is something interesting about that mission statement, it shows that Microsoft, even as it was dominating the enterprise, was looking to win over the hearts of consumers. And while they succeeded in putting a computer in every home, that computer now largely lies dormant while the family computes from the couch on their smartphones and tablets.

And More

There were a few things I wanted to touch on in this post but couldn’t fit in: what happened to IBM, how much more personal smartphones are when compared to PCs, what happens to enterprise PCs at night (nothing), etcetera; maybe in another post.

Also I hope to explore the topic of Microsoft’s relevance a little more in some upcoming posts but in a more personal manner. I was around writing software for Windows for much of the 2000’s so I felt this change in a visceral way as the tools I worked with and created seemed to get less and less important each day. I think it’s an interesting story.

Top Ten App Stores in China

Everyone knows that the Chinese smartphone market is big, it is in fact the largest smartphone market in the world accounting for 32.8% of the overall smartphone sales. If you are an independent Android developer you should be looking at the Chinese market as a source for additional downloads for your apps.

statistic_id220977_smartphones_-global-market-share-forecast-2011-2017-by-country

The Chinese Android app ecosystem differs from the Western app ecosystem in one very important way: Google Play does not dominate. In fact, there is no one dominant app store thanks to the Great Firewall of China blocking Google play. Instead of one app store what you have are literally hundreds of different app stores vying for consumers attentions.

As a developer you do not need to upload your app to every single app store, instead targeting the top ten or so stores will get you access to most Chinese Android handsets. If you are not fluent in Chinese getting into a Chinese App Store can be a little difficult. Over the next few weeks I want to look at how to sign-up for developer accounts at a few of the major Chinese app stores and how to release your apps into those app stores.

For now here is a list of the top ten app stores in China (well eleven) and links to their developer pages. The ranking data comes from NewZoo.com but I added AppChina in at the bottom along with TaoBao since Google Play really isn’t interesting for our purposes:

  1. 360 Mobile Assistant
  2. Tencent MyApp
  3. Biadu Mobile Assistant
  4. Xiaomi App Store
  5. Wandoujia
  6. HiMarket
  7. 91 Mobile Assistant
  8. Anzhi Market
  9. HiSpace – Huawei App Store
  10. AppChina.com
  11. Taobao Mobile Assistant

If you like graphs as much as I do here’s another smartphone sales graph you will find interesting:

Photo by: charlesarthur
Photo by: charlesarthur

Apple, Google, Facebook, Samsung, and Microsoft Earnings

So the last couple weeks had many of the big tech firms reporting their earnings. The biggest surprise was probably how well Apple did. In the words of many: “Apple had a monster quarter”. In fact they had the biggest quarterly profit in history a whopping $18 billion in net income.

Pretty impressive. Here is a little chart that I made up with the revenue from Apple, Microsoft, Google, Facebook, and Samsung:

Remember when Microsoft was dominating and people thought that there were a Monopoly?

2015 Tech Predictions Part 2

Here is part two of my 2015 tech predictions. If you have not already checkout part one.

Now on with part two, starting with:

The Oculus Rift will not revolutionize anything

Oculus_VR_Logo

I feel like I’m missing something when it comes to the new hype that surrounds Virtual Reality technology. A lot of smart people think that it we be revolutionary, but whenever I think of a VR headset I think of something that I don’t want to wear on my head.

Maybe I feel this way because I came of age during the first round of VR hype and saw how badly that failed because the basic technology really wasn’t there and because it became apparent that we didn’t want everything to be a “virtual” copy of the real world. (Unless we approach holodeck levels of VR I’m looking at you Star Trek and far away from you Lawnmower Man) Maybe we’ve solved the first hurdle, but until the tech is in Star Trek league I’m not sure that we will solve the second.

For those that want to say that you have to try it to believe it, I did try the Oculus Rift DK 1 was wasn’t that impressed.

Gaming? Sure. Training? Maybe. Revolution? Nope.

Big Bold Prediction: Facebook’s $4 Billion purchase of Oculus will start to look like a mistake by the end of the year when the Oculus Rift fails to deliver on the hype.

s2e3-geordi-data-holodeck

The Chinese app market(s) will grow in importance

Flag_of_the_People's_Republic_of_China.svg

The Chinese smartphone market is the largest smartphone market in the world, which means that the Chinese app market is equally massive and in 2015 app developers in the west will really take notice. We will see more developers (including independents) treat the Chinese market as being equal to, or almost equal to Google Play in terms of targeting importance.

We will start seeing more developers targeting one or more of the many Chinese app stores with their apps, and when they do they will also start integrating Biadu, Weibo, and other Chinese API’s into their apps destined for China in the same way that they currently integrate Google, Apple, or Twitter services now for the western market.

Note: The Chinese market, mostly from it’s many ASOP Android devices (versions of the Android OS that lack Google Services including Google Play) and the blocking by the Chinese government of many western software platforms/services (most of Google’s including an outright blocking of Google Play this year) means that the Chinese market is much different than the western market.

Big Bold Prediction: A Services ecosystem will arise to help western developers release their apps in China.

Microsoft will fail to capture the consumer imagination (again)

Microsoft_logo_(2012).svg

I feel a bit mixed about this prediction, I mean I think it’s right, but I also think that with it being Stacha Nadella’s first full year as a CEO we might see some really interesting things coming out of Microsoft in 2015. One the other hand, Microsoft has never been very good at capturing the consumer’s imagination, so the prediction stands.

Microsoft will release Windows 10 in 2015 and we might see a big uptake from the Enterprise world which, by and large, skipped the much maligned Windows 8 release and stuck with Windows 7. (The Windows 8 press was so bad Microsoft skipped version 9 just to distance themselves from it.) But I don’t see everyday consumers caring any more. I don’t think they ever really cared about Windows to be honest, it just happened came on the PC that they bought, or it was the same as what they used at work.

Nowadays most people browse Facebook on the couch with their smartphone (while watching TV) leaving their PC to gather dust in the basement, which means that Windows 10 won’t interest them that much.

We might be do for a home computer upgrade cycle, and the timing of the Windows 10 release might allow Microsoft to post some good consumer numbers (but I don’t really think so) but the magic for the general public is gone (and I would argue that it wasn’t really there in the first place).

In addition to all that Microsoft remains a distant third place in the mobile race. An also ran, not from lack of trying or innovation, and I don’t see them gaining any ground on smartphones any time soon. In fact my far out prediction was them dropping Windows Phone itself.

Big Bold Prediction: Microsoft will sell less copies of Windows 10 in the first three months of release then they did of Windows 8. It will be more popular with the press and get better reviews, but the “consumer desktop” ship has sailed and that means fewer sales for Microsoft.

Extra Note: If Microsoft does deliver a well reviewed version of Windows in Windows 10 it will go a long way to helping the brand with enthusiasts, which is important in the long run, even if it doesn’t boost short-term sales.

Bonus Round

Here are some off the wall predictions that I don’t really think will come true but I wouldn’t be totally surprised if they did:

Xiaomi’s app store will crack the west

800px-Xiaomi_logo.svg

Xiaomi’s Mi App Store will be the first Chinese app store to crack the western markets. They have a popular brand outside of China and Hugo Barra’s past credentials will go a long way to assuring potential users that Xiaomi’s app store is safe.

Google Glass will be taken off the market

Google_Glass_logo.svg

Given the public criticism and the decline in developer and consumer support Google glass will quietly drop off of Google Play and fade in history. (Perhaps as a product ahead of it’s time?)

End of Part two

That’s it for part two, I’m not sure if there will be a part three or not. If I do find the time I’d like to cover the Internet of Things and hardware a little bit, which I think will be a big deal in 2015. We are also planning on covering 2015 predictions on The Incoherent Podcast so stay tuned for episode five, where I will probably go over these predictions and maybe go a little bit deeper.