Archive for category Recumbent Bicycling
I’d like to overlay a timestamp on still images extracted from Sony HDR-AS30V camera videos, ideally including the frame number, to record exactly when the incident occurred. Movie players use relative time, with 00:00:00 at the beginning of the file, so we’ll need either the file timestamp or the timestamp recorded in the image’s Exif data, plus the frame number modulo 60 (or, shudder, 59.94 for NTSC).
The ExFAT format used on 64 GB MicroSD cards stores the file’s creation time, its modification time (writing data), and the most recent access time (reading data). That’s similar to the Linux ext2/3/4 filesystem time and unlike plain old FAT, which omits the access time.
The various FAT formats store local time, with no regard for time zones, Daylight Saving Time, or anything else. Linux stores times as UTC and converts to local time on the fly. This has catastrophic consequences for getting any of this right.
It helps to have
alias ls='ls -h --color=auto --time-style=long-iso' in your
The HDR-AS30V has a year-month-day calendar, a 24-hour clock, a Time Zone value, and a separate DST on/off setting.
Turning DST on adds 1 hr to the Time Zone value, turning it off subtracts 1 hr. That has the side effect of changing the clock time: not what I expected. You must, therefore, set the TZ first, then DST, then the clock, which does not follow the menu’s natural order of things.
The camera sets file timestamps as it creates the files, but Linux also meddles with the values while displaying them. Some doc suggests that Linux regards FAT file timestamps as UTC and applies DST correction, which seems to match what I see. There’s a mount option (
-o tz=UTC) that seems to have no effect, as well as an undocumented time offset (
-o time_offset=60) that also has no effect.
Setting the TZ to GMT+0 (Sony uses GMT, not UTC) for simplicity, setting the clock to the correct local time, and twiddling DST shows that:
- Rebooting (remove /insert battery) doesn’t change anything
- Metadata in file = clock setting – DST setting (-1 on, +0 off)
- MP4 / THM file create / modify times = always clock +1 hour
- MP4 / THM file access times = as create / modify until next Linux access
Under those conditions, with the clock set to (locally accurate) 1908, UTC+1, and DST off, then the Exif timestamp metadata for a movie created at that time look like this:
exiftool /mnt/part/MP_ROOT/100ANV01/MAH00036.MP4 | grep -i date File Modification Date/Time : 2014:09:01 20:08:09-04:00 File Access Date/Time : 2014:09:01 19:10:14-04:00 File Inode Change Date/Time : 2014:09:01 20:08:09-04:00 Create Date : 2014:09:01 19:08:03 Modify Date : 2014:09:01 19:08:08 Track Create Date : 2014:09:01 19:08:03 Track Modify Date : 2014:09:01 19:08:08 Media Create Date : 2014:09:01 19:08:03 Media Modify Date : 2014:09:01 19:08:08
The corresponding filesystem values:
ll /mnt/part/MP_ROOT/100ANV01/ total 146M ... snippage ... -rwxr-xr-x 1 ed root 14M 2014-09-01 20:08 MAH00036.MP4 -rwxr-xr-x 1 ed root 8.5K 2014-09-01 20:08 MAH00036.THM ll -c /mnt/part/MP_ROOT/100ANV01/ total 146M ... snippage ... -rwxr-xr-x 1 ed root 14M 2014-09-01 20:08 MAH00036.MP4 -rwxr-xr-x 1 ed root 8.5K 2014-09-01 20:08 MAH00036.THM ll -u /mnt/part/MP_ROOT/100ANV01/ total 146M ... snippage ... -rwxr-xr-x 1 ed root 14M 2014-09-01 19:10 MAH00036.MP4 -rwxr-xr-x 1 ed root 8.5K 2014-09-01 20:08 MAH00036.THM
The THM file contains a 160×120 pixel JPG thumbnail image taken from the first frame of the corresponding MP4 file. For longer movies, it’s more obvious that the MP4 file creation date is the start of the movie and its modification date is the end. The maximum 4 GB file size of corresponds to exactly 22:43 of 1920×1080 movie @ 60 frame/sec (the metadata says 59.94).
The +1 hour offset in the file create / modify times comes from the FAT timestamp being (incorrectly) adjusted by the Linux DST setting. When exiftool reads the MP4 file, that resets its access time to the actual time as seen by Linux, thereby crushing the bogus FAT time.
Doing the seemingly sensible thing of setting the camera to have the correct local time (roughly 1930), the correct time zone, and the correct DST setting produces this jumble:
exiftool /mnt/part/MP_ROOT/100ANV01/MAH00037.MP4 | grep -i date File Modification Date/Time : 2014:09:01 20:33:15-04:00 File Access Date/Time : 2014:09:01 20:33:14-04:00 File Inode Change Date/Time : 2014:09:01 20:33:15-04:00 Create Date : 2014:09:01 23:33:11 Modify Date : 2014:09:01 23:33:14 Track Create Date : 2014:09:01 23:33:11 Track Modify Date : 2014:09:01 23:33:14 Media Create Date : 2014:09:01 23:33:11 Media Modify Date : 2014:09:01 23:33:14 ll /mnt/part/MP_ROOT/100ANV01/MAH00037* -rwxr-xr-x 1 ed root 11M 2014-09-01 20:33 /mnt/part/MP_ROOT/100ANV01/MAH00037.MP4 -rwxr-xr-x 1 ed root 8.2K 2014-09-01 20:33 /mnt/part/MP_ROOT/100ANV01/MAH00037.THM ll -c /mnt/part/MP_ROOT/100ANV01/MAH00037* -rwxr-xr-x 1 ed root 11M 2014-09-01 20:33 /mnt/part/MP_ROOT/100ANV01/MAH00037.MP4 -rwxr-xr-x 1 ed root 8.2K 2014-09-01 20:33 /mnt/part/MP_ROOT/100ANV01/MAH00037.THM ll -u /mnt/part/MP_ROOT/100ANV01/MAH00037* -rwxr-xr-x 1 ed root 11M 2014-09-01 19:34 /mnt/part/MP_ROOT/100ANV01/MAH00037.MP4 -rwxr-xr-x 1 ed root 8.2K 2014-09-01 20:33 /mnt/part/MP_ROOT/100ANV01/MAH00037.THM
The only correct time in that mess is in the next-to-last line: the access time for the MP4 file. Every other timestamp comes out wrong, with the internal metadata values being off by +4 hours; that suggests the camera sets the internal timestamps to UTC.
As nearly as I can figure, the only way to make this work requires setting the clock to the local time, TZ to UTC+0, and DST off. That will screw up the filesystem timestamps, but at least the Exif metadata will be correct, for some value of correct.
The camera’s GPS receiver depends on the clock for its initial synchronization. I don’t know how the TZ and DST settings affect the clock’s correctness for that purpose.
I do not know if / how / when the displayed times have been altered by the programs that display them.
I think exiftool can extract the times from the internal metadata and fix up the filesystem times, but that’ll take more tinkering.
Sheesh & similar remarks…
Real Estate Agencies used to post property marker signs like this:
Even far off to the side, a bright background color catches your eye:
The signs sported primary colors, reasonably large type, and simple words, making them almost readable in those pictures and definitely legible from the driver’s seat. While not particularly handsome or stylin’, they got the message across: this house is for sale.
Then a strange thing happened.
Berkshire Hathaway somehow got into the real estate business and Borged several of the local agencies. BH being a Name Brand with a connotation of wealth & taste, their branding imposed a subtle touch on the new signage:
No, you can’t quite read that in real life, either, although the agent’s name and number on the header come close to the old standard.
One day, a old-school sign appeared along one of our usual routes:
Although white and green don’t pop out of the background, the sign has enough contrast that you can read what’s needed.
Then they became affiliated with Christie’s, the Big Name in the realm of high-end auctions. I have no idea what Christie’s has to do with real estate, but if Berkshire Hathaway can do it, it seems Christie’s thinks they can do it even better.
In any event, the Christie’s Corporate Standard evidently calls for very, very subtle signage:
That sign might mark a high-end bed and breakfast, but certainly does not tell me that the place is for sale: none of the text approaches readability from the street, certainly not at normal travel speeds, and nothing about it even suggests that I should take action.
A few weeks later, two hang tags added a COMMERCIAL note (the property evidently has potential to become an office or retail space) and the agent’s name and phone number in minuscule type:
After a while, a very bright red do-it-yourself HOUSE FOR SALE placard suggested the property owner wasn’t entirely satisfied with the results to date:
The high-contrast black-on-white FOR SALE header definitely doesn’t match the rest of the sign, but its more legible information might motivate you to pause and puzzle out the rest. The red placard vanished a few days after the header appeared, leaving us with this peculiar mix:
None of the (numerous) Christie’s signs in the area have a header, so this may be a case of a squeaky wheel getting greased. I won’t be surprised to see a corporate image change, including larger type, as these fancy signs weather away.
Perhaps the correct conclusion to be drawn is that, in this Internet age, nobody buys a house based on the quaint custom of driving by a house-with-sign, thinking “Hey, that’s perfect for me!”, and calling the agent, so there’s no need for anything more than a pro-forma marker identifying a property that will be selected by filters applied to MLS / Zillow databases.
The most recent change simplifies the sign to the bare minimum:
Perhaps we’ve witnessed a falling-out over typography?
This began as a test of the Sony HDR-AS30V camera’s resolution, with the obvious conclusion it wasn’t intended as a camera suitable for recording text.
The battery capacities after six months are, of course, lower:
I didn’t bring the HDR-AS30V camera along on the Hudson River ride, simply because each battery lasts about 1.5 hr in 1920×1080 @ 60 fps mode and I wasn’t up to replacing batteries during the ride, then charging all three every evening. Obviously, the camera wasn’t intended for that use case.
Somewhat surprisingly, the Wasabi batteries deliver the same continuous run time as the Sony battery: 1:30 vs 1:33. I used 250 mA for those discharge curves, but I think something around 500 mA would better match the camera load.
I’m sorely tempted to drill a hole in the camera’s case and wire in a honkin’ big prismatic lithium cell.
These sunglasses fit Mary’s face and do a good job of keeping road grit out of her eyes, but she doesn’t like the extended earpieces. So I cut ‘em off:
The trick is to shape the ends with an ordinary diagonal cutter, then round the edges with sandpaper.
The lower pair has seen a few years of use, during which the bright yellow plastic faded quite a bit.
Nothing profound, other than that you need not put up with nuisances.
He could claim to be accelerating after a stop signal and that’s just how those big Chevy “clean diesel” engines work, even with DEF and DPF in full effect.
In point of fact, this was deliberate:
I wish no ill on any man, but, should the Fates decree that a big pickup must be found wrapped around a tree, I have a recommendation.
We were northbound on 9W, returning home after an end-of-summer party.
Seven days and 300 miles of pedal pushing:
We rode north to the start of the Cycling the Hudson Valley ride in (wait for it) Hudson, rode south while crossing the Hudson six times, then I rode north from Da Bronx while the other 100 riders proceeded south to the tip of Manhattan and the finish line in Brooklyn. Mary, alas, drove the last few days to avoid aggravating a tender tendon.
While everybody else had a touristing day in Hyde Park, we slept in our own beds for two nights.
Everything you need to know about modern bicycle touring:
The straight line along the right side of the map, from just below the New Croton Reservoir to Hopewell Junction, represents data loss from riding in a valley, plus knocking the coaxial power plug out of the battery pack where the South County Trail becomes one with Rt 100 / Saw Mill River Road for a few miles.
That last day had plenty of hillclimbing, even on the rail trail, but with a rewarding section of Rt 52 that drops 500 feet in a mile; I hit 41 mph while passing under I-84.
A good time was had by all!
Based on having to seal the rear vent hole of the previous earbud, I did the same for the new one:
The audio quality was terrible, so I tried another bud with a foam windscreen over the hole and a hole punched in the middle of the double-sided white foam tape:
The audio remained unintelligible, so I tried an upscale (but still cheap, because surplus) Koss earbud, first without blocking the vents and then with snippets of Kapton tape:
The earphone has three slits on each side, but only the middle slit has a hole penetrating the case; it must be a stylin’ thing.
That sounded better, so I’ll roll with it. There’s supposed to be a foam cover over the housing, but those things always get grody and fall off; there’s not much point.
As nearly as I can tell, contemporary earbud designs optimize for volume (dBm/mV) and thumpin’ bass, all to the detriment of actual audio quality. Based on numerous samples over the years, there is zero correlation between price (admittedly, on the low end) and audio quality (admittedly, with my crappy hearing).
I own a pair of very nice (and thoroughly obsolete) Shure E2c sound-isolating ear beetles that sound great (even with my crappy hearing), but I’m unwilling to chop them up for the bike headset …