Playing with html5 video

screenshot of html5 video on

I've wanted to use video more on the website for a while, but I've just not got round to it.

Until this weekend.

It's really quite simple

Very, very simple:

  • take some video
  • convert it to the supported formats
  • upload it
  • add a track for closed captions
  • stick some html into the page code to string it all together

Take some video

My plan is for short — between 15 and 60 second — clips, dotted around the site.

Enough to get a snapshot of me, but not a complete replacement for what's on the site.

And, by "honest", I mean "not professionally produced". No fancy camera, no pro lighting, no high quality microphone — just the same setup I use for video conferencing. Initial tests suggests that this should be good enough for giving an honest impression of what it would be like to work with me.

Convert it to the supported formats

Wouldn't it be nice if all browsers supported the same video files?



PhotoBooth records in .mov, and, to cover most browsers, I need both .mp4 and .webm/.ogg.

ffmpeg was being a pain on my Ubuntu machine, and a quick search on the error messages which it yielded did not suggest a quick or simple answer.

So, since this is just an experiment, I found a simple freeware transcoder for macOS, and I'll do the converting before I upload the video files. It's not quite what I want, but it's not problematic enough for me to spend any more time on it right now.

Upload it

I don't have any analytics running on the website, so I've no idea how popular it is. But what I do have is access to graphing of the traffic volume too and from the site, and it's not significant. In part, that's because I try to keep the page sizes very low but, more realistically, it's because we don't get many visitors. And that's fine — we're not aiming to be the Internet's homepage.

So hosting it on our own servers should be fine.

I pondered hosting the video files on our Peertube instance, but decided against it, for the simple reasons that:

  • it would require a change to the content security policy for the site, which currently doesn't permit any external resources (okay, not a big deal)
  • I quite like having the site available in .onion space, and so I want to minimise calls out to non-.onion resources. And since I don't have a .onion version of PeerTube, keeping the files within itself makes sense.

So, for now at least, they're just on the web server.

Add a track for closed captions

I want our site to be accessible. Not just in the "reasonable adjustments" bare minimum sense, but in a genuine effort to avoid excluding people. So captions were a requirement.

Fortunately, this is very simple (especially for such short clips), thanks to the html5 track function, which one uses through .vtt files.

These are simple .vtt files, specifying what text to show for what time period.

I haven't attempted to style them — I'm not sure it's necessary — but the option's there.

Stick some html into the page code to string it all together

<video width="100%" poster="videos/welcome.jpg" controls preload="none">

<source src="videos/welcome_to_decodedlegal.m4v" type="video/mp4">

<source src="videos/welcome_to_decodedlegal.webm" type="video/webm">

<track label="Captions" kind="subtitles" srclang="en" src="videos/welcome_to_decodedlegal.vtt" default>


To pre-load or not to pre-load

I rather like the fact that our website page sizes are tiny in comparison to most law firm sites.

So I've got two options, assuming that pre-loading the whole video isn't sensible:

  • pre-load nothing
  • pre-load only the metadata

Pre-loading only the metadata adds about 500KB. Not massive, in the grand scheme of things, but still double the size of the page, just for video metadata. That gives you the clip's length in the video viewer and, as far as I can tell, not much else from a practical point of view.

Pre-loading nothing means that the video player shows that it's for a video, but doesn’t show the length of the video until you activate it. And that doesn't look great.

So I'm still pondering on this one.

Next steps

I'll probably add a few more clips over the next few days, and see what I think of the approach.

Or, better yet, try to get an impression of what others think of them.

At worst, I've wasted a few hours learning something new. At best, I've got something new and perhaps even useful for our site.

Useful books for advancing your business

My bookcase

Having written yesterday about a book I would not recommend, I thought I'd balance it by writing about books and training that I have found valuable in running

