Archive for category Recumbent Bicycling

Extract-copying A Video Clip

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:

Fly6 - 0842001.AVI - Video compression failure

Fly6 – 0842001.AVI – Video compression failure

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.

2 Comments

Fly6 Video Compression: Blur to Sharpen?

So I stuck a snippet of ordinary “transparent” (it’s actually translucent) adhesive tape across the top of the Cycliq Fly6 camera lens:

Cycliq Fly6 Camera - blur tape

Cycliq Fly6 Camera – blur tape

That smoothly blurs the top third of the frame:

Fly6 - Tape-blurred frame

Fly6 – Tape-blurred 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:

Fly6 - Forced compression artifacts

Fly6 – Forced compression artifacts

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:

Fly6 - License Plates

Fly6 – License Plates

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…

7 Comments

Road Conditions: Rt 376 at Red Oaks Mill

These potholes have been growing despite the cold-patch:

Potholes - Red Oaks Mill intersection

Potholes – Red Oaks Mill intersection

This is the northeast corner of the Red Oaks Mill intersection:

Potholes - Red Oaks Mill intersection - map

Potholes – Red Oaks Mill intersection – map

Taken with the Fly6 rear camera, cropped to 4:3.

A few days after I wrote that up, NYSDOT filled the potholes:

Potholes Repaired - Red Oaks Mill intersection

Potholes Repaired – Red Oaks Mill intersection

Now I can measure how long a filled pothole remains filled.

Taken with the HDR-AS30V helmet camera, uncropped.

2 Comments

Barred Owl on the Dutchess Rail Trail

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):

MAH00389-0548 - Barred Owl on DCRT - 1

MAH00389-0548 – Barred Owl on DCRT – 1

The owl acquired weapons lock on me, just in case I might try to steal its fresh-killed meal:

MAH00389-0548 - Barred Owl on DCRT - 2

MAH00389-0548 – Barred Owl on DCRT – 2

My neck doesn’t turn nearly that far, so I lost the staring contest:

MAH00389-0548 - Barred Owl on DCRT - 3

MAH00389-0548 – Barred Owl on DCRT – 3

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

The -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:

MAH00389-0548 - Barred Owl on DCRT - 2 - detail

MAH00389-0548 – Barred Owl on DCRT – 2 – detail

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.

3 Comments

Michelin Pilot City Tire Bead-Carcass Joint Failure

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:

Michelin Pilot City Protek tire - blown bead

Michelin Pilot City Protek tire – blown bead

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…

10 Comments

Road Conditions: Rt 376 at Walker

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):

Delaminated Asphalt - Rt 376 at Westview Terrace

Delaminated Asphalt – Rt 376 at Westview Terrace

The patch just to my right is a hand-tamped cold patch job, which obviously isn’t sufficient to repair the damage.

Locator:

Delaminated Asphalt - Rt 376 at Westview Terrace - map

Delaminated Asphalt – Rt 376 at Westview Terrace – map

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.

2 Comments

Action Camera Video Compression vs. License Plates

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:

Rt 376 at Cedar Valley - 2015-05-22 13:34 - Seat - 1

Rt 376 at Cedar Valley – 2015-05-22 13:34 – Seat – 1

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:

Rt 376 at Cedar Valley - 2015-05-22 13:34 - Helmet - 1

Rt 376 at Cedar Valley – 2015-05-22 13:34 – Helmet – 1

However, the driver gave us about as much clearance as can reasonably be expected with oncoming traffic:

Rt 376 at Cedar Valley - 2015-05-22 13:34 - Helmet - 2

Rt 376 at Cedar Valley – 2015-05-22 13:34 – Helmet – 2

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.

13 Comments