Embedding Video in WordPress

I can’t keep up with video embedding in WordPress. It changes, it breaks, I try and keep things simple.

A few tests to embed video from flickr and zenfolio. These are mp4 files created by motion for a Vivotek IP webcam.

Zenfolio: Using the Share Embed Code

This is using the embed code from the Share option in Zenfolio. Need to be logged into zenfolio. The code is added to the page (Gutenberg editor) using the Custom HTML option in the Formatting section. The embed code that Zenfolio supplies is:

<p><iframe src="//www.zenfolio.com/zf/core/embedvideo.aspx?p=c9dd8a90.11" width="800" height="500" frameborder="0"></iframe></p>

This seems to work ok on desktop, Firefox. But no ability to play full-screen or link through to original on zenfolio. Also not so sure about the responsiveness on a smartphone. In fact looks a bit broken overall on iPhone.


Zenfolio: Direct link to video

This is using the Share option available to the owner when logged into Zenfolio. There’s a range of sizes/qualities linking to the original mp4. Quality differences not that relevant for a webcam but I’ve used the best one anyway. In the following example I’ve used the Video option under Common Blocks and selected Insert from URL.

This seems to work as good as the embedded code but with perhaps a bit more buffering. You can click through to full-size, but not to the original zenfolio page. And still pretty broken on an iPhone.


Flickr: Using the Share Embed Code

Like the zenfolio example above, this uses the Share option available only when logged in. The Embed code, added using the Custom HTML option is:

<a data-flickr-embed="true" data-header="true" data-footer="true"  href="https://www.flickr.com/photos/djnisbet/32746907647/" title="phoenix - gardenpath - event5177 - Tue 23 Apr 2019 - 0748 - 32s930ms(no sound)"><img src="https://live.staticflickr.com/31337/32746907647_b91a271a6b_o.jpg" width="1280" height="800" alt="phoenix - gardenpath - event5177 - Tue 23 Apr 2019 - 0748 - 32s930ms(no sound)"></a><script async src="//embedr.flickr.com/assets/client-code.js" charset="utf-8"></script>
phoenix - gardenpath - event5177 - Tue 23 Apr 2019 - 0748 - 32s930ms(no sound)

On Firefox (66.0.3 (64-bit)) running on Debian (Private Window and Cookies Cleared) this gives:

No video with supported format and MIME type found.

This also happens under Firefox (Windows 10), whereas Edge has a bold overlay that states: This type of video file isn’t supported. This is the same video file that I uploaded to both Flickr and Zenfolio, so presumably they are handled, stored or delivered in some subtly different way.


Flickr: Using the built-in Gutendberg Embeds

phoenix - gardenpath - event5177 - Tue 23 Apr 2019 - 0748 - 32s930ms(no sound)
Using the Flickr option under Embeds

Well this is interesting. Is there a difference between pre and post Smugmug Flickr? A lot of migration has been going on after SmugMug bought Flickr, and I wonder if it’s videos either side of that migration that are causing the fun.

Here’s some iPhone footage taken on the River Wear in Feb 2018. It seems fine using the Flickr Embed option.

Flickr: iPhone video uploaded in Feb 2018

2018-02-13 17.04.03

Now here’s some iPhone footage, (same iPhone), taken recently and uploaded to Flickr. Using the same Flickr Embed option.

Stepping Stones - 2019-02-23 09.04.56

Same Camera, same embedding technique. One works, the other doesn’t. The only difference is the time they were uploaded. Let’s try that test again.

Here’s another clip from the garden path webcam from Jan 2019. And it works fine.

phoenix - gardenpath - event1488 - Sun 06 Jan 2019 - 091438 - no_audio - 27M

Finally a couple of examples using the photonic plugin. Same story. It works for video uploaded before the migration, but not after.

Before …

and after …


Time and Patience are not waiting for me and my experience of Flickr has always been exasperating. I had a legacy Pro account but with the acquisition by SmugMug the cost of that has jumped and I don’t think it’s worth the money. I’ll probably not renew my Flickr Pro subscription in May and stick with Zenfolio. My Vimeo Plus was great for its video sharing but a bit of an overkill for people like me who just want to potter about with smartphones and webcams. But then, the money saved by not paying for Flickr. Hmmm ….

Species List (First Attempt)

yes, after 10+ years living in Durham it’s about time I had a stab at this. There’s a couple of things I want to do on the garden:

  1. Species List
  2. Map

And whenever I start thinking about it I overthink it about all the things I’d like to note, plot, monitor. And in the end, I do nothing.

So let’s make a start:

Hang on, where’s my Tablepress plugin gone? It should be here? I’ve just installed it. Back in a tick.

Permissions on /dev/video0 running motion on Raspberry pi

It pretty much happens that every time I setup motion on a new build that it doesn’t work right away. There’s usually a few things I miss. Usually it’s an error reading from the camera, the logs reporting something like:

Feb 17 10:51:21 pi2 motion: [1] [NTC] [ALL] motion_init: Thread 1 started , motion detection Enabled
Feb 17 10:51:21 pi2 motion: [1] [NTC] [VID] vid_v4lx_start: Using videodevice /dev/video0 and input -1
Feb 17 10:51:21 pi2 motion: [1] [ALR] [VID] vid_v4lx_start: Failed to open video device /dev/video0:

which invariably means the camera is broken or I’ve misconfigured my motion setup.

This one was puzzling me a little though. It’s on a raspberry pi, imaginatively titled pi2, and it was failing to read from the camera. The reason I was puzzled was that the hardware combination had worked before. What had gone wrong was the micro-SD card, and I’d done a new raspbian build, copying over the relevant motion configuration files from the old card.