(I buy a mix of ebooks and hard copy books, but a screenshot of Calibre isn't as good!)

Links are to Amazon UK (other bookstores are available), and they are not affiliate links.

Here are some of my favourites:


Getting Things Done: The Art of Stress-free Productivity: probably one of those "Marmite" books, but the GTD principles really work for me, and help me manage my time and increase my productivity / efficiency. My key efficiency tip is that you don't need to read most of this book — the flowchart will tell you pretty much all you need to know to get started.

Presenting / speaking

The Presentation Secrets of Steve Jobs: How to Be Insanely Great in Front of Any Audience: hyperbolic title, but I learned a lot from this, and it's certainly influenced how I present.

Zen and the Art of Stand-Up Comedy: I'd like to think that my presentations are entertaining as well as informative, and the principles from this helped me develop that.

Confessions of a Public Speaker Paperback: useful in terms of planning, dealing with things going wrong, and generally about being a compelling speaker.

Negotiating (including price!) / deescalating / conflict resolution

Getting to Yes: Negotiating Agreement Without Giving: I still find some of the principles for negotiating in here useful, although I have tempered them with some of the suggestions from "Never Split The Difference".

Never Split the Difference: Negotiating as if Your Life Depended on It: a different approach to "Getting To Yes", with clear, practical guidance (and only a couple of hours to read it, if you skip over some of the numerous, lengthy, case studies) .

Crucial Conversations Tools for Talking When Stakes Are High: another book about talking, and getting people to open up, to assist in avoiding and resolving conflict.

Advocacy / influencing

The Devil's Advocate: useful for improving both written and oral advocacy and influencing, which accounts for a large amount of what I do for clients (even though we don't do litigation).


A Manual of Style for Contract Drafting: I'm halfway through Ken's live virtual "Masterclass" course, and I'm so delighted I've finally found the time to do it. The accompanying book is great, but forcing myself to look at how to improve the way I write agreements is even better.

Typography for Lawyers: Essential Tools for Polished & Persuasive Documents: yes, really. Typography for Lawyers. Lots of useful tips to make your documents look better, which makes them easier to understand/


True Worth: How To Charge What You're Worth And Get It: this is a short book, but it is worth a quick flick. I still struggle with pricing, and this helped me think about describing the true value to a prospective client of what they'd get from engaging me.

Book review: Rehumanize Your Business

Book cover of "Rehumazing your business"

tl;dr: I want a refund.

A friend recommended that I read "Rehumanize Your Business” — a book about using short video clips instead of relying so heavily on email.

Or, I should say, "friend".

I assume that they actually hate me.

I bought this book, for £13.51. (I'm not including a link, lest you should inadvertently click on it and buy the book.)

I could have bought 65 donuts for that price. Or three Raspberry Pi Picos.

But, no. I bought the book.

It is 224 pages and I read it in 10 minutes. If you skip the bits I considered to be fluff, and the bits which are marketing the author's own service, and the bits about maximising surveillance potential with click tracking (urgh), there are a few pages of what, in my opinion, amount to Actually Useful Content.

Honestly, this should have been a blogpost, not a book.

The gist of the book is:

  • use video clips of less than 60 seconds, especially with people you have not met yet, to build rapport
  • make each video personal to the recipient by using their name or common interest
  • use a catchy, short message in the email in which you link to the video, encouraging them to view it, and then reply to you
  • smile

That's basically it. So perhaps a tweet, rather than a blogpost.

Will I give it a try? Yes, probably. I'm not sure if it's for me, but I'm happy to try something new, and gauge the reaction.

Did I need to spend £13.51 on the book? Hell no.

goes to check Amazon's returns policy

Review: Xiaomi DZN4006GL Mi Pump Air Compressor

Xiaomi compressor inflating my Brompton's rear tyre

I was lucky enough to receive the Xiaomi DZN4006GL Mi Pump Air Compressor as a Christmas present.

And, since I now have a blog, I am going to review it.

Bet you're feeling glad you click on this.

But if you're happy to stick around, read on for a review of something which has exceeded my expectations so far.


A useful compact device, which exceeded my expectations, and is priced reasonably at £35ish. But a bit too heavy to be chucked into a saddle bag and forgotten about.

What it is

It's a small(ish), battery powered air compressor, designed for inflating tyres.

I think it's intended for use with an electric scooter (you know, the kind you can't ride lawfully almost anywhere other than your own garden).

