The Smell of Molten Projects in the Morning

Ed Nisley's Blog: Shop notes, electronics, firmware, machinery, 3D printing, laser cuttery, and curiosities. Contents: 100% human thinking, 0% AI slop.

Category: Photography & Images

Taking & making images.

  • Copying Video Files From Action Cameras to a NAS Drive

    For unknown reasons, a recent VLC update caused it to ignore uppercase file extensions: MP4 and AVI files no longer appear in its directory listings, while mp4 and avi files do. The least-awful solution involved renaming the files after copying them:

    find /mnt/video -name \*AVI -print0 | xargs -0 rename -v -f 's/AVI/avi/'
    find /mnt/video -name \*MP4 -print0 | xargs -0 rename -v -f 's/MP4/mp4/'
    find /mnt/video -name \*THM -print0 | xargs -0 rename -v -f 's/THM/thm/'
    

    Yup, that scans the whole drive every time, which takes care of stray files, manual tweaks, and suchlike. The THM files are useless thumbnails; I should just delete them.

    While I had the hood up, I listed the remaining space on the NAS drive and cleaned up a few misfeatures. I manually delete old video files / directories as needed, usually immediately after the script crashes for lack of room.

    The Sony HDR-AS30V can act as a USB memory device, but it dependably segfaults the ExFAT driver; I now transfer its MicroSD card to an adapter and jam it into the media slot on the monitor, where it works fine.

    Protip: always turn the AS30V on to verify the MicroSD card has seated correctly in its socket. Unfortunately, the socket can also hold Sony’s proprietary Memory Stick Micro cards (32 GB maximum capacity = roadkill), but the dual-use / dual-direction socket isn’t a snug fit around MicroSD cards. You (well, I) can insert a card so it looks fine, while sitting slightly canted and not making proper contact. The camera will kvetch about that and it’s easier to fix with the camera in hand.

    I’ve disabled USB device automounting, as I vastly prefer to handle them manually, so the script asks for permission in order to mount the drives. The transfer requires about an hour, so I’ve extended the time the sudo password remains active.

    The script lets both cards transfer data simultaneously; the Fly6 generally finishes first because it produces less data. That produces a jumbled progress display and the script waits for both drives to finish before continuing.

    The Bash source code as a GitHub Gist:

    #!/bin/sh
    thisdate=$(date –rfc-3339=date)
    echo Date is $thisdate
    date
    # MicroSD cards not automounted
    as30v=/mnt/AS30V
    fly6=/mnt/Fly6
    sudo mount -o uid=ed /dev/sdb1 /mnt/AS30V/
    sudo mount -o uid=ed /dev/sdc1 /mnt/Fly6/
    # IOmega NAS defined as /mnt/video in fstab
    sudo mount /mnt/video
    mkdir /mnt/video/$thisdate
    rsync -ahu –progress $as30v/MP_ROOT/100ANV01/ /mnt/video/$thisdate &
    pid1=$!
    rsync -ahu –progress $fly6 /mnt/video
    date
    rc2=$?
    echo Fly6 RC is $rc2
    echo Waiting for $as30v
    wait $pid1
    rc=$(( $rc2 + $? ))
    date
    echo Overall RC: $rc
    if [ $rc -eq 0 ] ; then
    echo Fix capitalized extensions
    find /mnt/video -name \*AVI -print0 | xargs -0 rename -v -f 's/AVI/avi/'
    find /mnt/video -name \*MP4 -print0 | xargs -0 rename -v -f 's/MP4/mp4/'
    find /mnt/video -name \*THM -print0 | xargs -0 rename -v -f 's/THM/thm/'
    echo Space remaining on NAS drive:
    df -h /mnt/video
    echo Remove files on AS30V
    rm $as30v/MP_ROOT/100ANV01/*
    echo Unmount cards and NAS
    sudo umount $as30v
    sudo umount $fly6
    sudo umount /mnt/video
    else
    echo Whoopsie: $rc
    fi
    view raw savevideo.sh hosted with ❤ by GitHub
  • Monthly Image: Here’s Looking at You!

    A strangely equipped van-like object emerging from Vassar Farms waited entirely too long for me to ride past:

    Vassar Farms - 2017-05-04
    Vassar Farms – 2017-05-04

    The signage on the rear quarter panel read “Apple Maps / maps.apple.com” and a search with the obvious keywords produced a much better picture from the good folks at Adafruit in NYC of what might be the very same vehicle:

    Adafruit - Apple Maps Vehicle
    Adafruit – Apple Maps Vehicle

    The Apple Maps schedule says nothing about being in Dutchess County this month. Maybe they’re lost?

    Not being an Apple kind of guy, let me know if you see me riding by …

  • Microscope 60 LED Ring Light Adapter

    The Barbie-themed microscope light I built from an angel eye LED ring worked fine for the last six years (!), but a much brighter ring with 60 aimed 5 mm LEDs for $17 delivered from a US seller caught my eye:

    Microscope 60 LED ring light - in use
    Microscope 60 LED ring light – in use

    Although this ring looks much more professional, it didn’t quite fit the microscope, being designed for a round snout rather than a squarish one. This snout has a 47-ish mm threaded ring intended for filters & suchlike, so I built an adapter between that and the 60 mm ID of the LED ring:

    Microscope 60 LED Ring Light Adapter - top - Slic3r
    Microscope 60 LED Ring Light Adapter – top – Slic3r

    The ring came with three long knurled screws which I replaced with much tidier M3 socket-head screws going into those holes:

    Microscope 60 LED ring light - assembled - top
    Microscope 60 LED ring light – assembled – top

    The part going into the snout threads is deliberately (honest!) a bit small, so I could wrap it with soft tape for a good friction fit. The Barbie Ring didn’t weigh anything and I wound up using squares of double-sticky foam tape; it could come to that for this ring, too.

    The adapter features a taper on the bottom for no particularly good reason, as the field-of-view tapers inward, not outward:

    Microscope 60 LED Ring Light Adapter - bottom - Slicer
    Microscope 60 LED Ring Light Adapter – bottom – Slicer

    Seen from the bug’s POV, it’s a rather impressive spectacle:

    Microscope 60 LED ring light - assembled - bottom
    Microscope 60 LED ring light – assembled – bottom

    The control box sports a power switch and a brightness knob. Come to find out the ring is actually too bright at full throttle; a nice problem to have.

    That was easy!

    The OpenSCAD source code as a GitHub Gist:

    // LED Ring Light Mount – 60 mm ID ring
    // Ed Nisley KE4ZNU April 2017
    //- Extrusion parameters must match reality!
    ThreadThick = 0.25;
    ThreadWidth = 0.40;
    HoleWindage = 0.2;
    Protrusion = 0.1; // make holes end cleanly
    inch = 25.4;
    function IntegerMultiple(Size,Unit) = Unit * ceil(Size / Unit);
    //———————-
    // Dimensions
    ID = 0;
    OD = 1;
    LENGTH = 2;
    ScopeThread = [43.0,46.5,4.0]; // scope snout thread, ID = minimum invisible
    LEDRing = [ScopeThread[ID],60.0,8.0];
    LEDScrewOffset = 4.0;
    LEDScrewOD = 3.0;
    LEDScrews = 3;
    OAH = ScopeThread[LENGTH] + LEDRing[LENGTH];
    NumSides = 3*4*LEDScrews; // get symmetry for screws
    //———————-
    // Useful routines
    module PolyCyl(Dia,Height,ForceSides=0) { // based on nophead's polyholes
    Sides = (ForceSides != 0) ? ForceSides : (ceil(Dia) + 2);
    FixDia = Dia / cos(180/Sides);
    cylinder(r=(FixDia + HoleWindage)/2,h=Height,$fn=Sides);
    }
    //———————-
    // Build it
    difference() {
    rotate(180/NumSides)
    union() {
    cylinder(d=ScopeThread[OD],h=OAH,$fn=NumSides);
    cylinder(d=LEDRing[OD],h=LEDRing[LENGTH],$fn=NumSides);
    }
    translate([0,0,-Protrusion])
    rotate(180/NumSides)
    cylinder(d=ScopeThread[ID],h=OAH + 2*Protrusion,$fn=NumSides);
    translate([0,0,-Protrusion])
    rotate(180/NumSides)
    cylinder(d1=LEDRing[OD] – 2*6*ThreadWidth,
    d2=ScopeThread[ID],
    h=LEDRing[LENGTH] + Protrusion,$fn=NumSides);
    for (i=[0:LEDScrews-1])
    rotate(i*360/LEDScrews)
    translate([LEDRing[OD]/2 – LEDScrewOD,0,LEDRing[LENGTH] – LEDScrewOffset])
    rotate([0,90,0]) rotate(180/6)
    cylinder(d=LEDScrewOD,h=LEDScrewOD + Protrusion,$fn=6);
    }

     

  • Sharing the Road on NYS Bike Route 9: Right Hook

    I’m towing a trailer of groceries southbound on Rt 376 (a.k.a. Hooker Avenue in this section), intending to turn right onto Zack’s Way for a library stop.

    T=0.00 s, car @ 26.4 mph, me @ 19.8 mph

    The transverse cracks through the asphalt are a convenient 60 ft apart, with the last one 20 ft from the stop line, and the frame numbers tick along at 60 frame/sec, so you can easily compute distances, times, and speeds.

    I’ll be turning right at the intersection. The light is green.

    Zacks Way - Right Hook 2017-04-11 - 0624
    Zacks Way – Right Hook 2017-04-11 – 0624

    T= 2.07 s, car @ 26.7 mph, me @ 19.7 mph

    Now I can see the car’s right turn signal, so this might not end well. I can’t jam on the brakes and avoid a collision by dumping the bike at speed; I’ll slide under the car in the middle of the turn.

    Zacks Way - Right Hook 2017-04-11 - 0748
    Zacks Way – Right Hook 2017-04-11 – 0748

    T=4.15 s, 15.2 mph

    I’m 20 feet from the stop line and, suddenly, the driver also realizes this might not end well.

    What he doesn’t know is that my trajectory must use the traffic lane: the shoulder around the corner is deteriorated, with several potholes, and vanishes completely where the intersection paving ends.

    Zacks Way - Right Hook 2017-04-11 - 0873
    Zacks Way – Right Hook 2017-04-11 – 0873

    T=5.05 s

    The driver is turning wide, into the opposing traffic lane, but if I weren’t lining up for the turn, we’d be on a collision course. My line will take me just to the left of the seemingly tiny, but very deep, pothole just ahead.

    Zacks Way - Right Hook 2017-04-11 - 0927
    Zacks Way – Right Hook 2017-04-11 – 0927

    T=7.15 s

    Leaning hard into the turn, but our paths won’t cross.

    Zacks Way - Right Hook 2017-04-11 - 1053
    Zacks Way – Right Hook 2017-04-11 – 1053

    T=7.37 s

    I’m back upright in the middle of the lane, with the shoulder ending in a pothole to my right.

    Zacks Way - Right Hook 2017-04-11 - 1066
    Zacks Way – Right Hook 2017-04-11 – 1066

    T=8.31 s

    Remember, I’m wearing a fluorescent (“safety”) orange shirt, running a blinky light (which is also the rear camera), and towing a trailer with a fluttering flag: I am not inconspicuous!

    Zacks Way - Right Hook 2017-04-11 - 1123
    Zacks Way – Right Hook 2017-04-11 – 1123

    In case there’s any question:

    Zacks Way - Right Hook 2017-04-11 - rear
    Zacks Way – Right Hook 2017-04-11 – rear

    The rest of the ride proceeded without incident …

  • Monthly Image: Turkey Mating

    Early spring brings out large turkey flocks and provides a window into their otherwise rather private lives.

    Despite all the strutting and posturing by the males, the ladies call the shots. When we see a hen go hull-down like this, we know what’s about to happen:

     Turkey mating - invitation
    Turkey mating – invitation

    Getting into the right position seems remarkably awkward and requires some cooperation:

    Turkey mating - mounting
    Turkey mating – mounting

    When her head and tail pop up, you know the thing is going right:

    Turkey mating - the moment
    Turkey mating – the moment

    And a back massage always feels so fine:

    Turkey mating - massage
    Turkey mating – massage

    Then he’s back to strutting & posturing:

    Turkey mating - aftermath
    Turkey mating – aftermath

    We hope they’ll show us their chicks

    Taken with the DSC-H5, hand-held through two panes of 1955-era window glass: ya get what ya get.

  • Honeybee Escort

    The first pleasant day after a long string of snow and rain got us outside again:

    Honeybee escort - 2017-03-29
    Honeybee escort – 2017-03-29

    The honeybee at Mary’s elbow escorted us for a bit, then flew between us and continued on her mission.

    Despite appearances, she passed a few inches from my helmet:

    Honeybee escort - detail 2x - 2017-03-29
    Honeybee escort – detail 2x – 2017-03-29

    We all agreed: it was a fine day for a ride and a flight!

  • Turkey on the Rail

    We’ve often seen turkeys perched on horizontal tree branches and split-rail fences, but this is new:

    Turkey on patio rail
    Turkey on patio rail

    Apparently she wanted to use the bird feeder atop the post festooned with plastic squirrel deterrence. Not being Elastigirl, she couldn’t quite stretch from rail to feeder, eventually gave up trying, and flapped to the driveway.

    We’ve been turkey-watching for nearly two decades, it’s been eight years since we saw a turkey on the patio, and a few days after I set up the yard camerashazam, this bird shows off for my friend in Raleigh while I’m in the Basement Laboratory. I’m insane with jealousy.

    In point of fact, turkeys seem perfectly aware of people inside the house, so it’s not surprising they avoid the patio. When we move close to a window, the flock decides it has business elsewhere and, generally without haste or confusion, flows over the hill and away.

    Obviously, I must set up motion detection and capture some images …