NSFW: Let’s talk about 2009

This motion picture article is protected under the copyright laws of the United States and other countries throughout the world. Country of first publication: United States of America. Any unauthorized exhibition, distribution, or copying of this film article or any part thereof (including soundtrack?) may result in civil liability and criminal prosecution. The story, all names, characters, and incidents portrayed in this production are fictitious. No identification with actual persons (living or deceased), places, buildings, and products is intended or should be inferred.

2009, to some people, seem like long ago. I remember it vividly. It was the nadir of the financial crisis (the great recession) and the central banks were in panic mode. Their attempts to calm the waters with lies, omissions and cover-ups had failed. Jim Cramer had had a meltdown on live TV and Jon Stewart later took him through hell, in what was a rare glimpse of honest journalism on mainstream TV. Incidentally, the show was taped down the street from where I used to live.

Today the market are at an all time high, and to most of the bankers, the year 2009 probably seems like a distant, vague memory. Not something to consider anymore. We’ve moved on etc. Other people have other reasons to distance themselves from that anno horribilis.

I don’t remember the exact date, but I was a little hung over and I had stumbled into some sort of marketing-integration-pep talk-show. At first I thought I was at a church, as I saw a man with a squeaky voice perform a very strange sermon. As the fog of yesterdays gin/tonics lifted, and I could see more clearly, I discovered that the man on stage was just getting started. What followed next, made me question my sanity.

As the man rambled on about how “we can squeeze out cost and squeeze out Verint”, he seemed to drive himself into a state of trance; as the man heard his own voice, it triggered a sort of feedback loop, that in turn caused the mouth to make even more outrageous statements. Tourrettes causes involuntary expressions of vulgarity and noises, but this was not Tourrettes. The steady flow of depravity and vulgarities was entirely voluntary and the man seemed anxious to drive himself into ever higher states of madness.

In my recollection (admittedly rather faint due to over-consumption of stimulants), I stumbled back to my hotel room, Thinking that I had just witnessed a male version of “heavy splash” in Japanese. I showered for 45 minutes. I submerged myself in scalding hot water, but I still felt dirty. I assumed that the man had received the king’s ransom in order to put on that kind of show.

While the memories from that fateful day had started to fade, they were always present in the back of my mind. I had to remind myself that we had just gone through a financial crisis that had driven people to desperation. Many years of over consumption, and debt fueled spending had come back to roost. As the tide went out, some people, it turned out, were naked.

When I recently sat outside my local watering hole, sipping a cup of detoxicating green tea, and nibbling on some gluten-free, fully organic biscuits from a farm just a few miles from Copenhagen, I ran into the same man.

It was a shocking sight. The man had gathered a following that were carrying him around town. He was wearing thick makeup, heavy rouge and pink lipstick. His disciples placed a wooden crate on the ground, and placed the man atop. He locked eyes with me, and there was a long awkward pause.

He prodded one of his lackeys with a stick, and whispered something inaudible in his ears. The lackey then cleared his throat, and proceeded to address me.

“We are not happy with how you portray things” he said. He then pulled out a scroll, and handed it to me. It was hardly legible, it had either been written by a 5 year old child, or a very old man. It stated that they were going to tell their herd about me and my evil deeds.

I was confused. In front of me stood, what would appear to be an adult male, wearing clown makeup, surrounded by a group of escapees from an asylum, announcing that he would “tell on me”.

This was the same man I had seen perform unspeakable acts of depravity just a few years ago.

I asked if his flock knew about his past, thinking that the desire bow down to their high priest would be somewhat diminished. But I also suspected that most people in the flock had never heard of the internet or google, so I genuinely wasn’t sure.

To my surprise, the clown decided to speak. He cleared his throat. His eyes rolled to the skies, and when I once again heard that squeaky voice again it all came back to me. It’s still surprising so vividly you remember things, under the right circumstances. Like hearing a long forgotten pop-song from the 80’s and remembering every detail from that summer in Spain.

But this was no summer in Spain, and the man announced that he was fed up with me bringing up his performance many years ago. He straightened and lifted his arms, palms facing the sky and proclaimed “I received no payment, I did it all for free”. There was a pause. Everyone waiting, breath baited, and then, with a deep voice (well, not that deep) he ceremonially announced: “I am clean”.

As he said those words, my biscuit fell to the ground and broke into 1 large and 4 smaller pieces and some crumbs. My jaw dropped. He had done it all for free!?! It was hard to fathom. My mind started racing. This was unexpected. Why on earth would you do what I had witnessed a few years ago, for free?!!! This was not a man who did anything for free, unless there was something to be gained later.