It comes with a drag-string bag, and I'd have welcomed something in heavier-duty, wipe-clean fabric, rather than the quite nice black fabric they've used.

It also comes with a very short micro-USB charging cable, and adapters for different nozzles. I haven't tried them. There is a small pocket in the bag, which velcros shut, to hold these, which is a nice touch, but they don't fit in the pocket in the bag I received. Oh well.


It's great! I was hoping it would be good, given the numerous positive reviews, but I'm very impressed.

I went on an inflating spree, checking the pressures on everything I could find: two bikes, and two cars.

The cars were not too bad, as I had done those recently, but my bikes were way under. I was amazed, as I had pumped them both up with a foot pump not too long again.

Perhaps I was just not quick enough getting the pump connector off last time, but:

  • my Brompton tyres should be around 100 psi, and they were 25-ish
  • my Elephant bike types should be around 60 psi, and they 22-ish

I hadn't realised they were so far under!

Speed-wise, the numbers just speed up, which was pretty impressive.

The convenience of the unit will also mean I'm more likely to check the pressures more regularly, and inflate them to whatever is needed, so a definite win there.


It's a compact unit, and fits easily in my hand.

It's not heavy, but it's still a bit bigger and heavier than I could stick in my saddle bag and forget about.


The circular controls remind me of a classic iPod, although it doesn't have a scroll wheel.

It's easy to use, and — good news right now — can be used with gloves on.

It has a number of different categories — including bike, car, and motorbike — and those are basically presets / memory slots, as they store the last pressure you set for that particular slot. I'll probably use one for my Brompton, one for my Elephant Bike, and one for cars.

Setting the pressure you want is very easy, if you want to deviate from one of your presets.

The screen is bright, and clear.

Battery life

So far, so good.

I've nothing to measure it against, but it had no problem doing eight car tyres (increasing by about 3 bar per tyre), and four bike tyres (increasing each by a lot — between 40 and 70 psi).

I imagine that, if I was trying to inflate a tyre — particularly a car tyre — from flat, it would consume a lot more power.

It charges off a mini-USB connector, so it's pretty convenient (although I would have preferred USB-C).


Not too bad, and a bit quieter than the mains-powered compressor which came with one of our cars.

It's definitely not silent (which would be an unreasonable expectation), so no complaints there either.

Healthy eating, my new year's "resolution", and body image

CW/TW: body shape / image, diet

enter image description here

I'm currently on day 2 of my new year's "very healthy eating" resolution. After losing a lot of weight three years ago, I've been determined to keep it off and, on the whole, I've done pretty well.

I haven't done well enough though, and a few more kilograms than I would like have piled on.

Christmas definitely did not help with this, especially as I gave myself licence to have a few more treats this year than might normally be the case, but I've been more lax over lockdown that was probably a wise idea.

But, in short, something needs to be done, and now is as good as time as any to do it.

Healthy eating and lockdown

Except it's not, is it? Not really.

Even though I've worked from home for years, it just feels different at the moment. I mean, we're lucky. Incredibly lucky. We can get the food and other things we want, or close enough to it, delivered, and we have plenty of space to live without tripping up over each other, and a nice garden, and many other things for which I am, and should be, grateful. But even with all these things in my favour, it's not exactly a normal situation, and the extra stress of trying to lose weight, and finding the motivation to do so, is not helping.

I expect I will perserve, as part of the purpose of this one month (perhaps longer) of stricter eating is proving to myself that I can do it, but we'll have to do.

The blood sugar diet

