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.

  • Raspberry Pi Streaming Video Loopback

    Raspberry Pi Streaming Video Loopback

    As part of spiffing my video presence for SquidWrench Zoom meetings, I put a knockoff RPi V1 camera into an Az-El mount, stuck it to a Raspberry Pi, installed the latest OS Formerly Known as Raspbian, did a little setup, and perched it on the I-beam over the workbench:

    Raspberry Pi - workbench camera setup
    Raspberry Pi – workbench camera setup

    The toothbrush head has a convenient pair of neodymium magnets affixing the RPi’s power cable to the beam, thereby preventing the whole lashup from falling off. The Pi, being an old Model B V 1.1, lacks onboard WiFi and requires a USB WiFi dongle. The white button at the lower right of the heatsink properly shuts the OS down and starts it up again.

    Zoom can show video only from video devices / cameras attached to the laptop, so the trick is to make video from the RPi look like it’s coming from a local laptop device.

    Start by exporting video from the Raspberry Pi:

    raspivid --nopreview -t 0 -rot 180 -awb sun --sharpness -50 --flicker 60hz -w 1920 -h 1080 -ae 48 -a 1032 -a 'RPi Cam1 %Y-%m-%d %X'  -b 1000000 -l -o tcp://0.0.0.0:5000

    The -rot 180 -awb sun --sharpness -50 --flicker 60hz parameters make the picture look better. The bottom of the video image There is no way to predict which side of the video will be on the same side as the cable, if that’s any help figuring out which end is up, and the 6500 K LED tubes apparently fill the shop with “sun”.

    The -l parameter causes raspivid to wait until it gets an incoming tcp connection on port 5000 from any other IP address, whereupon it begins capturing video and sending it out.

    Then, on the laptop, create a V4L loopback device:

    sudo modprobe v4l2loopback devices=1 video_nr=10 exclusive_caps=1 card_label="Workbench"

    Zoom will then include a video source identified as “Workbench” in its list of cameras.

    Now fetch video from the RPi and ram it into the loopback device:

    ffmpeg -f h264 -i tcp://192.168.1.50:5000 -f v4l2 -pix_fmt yuv420p /dev/video10

    VLC knows it as /dev/video10:

    RPi - V4L loopback - screen grab
    RPi – V4L loopback – screen grab

    That’s the edge of the workbench over there on the left, looking distinctly like a cliff.

    The RPi will happily stream video all day long to ffmpeg while you start / stop the display program pulling the bits from the video device. However, killing ffmpeg also kills raspivid, requiring a manual restart of both programs. This isn’t a dealbreaker for my simple needs, but it makes unattended streaming from, say, a yard camera somewhat tricky.

    There appear to be an infinite number of variations on this theme, not all of which work, and some of which rest upon an unsteady ziggurat of sketchy / unmaintained software.

    Addendum: If you have a couple of RPi cameras, it’s handy to run the matching ssh and ffmpeg sessions in screen / tmux / whatever terminal multiplexer you prefer. I find it easier to flip through those sessions with Ctrl-A N, rather than manage half a dozen tabs in a single terminal window. Your mileage may differ.

  • Monthly Image: Mantis Mating

    Monthly Image: Mantis Mating

    The Praying Mantis in the Butterfly Bush is definitely female:

    Praying Mantis Mating - front
    Praying Mantis Mating – front

    I’d noticed her distended abdomen a day or two earlier, when it was highlighted in the sun and pulsing slowly. The indentations under the male’s legs shows the surface is definitely softer than the hard chitin of most insect armor:

    Praying Mantis Mating - rear
    Praying Mantis Mating – rear

    The tip of the male’s abdomen twisted around to make contact, but I have no idea what all the little doodads common to both of them back there were doing.

    The whole process started in mid-afternoon, they were still locked together six hours later, and the male was gone in the morning. The stories about female mantises eating the males seem greatly exaggerated, but she did manage to catch and eat a moth while otherwise engaged.

    We’ll keep watch for ootheca on the tall grasses again, although we’ll never know the rest of their story.

  • Cicada Time

    Cicada Time

    Even though cicadas are completely harmless, Mary was quite startled to discover one crawling up the back of her garden pants:

    Cicada - left front
    Cicada – left front

    It seems the cicada mistook her for a tree.

    They’re handsome creatures:

    Cicada - left dorsal
    Cicada – left dorsal

    They’re very conspicuous on fabric:

    Cicada - right dorsal
    Cicada – right dorsal

    I teleported it to a maple tree, where it was better camouflaged:

    Cicada - on tree - right
    Cicada – on tree – right

    When last seen, it was headed upward at a pretty good pace. We wished it well on its adventures …

  • Striped Hairstreak Caterpillar

    Striped Hairstreak Caterpillar

    Mary found this gadget gnawing holes in a bean:

    Striped Hairstreak Butterfly - caterpillar
    Striped Hairstreak Butterfly – caterpillar

    The lump on the right is frass, not a mini-me tagging along behind.

    We had no clue what it might be when it grew up, but Google Lens suggested a Striped Hairstreak Butterfly caterpillar and, later that day (and for the first time ever!), we saw an adult Hairstreak fluttering on a goldenrod in the corner of the garden.

    As with all caterpillars, you’d never imagine the adult butterfly. It seems they move their hind wings to make predators aim at the south end of a northbound butterfly …

  • Praying Mantis On Duty

    Praying Mantis On Duty

    A Praying Mantis has once again taken up watching over the Butterfly Bush:

    Praying Mantis - waiting
    Praying Mantis – waiting

    I made a slight noise that prompted an immediate weapons lock:

    Praying Mantis - attentive
    Praying Mantis – attentive

    We’ve watched her stalk and capture a bumblebee, as well as chow down on one of the myriad moths feeding on the bush at night.

    As always, if I were smaller, I’d be worried …

  • Monthly Science: Inchworms

    Monthly Science: Inchworms

    A Rudbeckia Black-eyed-susan coneflower from the garden carried a passenger to our patio table:

    Inchworm - linear
    Inchworm – linear

    Even linearized, the inchworm was barely 20 mm long; it’s the thought that counts.

    The stamens mature in concentric rings, each stamen topped by a pollen grain. Apparently, those grains are just about the most wonderful food ever, as the inchworm made its way around the ring eating each grain in succession:

    Inchworm - feeding
    Inchworm – feeding

    Of course, what goes in must come out:

    Inchworm - excreting
    Inchworm – excreting

    I had to brush off the table before washing it; the pellets are dry, but smear when you get them wet.

    Another flower in the vase held a 10 mm inchworm with plenty of upside potential:

    Inchworm - junior edition
    Inchworm – junior edition

    After nearly a week, the flowers were done and the inchworms had moved on. We wish them well, although we likely won’t recognize them in the future.

  • Monthly Science: Small Praying Mantis

    Monthly Science: Small Praying Mantis

    These Praying Mantis nymphs may have emerged from the ootheca I rescued from the grass trimming operation earlier this year:

    Praying Mantises in grass - 2020-07-24
    Praying Mantises in grass – 2020-07-24

    The closest one was about 60 mm long, with plenty of growing ahead in the next few months:

    Praying Mantis - 2020-07-24
    Praying Mantis – 2020-07-24

    A few days later, I spotted a smaller one, maybe 40 mm from eyes to cerci, hiding much deeper in the decorative grass clump. Given their overall ferocity, it was likely hiding from its larger sibs.

    They have also been stilting their way across the window glass and screens in search of better hunting grounds. My affixing their oothecae to another bush may have disoriented them at first, but they definitely know where their next meal comes from!

    Perhaps as a bonus, a Katydid appeared inside the garage, stuck to the side of a trash can that Came With The House™ long ago:

    Katydid
    Katydid

    I deported it outside, in hopes of increasing the world’s net happiness.

    The stickers covering the can say “WPDH: A Decade of Rock ‘n’ Roll”, suggesting they date back to 1986, ten years after (Wikipedia tells me) WPDH switched from country to rock. Neither genre did much for me, so I never noticed.