I later realized that the guy published some sort of periodical that people had to pay to read. It mostly contained self praise, and descriptions of what happens when completely inept people attempt to use high tech equipment. I suppose it could be thought of as a mildly entertaining break from the daily humdrum at the office and you can always call it “working”, because it is kinda, sorta, related to what you do.

I suspect that direct payment, would probably be considered prostitution and therefore illegal. Instead, as payment for his performance on that fateful day, the host of the show would instead purchase a lot of “licenses” to read the “news”.

And that, ladies and gentlemen, how you stay “clean”.

 

Advertisements

I Am Myself

Well, well, well…

This weekend I posted a piece on IPVMs crusade against Hikvision which seemed to suggest a lack of technical comprehension and perhaps – general assholery.

1 minute after posting, I receive a visit from Ghana. I have also had visitors from Mali and other nations in Africa that seemingly have a keen interest in what I have to say. Another option is that someone thinks they need to use Tor (or some other anonymizing browser) to read my blog.

This morning, I woke up to an email, asking me to ensure that the folks from some obscure blog understands that this blog is in no way, shape or form affiliated with OnSSI. A strange coincidence that writing about a sensationalist blog fucking things up, triggers a request for clarification about the independence of this one.

So let me make that absolutely clear, so that even sensationalist bloggers running fake universities, and his “associates” can understand it.

This blog, has nothing to do with OnSSI.

While I have written specifically about the mobile app OnSSI released a while ago, other people in the software development industry (not IP video), have the exact same experience. Next generation apps face an uphill battle as loyal users of the old app discover that things may have changed, and they are much more likely to post a very negative “review”, than people who will eventually benefit from the improvements. Since posts that are anchored in real experiences are dangerous to my livelihood (the blogger is using them as a vector to try and shut me down), I will remove that type of content from the blog (but I am confident that the Ghanaian visitor made a copy before reaching out to protect the innocent, so just ask him for a copy).

So, just to be clear, what you read in these posts, is the opinions and thoughts of the person Morten Tor Nielsen. I submit ideas and thoughts that are founded in a general understanding of the world as I see it.

I suppose that if you are consumed with deranged ideas about infiltration of corner shops and jiffy-lubes by the Chinese government, and your every living hour is spent on thinking about how to attract more subscribers to your rumour-mill, then this might be hard to fathom, but I work on a wide range of things (including overhauling my old Suzuki Bandit 600), and so among the exposure of incompetent asshats (from my humble computer here in Copenhagen), jot about a lot of things.

If you follow my blog, you’ll know that I have been working on micro-PC‘s, I have set up Axis cameras to provide health state information, I have done a lot of GPU work (yes, for OnSSI) and many other things. I have called out BS here, and here, and here  and many other places. I have mused over how companies can improve and what danger signs to look for. I have critiqued buzz-word-driven development (as a response to VR goggles being passed out at a convention). The list goes on…

You have to be senile, demented or sociopathic to think that this blog would somehow reflect the “thoughts” of a company. So if you suffer from any of the 3, and that’s the reason you contact OnSSI rather than writing a comment refuting claims, then you’re excused.

If not, you’re just a sad, over-extended sphincter.

But I think you (and everyone else) know that already.

Why Products Go Bad

The simpleton will equate commercial success with quality.

I don’t.

A product can be well made, even if it is not commercially successful and vice versa. The Microsoft Zune HD, for example, was a great product. Hell, Microsoft’s Phone OS is/was good too. In contrast, Kinect is/was a terrible product. It promised the world, and it was shit. Johnny Lee proved that Nintendo’s controllers were fucking awesome, and Microsoft wanted some of that goodness. Most people at Microsoft knew how piss poor Kinect was, most devs knew too, but  management did not want to be upstaged by Nintendo, so they released this fine piece of junk. Molyneux flat out lied about the capabilities of the thing (and he was not the only one I’m sure).

Sometimes, and perhaps too often, see products that have the potential to be “good”, and perhaps they are already good, but then, gradually as time passes and new generations of the product are released, it turns to utter crap. Why does this happen? You would expect the opposite to be true. You’d expect that the next generation of a product improved on the old.

