Earth Notes: On Website Technicals (2019-07)

Updated 2019-07-19 07:49 GMT.
Tech updates: improved video support...
tools
Lots of video codec jollies to start with, including a return to silent (but small!) movies for some Gallery videos for now...

2019-07-14: HTTPS is Alive!

I have my RPi3B+ on-line and, with the aid of certbot, HTTPS working on a test Apache domain/site. Hurrah!

2019-07-12: Happy Video

I'm generally happy with how the video support is going, and direct insertion into EOU pages of Gallery video is especially pleasing.

The space saving when transcoding from the original format to .mp4 can be astonishing. And when cranking down the fidelity even more so. For example, ~78MB original .avi down to 10MB (.mp4) down to 2MB lo-fi as below, at time of writing. There is some additional saving when downsizing for a smaller display than the original. A few seconds of video can take a similar size in bytes to a single still as a JPEG. I may yet be able to tune codecs to improve further (ie with slower presets).

"England London Waterloo on penultimate day 20071112 November 2007 via Eurostar train and Channel Tunnel to Lille France video 102 DHD" (poster) Created/encoded . Uploaded . Duration 42 seconds. Download MP4 clip 10363kB (may not be available in data-saver/lite mode), download low-bandwidth MP4 clip 2233kB, hi-fi/original AVI clip 77932kB (Gallery page).

It looks like although the avconv on my RPi2 seems older and more buggy, the version on my Mac may be silently borked instead. The above video was wonderfully broken by the Mac's attempt at transcoding, and was surreal like something from the end of "2001"!

2019-07-05: Better Video support

I have spent longer than is wise already playing with avconv to create 'responsive' video output better matched to the user's device, eg fewer pixels and lower-fi to minimise data use for 'lite' pages.

Next up is making it possible to use videos directly from the Gallery, copying or transcoding as necessary.

(2019-07-06: Done, though the avconv that comes with my RPi2's distribution is a bit old and broken and couldn't manage to re-encode the audio on the first Gallery .avi that I tried.)

(2019-07-07: The audio problem seems common, though not universal, so some of those transcoded videos are silent for now...)

At some point I'd also like to add a short-cut for the repeated re-encoding logical steps, such as full size -> correct width -> lo-fi. Instead I'd pass in the original source alongside the previous element in the chain, and take metadata (eg size in pixels) from that previous item, but recode from the closest-to-source bits each time. That should make for cleaner and lower-bandwidth results.