How to lessen fear of public vlogging

Public vlogging is like public speaking. Except it might be worse. At least with public speaking, you’re talking to people. With public vlogging, you’re talking to a camera. I’ll let you decide which is worse…

There was a time when talking into a mobile phone was weird because you don’t look like you’re talking to anyone. Now everyone and their grandmother is on a mobile phone. There might come a time when recording videos is commonplace, whether at home or in public.

Do we still have those guys with Bluetooth earpieces?

Compression through time

So the last time, I told you I came up with my own video format so I could load videos into my game engine. Today, I’m going to tell you what it is.

The concept isn’t revolutionary. Image compression is the art of expressing an image in as small a form as possible. There are 2 versions: lossy and lossless. Lossy compression means some data is lost, meaning the file size can be smaller, but overall you won’t notice the difference (much). The jpeg format uses this. Lossless compression doesn’t lose any data at all. The png format uses a lossless compression.

I don’t know much about video compression. However, a video is a series of images. So what I did was instead of focusing on image-by-image compression, I adopted time-based compression.

For each pixel position, I try to come up with an algorithm (or specifically a maths formula) that will represent all the pixels in that pixel position throughout the entire video.

Let’s say we use the top-left pixel of the video. And let’s say that pixel is pure white for half of the video, and black for the other half of the video. My aim is to represent this “pure white 1st half, pure black 2nd half” information in 1 formula.

With this in mind, let’s say I’ve got a maths formula somehow. Let’s say it’s a 640 by 480 pixel video (it was considered good resolution back then. I know we have HD now…). Let’s say there are 3 variables in that maths formula. This means, I have to store 3 * 640 * 480 variables in my movie format.

Yes, that’s the compression tactic.

Well, more specifically, I had to come up with 3 * 640 * 480 maths formulas that compresses itself as efficiently as possible. With some research, I found that the less the variables vary (hahahah…), the better the compression. This means the colour space I use is important. RGB values change too much.

And with some more research, I found the YUV colour space ideal for use. I think what I actually did was count the number of consecutive values and store that. The YUV space has a “lightness” component, which for most videos, doesn’t change very often.

This means in the ideal case, I store “N of X” for the “lightness” component, where N is the number of times the value X occurs for the “lightness” component of that pixel position. And in the ideal case, N would be approximately the frame rate multiplied by the number of seconds.

So for each pixel position, I store a series of counts of the Y component (could be 10, 50 or ideally just 1). Then I store a series of counts of the U component. And similarly for the V component.

Then I move on to the next pixel.

The idea is that the longer the video, the “better” the compression. It’s not that the compression tactic is better. It’s just that the tactic takes advantage of the fact that certain colour components don’t change much. If a pixel is always white, it doesn’t matter if the video is 1 second long or 1 hour long, we just store “30 white” and “3600 white” respectively (assuming 30 frames per second).

This works great for screencast videos because the screen typically doesn’t change much. It’s usually just the mouse moving around and clicking stuff and sometimes the screen changes. This means most of the screen stays the same. And if you’re like me, you’ve probably watched some screencast videos where nothing on the screen happens for minutes. It’s just the person talking.

Of course, I fudged the actual values a bit so they can compress better. Meaning it’s a lossy compression. But in the end, it was comparable to a moderately compressed QuickTime movie file, so I was ok with that.

But even if the compressed size is still larger than other movie file types, at least it’s not copyrighted. So I can use that. And if you want to try this compression method, go ahead and use it (you have my permission). Let me know how it works out for you.

Compression and space

Back when I was in my making games mode years ago, I was interested in space. Specifically data storage.

Blitting images to the screen as quickly as possible to keep the frame rate consistent was a thing. Texture images are pre-created. Then there’s the concept of generating textures as the program was executed. This was how demos pack data into a small space.

I was studying fractals then, the iterated function system was a thing. I found it a pain to implement though…

And then I was interested in having moving images in my game engine. Packing movies was way harder than images.

Due to the copyrights of all the video formats, in my infinite wisdom, I decided to create my own. I mean, it’s a series of images, right?

The resulting customised movie file was just slightly larger in size than the QuickTime .mov format. I took that as an encouragement. I’ll tell you what I did next time.

Difference between app business and app development

A few days ago, I went to a BlackBerry developer meetup session hosted by my friend. Being primarily a .NET developer, I thought I’d broaden my horizons and learn what the BlackBerry platform was about.

It was a little bit of a show-and-tell. It turns out that the next version of BlackBerry is going to be out soon, and the session was sort of a “getting developers to develop for the BlackBerry 10” thing.

I’m not really going to go into the details of the new BlackBerry nor its development platform. I am going to talk about apps, since it’s the in-thing currently. Here are the markets I know of:

  • Apple’s app market on the iPhone and iPad
  • Microsoft’s app market on Windows phones and the to-be-released Windows 8
  • Google and its Android phone app market
  • RIM (Research In Motion) and its BlackBerry app market

I’m using “app market” in the general sense. There are probably other app markets, but the ones listed should be in the top few in terms of audience size.

What I learnt at the session

I’m not a BlackBerry developer, so I mainly kept quiet and listened. However, as the presentations went on, and I asked questions, something hit me. I approached app development differently from the developers present, including the presenters.

Preemptive disclaimer: The developers are probably very good at their work. The following are my opinions after being self-employed for over a year and studying business and related materials for longer than that. I’m not putting those developers down.

Here we go. These developers were interested in the technical aspects of BlackBerry development, whether it be the hardware specs of the BlackBerry, or the tools used for BlackBerry development.

I asked my friend who’s a consultant for RIM about the BlackBerry, and he told me a bunch of specs on the new BlackBerry. Now I’m a programmer, but I don’t get real excited about stats.