Clearly the difference had to be something to do with the OS. So what was different? I’d taken the opportunity of the SD failure to download and install the latest version of raspbian and everything looked good to go.

Running motion as root worked fine, both against the vanilla configuration file, and the customised config file I wanted to use. So let’s have a look at the video file:

root@pi2:~# ls -l /dev/video0
crw-rw----+ 1 root video 81, 0 Feb 17 11:17 /dev/video0

Looks about right. Ah, the video group. I need to be in the video group. That might be it:

root@pi2:~# usermod -G video dougie

Restart motion and try again. Nope. Let’s have a closer look at that file.

On pi2 (with a new version of raspbian):

crw-rw----+ 1 root video 81, 0 Feb 17 11:17 /dev/video0

and on pi1 (another rpi, running motion fine, with a slightly older version of raspbian):

dougie@pi1:~ $ ls -l /dev/video0
crw-rw---- 1 root video 81, 0 Jan 8 22:54 /dev/video0

Very similar, but not identical. The newer version of the device file has and extra + at the end of the permissions bit, which means the file has extra security permissions set. I’ve not had cause to use Access Control Lists (ACLs) before, and it was a temptation just to chmod 777 on the file as a quick and dirty, and lazy, fix, but I thought it’d be better to take a closer look. Using the getfacl command:

root@pi2:~# getfacl /dev/video0
getfacl: Removing leading '/' from absolute path names
# file: dev/video0
# owner: root
# group: video
user::rw-
user:pi:rw-
group::rw-
mask::rw-
other::---

I could see that I (me: dougie) did not appear on the list, although the default rpi user pi does. I rarely use the pi account. One of the first things I do is change its password, create my own user, and use that instead. So it looks like the default install for raspbian allows user pi to access /dev/video0. It also looks like I can’t access the file, despite being a member of the group video.

I found a good command summary on the centos documentation website, and using that gave myself access:

root@pi2:~# setfacl -m u:dougie:rw /dev/video0

That did the trick.

 

 

Trackr Bravo battery life

The TrackR does many things badly. The Tile just does one thing well.

Another email from Trackr – this time about their new Battery Program. This is about a wizard wheeze where you can pay Trackr for replacement batteries.

Reading on in their email there’s a section subtitled:

What if every time your battery was dead, you had to buy a brand new device?

Well, what indeed. One wonders what can they be alluding to? I wonder if it’s another well known Bluetooth tracking device that has to be replaced about once a year when the battery nears end of life?

The TrackR Bravo is a slick, elegant looking device, and looks better than the Tile. But having bought a handful of both devices as soon as they hit the market, the Tile is the winner by a mile. On reliability, build quality, and Customer Service the Tile is the winner. My experience of using Trackr has been one of interminable irritability. I’ve tried its various features and abandoned them finding them gimmicky, unreliable and pointless. I’m struggling to think of any redeeming features, and the closest I can get is that the Bravo looks ok.

Trying a different brand of battery

I’ve just replaced the batteries in all my Trackr Bravos. The ones I’ve removed were brand new Maxells. Perhaps I was unlucky. I thought Maxell were a pretty good brand. This time I’m replacing them with GP batteries. I only found the batteries were dead by accident, as I thought I get more than 3 months out of the Maxells. It didn’t occur to me to check connectivity every day, and on the TrackR app (unlike the Tileapp), you need to check each TrackR individually – whereas with Tile you can scan all your tiles’ status in one glance.

I’ve had Tile and TrackR since they became available in the UK – and have been running them head to head since I bought them. It’s a very unequal contest. Give me the Tile any day.

TrackR Tile Head to Head

malware requesting Read Receipt

Another day, another slew of malware and spam. But I don’t recall one like this before.

The obvious signs are there, such as impersonal salutation and dubious attachment. The part that interested me was the request for a read receipt. Here’s a screenshot of the email:

2015-10-21_11-16-17

If you weren’t looking closely at the read receipt request you’d be forgiven for thinking it was the same as the (apparent) sender. But it’s actually an Australian domain.

2015-10-21_11-16-17

A good reason for not automating read (or delivery) notifications.

 

 

Outlook webmail won’t let you login if password renewal is due

which sorta makes sense.

But in Exchange 2013 it’s possible to change your password in OWA without logging into AD so if a user is scheduled to change their password the next time they login, I thought OWA might force a password change. Actually, thinking about that, how would that work? It would have to automatically present the change password dialogue. Perhaps that’s not possible.

Just need to remember that for users who don’t log into AD directly on a PC, but just use OWA all the time, forcing them to change their password on next login won’t work.

Web searches don’t reveal much, but if I understand Change Password Feature in Outlook Web App correctly, it’s WAD.

what a mess

What’s happened here is that I’ve had two poorly maintained blogs and I’ve crudely welded them together into one.

This blog is now a messy tramsmash of www.bluecedar.org.uk and katsura.org.uk.

The basics were simple enough:

  1. Create new self-installed WordPress blog (this one)
  2. Export everything out of bluecedar.org.uk (Tools/Export)
  3. Export everything out of katsura.org.uk (Tools/Export)
  4. Import into katsura.uk (Tools/Import)

Step 4. required installing a plug-in but that was no big deal.

It’s a mess, but it’s a nice mess.

Find Willow’s Collar

What a difference a day makes.

Yesterday I was wondering on whether it’s possible to set up a dumb ‘slave’ iPhone to act as a part of the hive mind and pass on location info about our cats. Today Willow has wandered in, sans collar, and that means no tile either. I haven’t lost my cat, but I have lost his collar.

I’ve marked Willow’s Collar as Lost. I’ve wandered round the garden and the street staring at my iPhone at the slowly rotating grey circle. Nothing yet.

Let the games begin …