My own experience is that I am generally considered “an overthinker”. Instead of just shutting up and doing what “the customer asks”, I think about the ramifications over the longer term. I try to interpret what the real problem is, and I spend a long time thinking about a good solution. I spend a lot of time talking about the problem with my peers, drawing on whiteboards. I think about the issues as I drive drove to the office, while I fly flew across the Atlantic. And sometimes, I change my mind. Sometimes, after long discussion, after “everyone agrees”, I see things in a new light and change my mind. And it pisses people off.

In the general population, I believe that there is a large percentage who just want to be told what to do, do what they are told and then at 5.15 pm drive home and watch TV, happy and content that they did what they were told all day. To the majority, “a good day” is doing as much of what you’re being told as possible, regardless of what the task is. They do not want to be interrupted by assholes that can’t offer them a promotion or a raise, who critique the “what” or the “how” – regardless of merit. The “customer” to them, is not the user of the product, the “customer” is their immediate supervisor. Make that guy happy, and you move upwards.

Telling people that unchecking “always” does not mean “never” makes people angry. They can understand the logic (not always = sometimes), but they are angry that you can’t understand that their career is jeopardized if they pointed that out when their supervisor told them to make that change. They will correct the problem if a supervisor tells them to – even if screams them in the face that this is useless to the end user. Doesn’t matter. The end user does not dish out promotions or raise their salary.

As these non-thinkers move up, they get to supervise people like me (JH: No, this has not happened at OnSSI). And that’s where it gets really bad. Now they are in a position where they are told what to do, and they are telling someone else to do that thing (nirvana), and then they learn that the asshole doesn’t want to listen and do what he is told, like “everyone else” does, so eventually the “overthinker” is replaced with a non-thinker, and this continues until all the thinkers are gone, and the company or branch then does exactly what the customer asks.

When you see features that flat out do not work and never did work, and there’s no motivation to fix that issue, then you have to pause, and consider if you have enough thinkers among the non-thinkers.

Because you need both.

You need lying sales and marketing people (that know just how far the truth can be stretched, or who can make a reality distortion field), you need asshole genius programmers who knows iOS, gstreamer, ffmpeg and Qt, you need vain and arrogant designers who can draw the best damn icons and keep everything consistent across the apps, you need dried up, mummified sysops to run IT.

But most of all, you need to make sure that these people think, and care about the end user, instead of just title on their business-card.

 

Listening to Customers

In 2011, BlackBerry peaked with a little more than 50 million devices sold. The trajectory had an impressive ~50% CAGR from 2007 where the sales were around 10 million devices. I am sure the board and chiefs were pleased and expected this trend to continue. One might expect that ~250 million devices were to be sold in 2016 if the CAGR could be sustained. Even linear growth would be fairly impressive.

Today, in 2017, BlackBerry commands a somewhat unimpressive 0.0% of the smartphone market.

There was also Nokia. The Finnish toilet-paper manufacturer pretty much shared the market with Ericsson in Scandinavia and was incredibly popular in many other regions. If I recall correctly, they sold more devices than any other manufacturer in the world. But they were the McDonalds of mobile phones: Cheap and simple (nothing wrong with that per se). They did have some premium phones, but perhaps they were just too expensive, too clumsy or maybe too nerdy?

ngage
Talking on a Nokia N-Gage phone

Nokia cleverly tricked Microsoft into buying their phone business, and soon after the Microsoft gave up on that too (having been a contender in the early years with Windows CE/Mobile).

I am confident that BlackBerry was “listening to their customers”. But perhaps they didn’t listen to the market. Every single customer at BlackBerry would state that they preferred the physical keyboard and the naive UI that BlackBerry offered. So why do things differently? Listen to your customers!

If BlackBerry was a consulting agency, then sure, do whatever the customer asks you to. If you’re selling hot-dogs, and the customer asks for more sauerkraut, then add more sauerkraut, even if it seems revolting to you. But BlackBerry is not selling hotdogs or tailoring each device to each customer. They are making a commodity that goes in a box and is pulled off a shelf by someone in a nice shirt.

As the marginally attached customers are exposed to better choices (for them), they will opt for those, and in time, as the user base dwindles, you’re left with “fans”. Fans love the way you do things, but unless your fan base is growing, you’re faced with the very challenging task of adding things your fans may not like. Employees that may be prostrate bowed but not believing, will leave and eventually you’ll have a group of flat-earth preachers evangelizing to their dwindling flock.

It might work as a small, cooky company that makes an outsider device, but it sure cannot sustain the amount of junk that you tag on over the years. Eventually that junk will drag the company under.