Let me put it to you this way. Most consumers will have their eyes glazed over when you tell them some piece of hardware has X gigabytes of storage and so on. Apple, just said the iPod can hold 1000 songs.

Get the picture?

The developers were interested in what they could do on the new BlackBerry. I was interested in what consumers could do on the new BlackBerry. That difference is what makes you money. If you don’t like the idea of monetary gains, then think of the popularity of your app. Think of widespread acceptance and downloads of your apps.

File selection

One developer asked my friend (who’s presenting at that moment) to go to a particular website and click a button there. Nothing happened. I asked that developer what’s supposed to happen.

He said you’re supposed to have a pop-up to select files. The first thought I had was security. And even if file selection is allowed, and assuming the user knows what he’s doing, what kind of files were allowed and why would it even be useful?

Sure, you could select photos for upload, or business documents for transfer. But I believe the app should handle the file selection interface, which makes it seamless for the user.

Designing for the consumer

But that question is really the heart of what most (or all) of the developers there were concerned about. They want to know what’s the storage capacity, the screen size, what tools to use for development, how to debug your applications and so on.

These are all valid questions and concerns. And I understand that some people are really into the technical aspects.

So what kind of questions did I ask?

I asked if videos can be taken. How’s the quality of a video playback? How’s the quality of the audio? Is there a YouTube app?

On the train or buses, people plug in earphones and either watch videos or play games or text communicate (either messaging or Twitter or Facebook or whatnot) on their mobile devices. The technical aspects are useful. I just think coming up with an app that people would want to use is priority one. The app doesn’t have to be complicated. It just has to either be useful or entertaining.

So I basically asked questions that consumers are more concerned about. And the new BlackBerry from what I’m told, is targeting the consumer market. It makes sense that BlackBerry developers should also be concerned about similar topics.

There were questions on the price of licensing. It’s free to upload apps, but there’s a fee for certification. From some research I did, the revenue sharing scheme is the standard 30/70, with 70% of the revenue going to the developer.

Here’s the funny thing. No one asked about making money stuff. Not about how to do in-app purchases, or the kinds of prices used (although the developers are free to set their own price), or how to get paid. Maybe they already know, and I’m the only one in the dark (I’m not a BlackBerry developer).

I look at the apps from the perspective of both a business owner and a developer. Maybe that’s why I stopped fretting about technical difficulties. Because the instant a human user uses your software, you’ll find out the real and important difficulties.

Singapore Mini Maker Faire Part 1

I went to the mini Maker Faire at the Singapore Science Centre.

In the video, there’s a device that measures distances using ultrasonic waves, and based on that, turns a light on or off. It took me a while before I finally understood the concept. I thought it was directional, because she explained the device by pointing it up and down for light-on and light-off. Then I asked if it could be programmed to understand sideways directions…

Basically, if you block the emitting device (ultrasonic waves) within a certain distance, the light switches on. That’s why pointing to the ceiling switches it off, because the distance between the device and the ceiling exceeds the programmed distance limit.

Still like coding

I’ve been on both sides of the employment fence. I’ve been an employee at a startup, a software company and a telecommunications company. I’m currently working for myself. Of all the activities, I still like coding. Because it allows me to solve problems of a nature that’s programmatically solvable.

Customer service

I’ve worked with customer service officers. They are the front-line of the business, and they tell me how my software is working. Is the customer having problems with logging in? Or with downloading transactional records?

Now, I talk directly with customers. They tell me this part is good, or that part is funny. They ask me questions, and I answer them (whether it’s directly a programming problem or not).

Sales

I’ve talked with sales people, and they’re driven and friendly and outspoken. And they tell me what their clients and customers want, because the customers sometimes talk directly with the sales people instead of the customer service officers. Yay me for multiple channels of input.

Sales people want to know sales figures, monthly commission reports and revenue numbers. Well, specific to their own targets anyway.

Now, I keep track of my own revenue and sales. Let me tell you, it’s very sobering.

Marketing and Product

Frankly speaking, everything is integrated into the main sales channel. But marketing and product creation are related enough.

Imagine this. There are people hired to come up with new products for a company to sell (product managers). And people hired to convey the benefits of having said products to the consumers and customers (marketers). And people hired to sell these new products (sales people). And people hired to make sure customers are happy with their purchase (customer service).

Everything is linked.

The mish-mash

As a one-man show, I handle everything. I do market research to see if there’s actually a demand (although I might still create the product). I create the product. I write the sales copy on the sales web page. I upload the information products to the hosting server, and make sure the purchase links are working and correct. I’ve written ad copy (and it’s hard). I’ve written educational, marketing pieces of writing to promote my products. I set sales prices based on the value of what the customer will get (let me tell you, this is ridiculously hard and complicated). I talk with customers. I answer questions (sometimes free of charge). I handle taxes.

Out of all of them, I like the coding part the best. An ebook with a bunch of source code attached is basically a programming guide like one of those For Dummies programming books. I don’t mind writing the source code to teach people how to do something. I don’t even mind writing the ebook to explain some of the concepts, because it’s like a really long extended code comment.

But the other parts are hard. Possibly even distasteful.

However, I recognise the importance of those parts. Every single part is needed. And every part affects every other part.

You don’t know what benefits to convey in your sales copy if you don’t have it in your product. If the market doesn’t want a feature, that feature shouldn’t be in the product.

Of course, everything I’ve said presupposes that your product has a software component. But it really applies to the part that you’re good at and really like doing.

Maybe you’re really good at baking muffins, but you’re not really good at telling people why they should buy your muffins. Or you don’t like the tedium of keeping track of muffin sales. Or packaging your muffins so they really look good (you need to convince people that your product is good, even if it’s really good).