Note to self… Preset White Balance

Wednesday, December 17, 2014

Another photography note to self…. many cameras allow you to directly measure the white balance in a scene and set it prior to shooting. This can be very useful particularly if you are shooting JPEGs. Nikon’s use what they call Preset White Balance. If you set white balance to “PRE” (rather than auto or any other setting), who have 6 (on my D700) memory banks which can store a white balance setting. Long press the WB button to put the camera in to measurement mode and fire the shutter. The measurement is then stored in the memory bank and all subsequent photos then use that white balance setting.

Very handy!

Transcoding Update

Thursday, December 4, 2014

Following on from yesterday’s post I hit a few problems with some encoding - whilst MPEGStreamClip worked fine (albeit slowly) with conversion from a DVD, it didnt work properly with a file copied off my Humax. Whilst the video transcoded and was fine, the audio wouldnt play. At this point I switched to TEncoder, a GUI for for Mencoder/MPlayer/FFMpeg, the standard open source transcoding tools. And this worked brilliantly - it doesnt compress quite as small as MPEGStreamClip but it may well be that the firmware in the Acer C112 uses open source libraries which are more likely to be compatible. I selected the Mpeg4 video codec, Mp3 audio codec (in mono) and downsampled to 480×320 at a 1024kbps bitrate. The video looks pretty clean. And, for whatever reason, it transcoded very quickly (<2 minutes).

UPDATE: I moved on to using DVD Shrink again to copy a video off a disc and I now realise that when you are using TEncoder you dont need to either demux the file VOB file (using Project X) or subsequently mux it using MPEGStreamClip. Once DVD Shrink has copied it, just load the VOB in to TEncoder and let it encode. Voila!

Transcoding for the Acer C112

Wednesday, December 3, 2014

So, following on from the last post, in order to play videos reliably from the Acer C112 you need to transcode them. This earlier post talked about taking a DVB transmission stored on a Humax and transcoding it to DIVX. In essence this still remains the same, but and updated process:

1. Split (demux) the .TS in to constituent audio and video streams using ProjectX. Use the default settings, BUT, on the “Filter Control” tab additionally tick the AC3 audioas well as the Mpeg video and audio. Click “QuickStart”
2. Combine (mux) the streams in to an .MPG (using .MP2); use MPEGStreamClip and the “Convert to MPG (with MP2 audio)” item in the File menu.
3. Transcode the file using MPEGStreamClip, however make sure of the following:
-set “Quality” to a suitable amount. Lower quality is smaller filesize
-Compression: Apple MPEG4 Compressor
-tick “Limit Data Rate” and set it to 1.4 Mbps
-set the sound to 128kbps
-the frame size will depend upon what video you are using

For DVD its a different first part:

1. Use DVD Shrink to copy the video off the disc:
-set “Properties” to a single VOB (i.e. dont split it)
-”Open Disc”
-select the main movie
-select only English language for audio
-”BackUp!” to C:

With the VOB file copied off you can then progress to using ProjectX and then MPEGStreamClip.

Pico Projectors

Wednesday, December 3, 2014

Pico projectors (not overly detailed Wikipedia page; a nice “simples” guide here) have been around for a few years now and - as the name suggests - offer projection in a small form factor over relatively short throw distances. They are great for on-the-hoof projection but, as yet, remain relatively expensive new. I plumped a couple of years ago for the Acer C112, although Acer’s range continues to evolve. The C112 is WVGA (same as DVD) with 70 ANSI lumens brightness - this isn’t exactly stunning and you need a darkened room to see it clearly, but it still works well. What’s great is that these projectors (and it’s sibling the C110) are selling for less than £100 which makes them a bit of a steal. The updated C205 comes in at a sprightly 200 lumens which makes it a more appealing alternative or the K137 which is 700 lumens but quite a bit pricier.

In order to reduce size and costs the C112 is what’s call Display over USB (DoUSB) - that is to say the projector is recognised as a display device and JPGs sent over the USB connection to the device. This is quite different from a traditional VGA connector and requires you to mirror the display that it’s connected to. When you first connect the C112 to a Windows machine it recognises it as a mass storage device which allows you to install a Windows mirror driver/application from the device itself. This switches the connection in to display-mode and then mirror the current screen. The C112 also has a relatively simple onboard playback system that allows you to play various multimedia files. Supported formats are shown here including the all important mp4 (although my experimentation suggests that it *doesnt* support h264 as that page suggests, rather only mpeg4 simple profile) and mp3 which is great, plus usual support for JPG. Presentations are a little trickier, but you can get the Acer MPtG Converter which may be on the internal memory or from the Acer website. This actually works on your host PC to convert PDF and PPT files - it actually temporarily reduces the screen resolution of the computer, “plays” the presentation and records it to a series of audio, video and JPEG files that the projector can playback - files can get very large when multimedia is involved and this presents a problem with significant slowdown of playback on the projector itself (probably due to a restriction with loading the presentation in to internal memory). Splitting the presentation up in to smaller “chunks” and then converting them seems to work well though and offers a reasonable (lightweight) workaraound.