Or, perhaps BlackBerry was a popular hotdog stand, in a town where people just lost the appetite for hotdogs and had a craving for juicy burgers and pizza (or strange hotdogs)

LinkedIn is Worse Than Facebook

I suddenly realized I spent too much time on LinkedIn, and it dawned on me that LinkedIn is even worse than Facebook.

From time to time, people post virtue signalling memes that tell other people to not let LinkedIn turn into Facebook. The want to keep LinkedIn “professional”. That makes me wonder: If your primary interaction with business partners is through LinkedIn, are you really a professional?

The feed that LinkedIn thinks I should look has a few types of posts: Politically correct trivialities, annoying riddles, links to wise words written by someone else, and outright ads and appraisal of yourself or the company you work for.

The ads (not paid ads, but companies hawking something via LinkedIn) are tolerable from my standpoint. It’s pretty easy to filter those out, and move on to something with a little more substance. When I see someone saying “See why widget XYZ from SomeCompany is leading/helping/solving…. ” then you kinda know you don’t need to continue reading. If I see a post that starts with “visit us at …” I just move on. It’s not that I would recommend the company (I still work) for to not post these things, but I wonder who is genuinely impressed by this. It seems to me that this is a lot of choir preaching, with people – who most likely already know what you’re releasing – hitting “like” on a post that tells them nothing new.

I get pointers to good copy from Twitter, co-workers and friends, and from time to time there’s a good read on LinkedIn, but to find those, it feels like an online version of walking through a large bazar looking like a gullible tourist, red-faced from too much sun, complete with selfie stick and tasteless clothing. Every single vendor grabbing your arm, telling you about their wonderfully crafted pieces of shit. If you are willing to endure this torture, you might eventually find something worthwhile, but the chances are slim, and I am getting weary of wandering aimlessly around this crazy market.

Because LinkedIn is considered a “professional” network, i.e. a network between people who only want to engage with others if there’s money to be made. That means that the posts are even more self-censored and manipulative than on Facebook, Instagram, SnapChat or what have you. Every word is carefully chosen, you remember to “like” posts, not because of their content, but because of who wrote them. You might even make a positive comment, like a quick kiss on the old sphincter: “Well done”, someone will say, when a CEO praises his own ability to turn an advantage in currency exchange into revenue growth.

Maybe, just maybe, it’s the business that I am in that is fouling up my LinkedIn feed. In any event, the remedy is quite simple. I really shouldn’t go there..

 

 

 

Codecs and Client Applications

4K and H.265 is coming along nicely, but it is also part of the problems we as developers are facing these days. Users want low latency, fluid video, low bandwidth and high resolution, and they want these things on 3 types of platforms – traditional PC applications, apps for mobile devices and tablets, and a web interface. In this article, I’d like to provide some insights from a developer’s perspective.

Fluid or Low Latency

Fluid and low latency at the same time is highly problematic. To the HLS guys, 1 second is “low latency”, but to us, and the WebRTC hackers, we are looking for latencies in the sub 100 ms area. Video surveillance doesn’t always need super low latency – if a fixed camera has 2 seconds of latency, that is rarely a problem (in the real world). But as soon as any kind of interaction takes place (PTZ or 2-way audio) then you need low latency. Optical PTZ can “survive” low latency if you only support PTZ presets or simple movements, but tracking objects will be virtually impossible on a high-latency feed.

Why high latency?

A lot of the tech developed for video distribution is intended for recorded video, and not for low latency live video. The intent is to download a chunk of video, and while that plays, you download the next in the background, this happens over and over, but playing back does not commence until at least the entire first block has been read off the wire. The chunks are usually 5-10 seconds in duration, which is not a problem when you’re watching Bob’s Burgers on Netflix.

The lowest latency you can get is to simple draw the image when you receive it, but due to packetization and network latency, you’re not going to get the frames at a steady pace, which leads to stuttering which is NOT acceptable when Bob’s Burgers is being streamed.

How about WebRTC?

If you’ve ever used Google Hangouts,  then you’ve probably used WebRTC. It works great when you have a peer-to-peer connection with a good, low latency connection. The peer-to-peer part is important, because part of the design is that the recipient can tell the sender to adjust its quality on demand. This is rarely feasible on a traditional IP camera, but it could eventually be implemented. WebRTC is built into some web browsers, and it supports H.264 by default, but not H.265 (AFAIK) or any of the legacy formats.

Transcoding