My typical diet is aligned with the blood sugar diet, and I say "aligned" in the sense that it's my typical eating habit throughout the year, rather than a faddy "crash diet", after which I go back to unhealthy food.

I don’t follow the diet rigidly, as I don't think that 800 calories a day forever is healthy, but I stick to its principles, and I certainly consume a lot fewer calories than I did four years ago.

January, however, sees me following it more rigorously. Not perfectly — after all, the local kebab shop will not support itself in a pandemic, and I see it as my duty to ensure its survival, most usually on a Friday evening — but I'm not beating myself up about that, as knowing there's a treat meal at the end of the week helps me through the days when even drinking pint after pint of water doesn't stop me from feeling hungry.

I've done this approach of a month's strict adherence to the diet after a period of treats before, and it has worked well.

I also know that the first few days are the toughest, as my body weans itself off sugar. So far, I haven't had the headache which normally accompanies this, which is remarkable since I must have consumed my body weight in chocolate over Christmas.

What I'm aiming for

When I first followed this diet, I stuck to it pretty rigidly for months — a lot longer than the eight weeks proposed by the book. And, in that time, I lost just shy of 40 kgs. And I felt great for it.

Fortunately, I've got nothing like that amount to lose now, but I'd be happy to drop 10kg, and ectastic if it was 15kg, but either is going to take quite a bit longer than just January. End of February is a little more realistic, but may still be a stretch.

I'd probably accept "my jeans fit me comfortably again", but I'd like a bit more than that if I can.

So we'll see. I started at 88.4kg yesterday, so I'll just have to see how I get on.

But Neil, why don’t you just do more exercise?

Good question. Here are my answers:

  • I do, but, alone, that's not enough. My experience is that the best way to control my size / shape / weight is to be more careful about what I put in, rather than just trying to burn off the excess.
  • Exercise takes time, and time is something for which I struggle. Outdoor exercise also takes more motivation at the moment, as the times of day when I can typically do it are dark and cold.
  • I am trying to cycle more, but cycling seems to be a remarkably efficient way of moving, and so I'd probably burn more calories goes for a walk for the same period of time. But I'm a bit fed of walking around where I live, as I know the area inside out, and I'm not prepared to drive somewhere to go for a walk. So I'll probably cycle more, for the fun of it, exploring a bit further afield, but accept it's not optimum exercise (at least, not the way I do it).
  • I have a treadmill under my desk, and I'll use that more, plodding along as I work.

You're a "body shape positive" person; shouldn't you be happy with the way you look?

Probably. But I'm not. And haven't been for years.

I won't judge anyone for how they look, but that doesn't mean I'm happy with me.

I suspect that the mainstream representation of what a "good" body looks like has affected me more than I know (it's definitely not just something which affects women!), but even recognising that does not make it easier.

I could lie to myself, and say "it's a health thing", but it's not. At least, not any more. It's an image thing.

The better question, perhaps, is whether I will ever be happy with my body shape. I doubt it, but that's mainly because moderate exercise and a decent diet will only get me so far, and I can't see myself buying a home gym setup, let alone going to a gym with other people.

So let's see what January brings me, other than a persistent longing to make an incredibly unwise order at our local cheese shop.

Changing my Brompton's front mudguard

The Brompton I bought from eBay was in good condition overall, but it had a cracked mudguard at the front.

My guess is that it was caused by someone folding the bike poorly and, while it was not causing any obvious problems, it didn't look good, and it annoyed me.

So I fixed it.

The longest part of the job was waiting for the part to arrive, since it was seemingly held hostage by Hermes for a couple of weeks.

It arrived today, and it took about 10 minutes to remove the old mudguard and fit the new one. It was much easier than replacing the rear mudguard as part of the addition of the rack, which entailed removing the rear wheel.

So that is, I think, the last job I "need" to do. What I really need to do now is build up my stamina when actually cycling the thing, as some of the hills around here — steep, but short — are challenging me at the moment.

Although a telescopic seat post is still tempting me. Aaargh.