Unfortunately playback (screen mirroring) functionality broke with Windows 8 and so anyone using the C112 was cut adrift. Given the relative simplicity of the device, the protocol has been reverse engineered and a Linux driver developed - this uses the standard libusb to access the device then various libav libraries to mirror the display and push it to the projector in display mode. Take a look at the “hacking doc” to see how to compile it on Linux. I have Linux Mint 17 installed on my laptop - when compiling there was a problem with calls to some of the libav libraries. The developer, Antonio, is super responsive (on IRC #am7xxx over at Freenode) and realised that Mint 17 uses an older set of libraries. One diff patch later allowed it to compile and it worked perfectly.

The driver works particularly well with the C112 and is excellent for displaying presentations or DVDs, although currently only “video” is sent over the USB connection, no audio so you’d need to use the computer to play the sound (not that that’s a particular problem). It can be cross-compiled (for Windows or Android) although this is experimental at the moment. However a separate fork has a working version for Windows 8 which utilises Zadig, a port of libusb for Windows. Note that this is now no longer open source, although the last version (only works on C110) is available here

All in all an extremely capable and cost-effective solution and definitely a space to watch as devices get smaller and cheaper.

Updated JISC-OS Licence…. why this matters to UK academics

Tuesday, November 18, 2014

I have on several occasions blogged about the OS-JISC licence including the 2009 version (including my reference to smoking!), a use-case example and including a recommendation at the Journal of Maps not to use OS data.

With the end of 2014 drawing nigh a new licence agreement has landed…. can it get any better (or worse)?

Well Digimap certainly think so: “Image publication size restrictions have changed significantly with many being removed. Please refer to the Your Obligation/Restrictions section of the EULA, specifically Clause 5.1.4 and 5.2.”

And that definitely seems to be the case. From the licence itself:

3.3.8 publish copies of your Academic Works and Research Works in academic journals, periodicals and other publications, for the purpose of communicating the results of your scholarly work:
a) in printed form; or
b) in electronic form, provided that the mapping images included in such publication comply with the requirements of sub-clause 5.1.4;

So that’s good news. Actually that’s really good news - for academic publication you can pretty much use what you need. Big thumbs up for that. OK, let’s have a look at 5.1.4:

5.1.4 ensure that any mapping images that are included in Academic Works, Presentation Materials, Research Works and Teaching Materials, which are, or are likely to be, distributed or otherwise made available to persons who are not Authorised Users (including but without limitation by way of publication on the world wide web), shall:
a) be in a Raster Format only;
b) not be geo-referenced;
c) be no larger (in scale, coverage area, number of features) than is necessary to fulfil the purpose for which the map is being used;
d) include additional information on/alongside/with the map which facilitates the purpose for which the map is being used; and
e) you shall take adequate and technological measures to prevent third parties from being able to access, use and/or extract any Ordnance Survey Licensed Data from such materials/media.

OK, let’s look at these in more detail:

(a) That’s irritating. I can live with it, but at the Journal of Maps we insist on using vector data where possible because it’s a smaller filesize (generally), tends to render quicker and print better. But I understand the rationale.
(b)What does georeferenced mean? It’s not defined in Appendix 1 but I assume that rules out a GeoPDF for starters. Can you put a graticule/grid on your map? I’d probably define that as georeferenced but it’s almost a requirement on most maps. Does that also rule out the OSs own basemapping? Almost by definition the 1:10k, 1:25k and 1:50k are all georeferenced. That’s daft, so perhaps seek some clarification on that one (not good when a “plain speak” licence fails the “plain speak” test).
(c) “be no larger than is necessary” - seems to be a “cover our backs” type of clause to stop abuse of the system. Fine with that.
(d) this struck me as really strange - “include additional information … facilitates the purpose … [ of] the map” - I’m sure there’s a “cover our back” reason for this but can’t (obviously) think of it. There are times when you wouldn’t necessarily want to have a legend (designing a flyer for coursework/academic conference) but they are less common. Any thoughts??
(e) “take adequate and technological measures” - fair enough. Don’t brazenly go giving away data!!

Clause 5.2 is worth looking at for the long list of things you are NOT allowed to do which are pretty much par for the course although this one jumped out at me:

5.2.7 incorporate the Ordnance Survey Licensed Data into any materials or media which is likely to cause harassment, alarm or distress to any person; or use the Ordnance Survey Licensed Data for any illegal, deceptive, misleading or unethical purposes or in a manner which may be detrimental to the reputation of Ordnance Survey or the Ordnance Survey Licensed Data;

Again slightly strange, but I can envisage academic subjects (which may incorporate maps) which do cause alarm/distress. It’s a catch-all again although you could view this as censorship of academic expression - in which case I guess data outside the licence is the way to go!

Sp in all in very good news - this is what the licence should have been 10 years ago but thats a long time in digital life. Once we have clarification of georeferencing that should pretty much open up academic use of OS data for journal publication.