Archive for category Recumbent Bicycling
The magic incantation to extract a few seconds of video from a longer clip and set the output file to use the same codecs:
avconv -ss 00:00:01 -i /mnt/video/2015-05-30/08420001.AVI -codec copy -t 5 08420001-clip.avi
The parameter order matters: the
-ss must come before the
-i input file name and the
-t must come after it. Otherwise, avconv will copy the entire file before extracting the clip, which can be tedious.
The Fly6 camera produced a video file containing ten minutes of variations on this theme:
The top of the image looked pretty good, but then the decompression stalls and smears a single, slowly degenerating, line down the rest of the frame. The other files from that trip looked just fine.
As it turned out, extracting a few seconds with avconv or binary-copying the first few megabytes with dd produced playable copies: the original file tripped vlc’s decompression, but the source data was in the file and the copies worked.
Soooo, I could recover the video. Not that it was particularly important, but knowing how might matter some day.
Video is weird.
The Cycliq tech support folks recommend regularly formatting the MicroSD card using the Official SD Association Program (Windows-only, of course), not erasing any video files, and generally letting the camera handle the card. This whole affair seems remarkably fragile.
So I stuck a snippet of ordinary “transparent” (it’s actually translucent) adhesive tape across the top of the Cycliq Fly6 camera lens:
That smoothly blurs the top third of the frame:
The motivation for using translucent tape: it should maintain roughly the same brightness and color balance across the whole image. Opaque tape would burn out the remaining image as the camera desperately tries to maintain an average gray level.
Fast-forwarding VLC with the video stopped forces it to display the inter-frame compression blocks spanning several seconds of video:
The upper third of the frame has big, simple blocks that pegged the files at a uniform 475 MB per ten minute file, somewhat lower than the un-blurred 500 to 700 MB. So the compression definitely isn’t working nearly as hard.
I hoped that simplifying the uninteresting part of the image would leave more bits for license plates and other interesting details, which might be the case. New York has two main licence plate color schemes (the obsolete high-contrast blue-on-white and the current low-contrast blue-on-orange “Empire Gold”) and both the Fly6 and the Sony AS30V cameras do much better with white plates in full sun.
Some samples at full size:
Those were chosen based on:
- Similar range / angle: just over the center line
- Same-size crop box: 350 x 197
- Sun vs. shade
I think those are somewhat sharper than the plates from un-blurred frames, but it’s not like the camera suddenly woke up smarter and started paying attention to the important stuff.
Time for more riding, minus the tape…
These potholes have been growing despite the cold-patch:
This is the northeast corner of the Red Oaks Mill intersection:
Taken with the Fly6 rear camera, cropped to 4:3.
A few days after I wrote that up, NYSDOT filled the potholes:
Now I can measure how long a filled pothole remains filled.
Taken with the HDR-AS30V helmet camera, uncropped.
Just south of Lake Walton on the Dutchess Rail Trail, I encountered a barred owl with wings spread around something yummy in its talons (clicky for more dots):
The owl acquired weapons lock on me, just in case I might try to steal its fresh-killed meal:
My neck doesn’t turn nearly that far, so I lost the staring contest:
Owls being good folks to have around, we wish ’em well: may they raise many owlets!
The pictures were extracted from the Sony HDR-AS30V helmet camera with this incantation:
avconv -ss 00:05:30 -i /mnt/video/2015-05-15/MAH00389.MP4 -t 20 -f image2 -q 1 Image-%04d.jpg
-q 1 parameter should produce an image with the same dots as the original, but that really doesn’t mean much in the face of the camera’s relentless video compression.
Here’s a dot-for-dot crop (at 100% JPEG quality = uncompressed) showing the tradeoff between wide field-of-view, detail, and compression:
Makes me appreciate my eyesight: I spotted that owl when it covered just a few image pixels. Of course, at first I thought somebody dropped a hoodie on the trail, then maybe it was a chunk of debris, so I eased off the asphalt onto the gravel Just In Case.
A year or so ago, I picked up a Michelin Pilot City tire (700x32C) to see how they compare with the twice-as-expensive Schwalbe Marathons we’ve been using on the Tour Easy recumbents.
Having replaced a worn-out Marathon last summer, this was unexpected:
I’d blame that failure on overpressure, but I’ve been running the back tires around 70 psi, well inside their 87 psi (that’s a nice, round 6 bar) sidewall rating.
Being able to swap a back tire in the Basement Laboratory Repair Facility made up for a lot…
Some years back, NYSDOT resurfaced Rt 376 by laying an inch of asphalt atop the crumbling surface, but the underlayer continues to deteriorate and the top coat delaminates.
The situation at Westview Terrace, just south of Red Oaks Mill (clicky for more dots):
The patch just to my right is a hand-tamped cold patch job, which obviously isn’t sufficient to repair the damage.
We’ve been told that NYSDOT no longer does proactive maintenance: until somebody calls in a problem, it’s not their problem. I’m starting to document problems here as part of the record.
Having recently mounted a Cycliq Fly6 rear-facing camera (more about this later) on my Tour Easy’s seat, I had high hopes it might produce more legible images than the Sony HDR-AS30V helmet camera. Although these still images have been compressed a bit, that doesn’t affect the conclusions; the video files aren’t any more readable.
The Fly6 shows where the driver laid on the horn:
The next two come from the Sony HDR-AS30V helmet camera:
We couldn’t hear what the passenger said above the horn, but it didn’t sound friendly:
However, the driver gave us about as much clearance as can reasonably be expected with oncoming traffic:
Traffic generally hits the 40 mph = 60 ft/s speed limit on that curve and we’re rolling at 10 mph = 15 ft/s, so the relative motion might be upwards of 45 ft/s. The Fly6 runs at 30 frame/s = 1.5 ft and the AS30V at 60 frame/s = 0.75 ft. Although the exposure time is much shorter than the frame time, you can see plenty of motion blur in all the images.
The Fly 6 captures 1280×720 video @ 30 frame/s with variable bit rate compression, saving a separate file every 10 minutes on the dot. The files range from 300 MB to 600 MB, more or less.
The AS30V captures 1920×1080 @ 60 frame/s with constant bit rate compression, plopping a 4 GB file every 22 minutes and 43 seconds.
The Fly6 seems to preserve more image detail than the AS30V, but it’s probably a factor of the native resolution and compression method. The cameras provide absolutely no control over any image functions or settings; they do what they do and you get what you get.
The video compression algorithms seem overwhelmed by the number of pixels that change from frame to frame: asphalt and leaves generally have blocky compression artifacts, particularly in low light, and license plate text generally gets compressed into a blur.
When the camera remains stationary and the image doesn’t change, the compression artifacts largely disappear and the images become crisp and beautiful. Unfortunately, that’s not generally the situation while we’re riding.
I want to apply “low resolution OK here” masks to parts of the frame, leaving more bits for the critical parts. Perhaps applying thin tape to the top third of the frame would help?
Meanwhile, back on the road, nearly all drivers understand the rules and act accordingly; this was a rare occurrence.