Yes, and no. Transcoding comes at a rather steep price if you expect to use your system as if it ran w/o transcoding. The server has to decode every frame, and then re-encode it in the proper format. Some vendors transcodes to JPEG which makes it easier for the client to handle, but puts a tremendous amount of stress on the server. Not on the encoding side, but the decoding of all those streams is pretty costly.  To limit the impact on the transcoding server, you may have to alter the UI to reflect the limitation in server side resources.

Installed Applications

The trivial case is an installed application on a PC or a mobile device. Large install files are pretty annoying (and often unnecessary), but you can package all the application dependencies, and the developer can do pretty much anything they want. There’s usually a lot of disk-space available and fairly large amounts of RAM.

On a mobile device you struggle with OS fragmentation (in case of Android), but since you are writing an installed application, you are able to include all dependencies. The limitations are in computing power, storage, RAM and physical dimensions. The UI that works for a PC with a mouse is useless on a 5″ screen with a touch interface. The CPU/GPU’s are pretty powerful (for their size), but they are no-where near the processing power of a halfway decent PC. The UI has to take this into consideration as well.

“Pure” Web Clients

One issue that I have come across a few times, is that some people think the native app “uses a lot of resources”, while a web based client would somehow, magically, use fewer resources to do the same job. The native app uses 90.0% of the CPU resources to decode video, and it does so a LOT more efficient than a web client would ever be able to. So if you have a low end PC, the solution is not to demand a web client, but to lower the number of cameras on-screen.

Let me make it clear: any web client that relies on an ActiveX component to be downloaded and installed, might as well have been an installed application. ActiveX controls are compiled binaries that only run on the intended platform (IE, Windows, x86 or x64). They are usually implicitly (sometimes explicitly) left behind on the machine, and can be instantiated and used as an attack vector if you can trick a user to visit a malicious site (which is quite easy to accomplish).

The purpose of a web client is to allow someone to access the system from a random machine in the network, w/o having to install anything. An advantage is also that since there is no installer, there’s no need to constantly download and install upgrades every time you access your system. When you log in, you get the latest version of the “client”. Forget all about “better for low end” and “better performance”.

Technology

Java applets can be installed, but often setting up Java for a browser is a pain in the ass (security issues), and performance can be pretty bad.

Flash apps are problematic too, and suffer the same issues as Java applets. Flash has a decent H.264 decoder for .flv formatted streams, but no support for H.265 or legacy formats (unless you write them, from scratch.. and good luck with that 🙂 ) Furthermore, everyone with a web browser in their portfolio is trying to kill Flash due to it’s many problems.

NPAPI or other native plugin frameworks (NaCL, Pepper) did offer decent performance, but usually only worked on one or two browsers (Chrome or Firefox), and Chrome later removed support for NPAPI.

HTML5 offers the <video> tag, which can be used for “live” video. Just not low latency, and codec support is limited.

Javascript performance is now at a point (for the leading browsers) that you can write a full decoder for just about any format you can think of and get reasonable performance for 1 or 2 720p streams if you have a modern PC.

Conclusion

To get broad client side support (that truly works), you have to make compromises on the supported devices side. You cannot support every legacy codec and device and expect to get a decent client side experience on every platform.

As a general rule, I disregard arguments that “if it doesn’t work with X, then it is useless”. Too often, this argument gains traction, and to satisfy X, we sacrifice Y. I would rather support Y 100% if Y makes more sense. I’d rather serve 3 good dishes, than 10 bad ones. But in this industry, it seems that 6000 shitty dishes at an expensive “restaurant” is what people want. I don’t.

 

 

Ryzen

Youtubers are disappointed with Ryzen. They expected it to crush Intel in every single benchmark, and I had hoped that it would too. What was I thinking?

The problem that AMD has is that a lot of people seem think that you can get a baby faster if you just add more women.

I’ve been watching a lot of indie coders do a lot of single loop coding, which obviously will not scale across several cores. They are obsessed with avoiding L1/L2 cache misses, which is fine, but at the same time, they rarely talk about multi-threading. Some of the benchmarks I have seen leaves the CPU at 30% utilization across all cores, which means that there’s a lot of untapped potential.

Games with lots of autonomous and complex entities should scale quite well as – if the coder is not spending all his time on organizing his data in a way that makes little sense on a multi-core system, and is willing to shed the dogma that threads are bad.

I am not replacing my 3770K though. I was very tempted to get something that could substantially increase compilation times, but I spend <1% on compilations, so even a massive improvement in compilations would not really improve my productivity overall. And I am not thrilled on having to buy new RAM once again…