Categories
Uncategorized

Auto-generate animated GIFs from security camera footage with MotionEye hack

So I’ve set up several raspberry-pi based cameras around the house using MotionEye software ( https://github.com/ccrisan/motioneye ), and integrated it very simply with the smart-home software I’m developing for my startup to send near-instant notifications via our Google Hangouts chatbot. While it’s nice to get instantly notified of motion at the front door while I’m working upstairs in my office (so I can know when packages arrive!), sometimes I get false-postives from wind blowing the trees and things like that. And it takes a bit of time to load the built-in web interface and play back video clips. So I set out to find a way to create animated .gif files from recorded motion videos. I was able to get it working with a surprisingly easy hack.

 

08-01-53

This solution has a single added dependency which is “gifsicle” (it’s much faster than ImageMagick on the Raspberry Pi. Found here: https://www.lcdf.org/gifsicle/ ) which you can easily install on Raspbian via:

sudo apt-get install gifsicle

And then, the only remaining setup is to add this one-liner (!) to your MotionEye camera settings, under “File Storage” -> “Run a command”:

ffmpeg -i %f -vf scale=320:-1 -r 1 -f image2pipe -vcodec gif - | gifsicle --delay=10 -O2 --multifile --loop - > %f.thumb

(substitute “ffmpeg” with “avconv” for your setup if necessary)

Finally, make sure you have “Movies” and “Motion Detection” enabled for your camera as well.

Now when a new movie is saved, that command will automatically generate an animated GIF within a few seconds, and give it the same filename as the thumbnail previews that are normally generated on-demand when you open the playback option in the MotionEye web app. Unfortunately the downscaling method they’re using under the hood doesn’t handle animated GIFs properly, so in the interface it will look like this:

Screen Shot 2016-07-13 at 2.58.40 PM

But when you click on a recorded event you will see the full animated GIF play immediately, and you can use the left and right navigation buttons to instantly scroll through the GIFs of all your recorded events!

Screen Shot 2016-07-13 at 2.59.31 PM


Note: if you load the playback pane before the GIF has finished being generated, the default behavior of the web app will still generate a static thumbnail, possibly preventing the GIF file creation altogether. An alternative method would be to ouput the gif files to a different filename, and design your own interface for viewing them separately. Or, modifying the MotionEye interface to not generate the thumbnails, but I haven’t looked into that yet.

Categories
Uncategorized

Use Your Leaves!

Leaves in front of our house

I grew up thinking that these piles of leaves everywhere in the fall were essentially a nuisance. They attracted dog poop and were therefore potentially dangerous to play in. Yet fresh piles of leaves were definitely played in. And otherwise, that they just looked messy, and you had to spend all this time raking and sweeping them up just to have them hauled away by the street cleaner. No more!

As I’ve grown and watched more and more seasons pass with each trip around the sun, I have come to recognize the inherent value of leaves. In particular, they are possibly the best building block for making garden soil at home. Sure, plenty of people are composting their kitchen scraps nowadays, but how many people are actually using all of the leaves in their yard to make soil? I’d guess it’s less than 10%. (That’s a lot of trucking and hauling around of leaves that can be stopped!) Leaves contain a massive amount of captured energy, that most of us are letting go to waste. Composting piles can even be used for heating water!

I’ll recommend two or three methods for the soil conversion process today, depending on the volume of leaves you’re dealing with:

1. Small Amount of Leaves
If you only have a small amount of leaves, I recommend mixing them into your compost bin, which you should be doing already if you want good, fast decomposing compost. This is very easy and only takes as long as collecting your leaves and dumping them and mixing them in. Use compost as normal in your garden (as a natural fertilizer and microbiological booster)

2. Medium Amount of Leaves
With this method, you’ll use large plastic bags, like garbage bags will work, although I’ve seen clear plastic bags recommended so it doesn’t get too hot in the sun. The trick to making the leaves decompose even faster is adding a compost accelerant like EM-1 or Bokashi, which you can also make yourself. If you don’t have this, you can make something similar just by letting fruit and vegetable scraps ferment in a bucket, and then straining off the liquid. You dilute and spray the liquid into the bags onto the leaves, just enough to kickstart the decomposition process. After the bags have lost 50% of their volume, mix with additional soil in your garden and you’re ready to plant! More info here: http://bokashiworld.wordpress.com/2011/04/08/bokashi-leaves-a-bucket-full-of-soil/

3. Large Amount of Leaves
If you have a massive amount of leaves, it may not make sense to use so many plastic bags. I would recommend making a single huge pile of the leaves, which you can contain inside a wooden fence, or chicken wire, or just in the middle of a cleared area, and then cover it with a tarp. This will help the pile to heat up considerably, and the leaves will break down over a few months, although you may have to stir it up and wait a little into the spring if you get snow in the winter.

Additional options:
You may want to consider adding mycorhizal innoculant (mushroom spore powder, essentially) to the leaves as well, as this will help both break down the leaves as well as deliver nutritients to your plant roots once the compost makes it into your garden.

Categories
Uncategorized

OKC @ Warriors: Game winning shot video

Here are some video clips from Instagram (that I found on Twitter…)

And this is possibly what worked them up to it:

Categories
Uncategorized

Made Something Cool At The Food Hackathon This Weekend

Screenshot (11).png

This past weekend I had a good time meeting like-minded people at the first Food Hackathon here in San Francisco. The organizers billed it as “the first of its kind”, however I’m familiar with Food+Tech Connect in New York City so I’m not sure they can make that claim (see: 2010 eventbrite. Note the almost free ticket prices. Can’t quite say the same for the event we just went to… Paid hackathons? Not sure this is how it’s supposed to work…) Anyway, we still had a lot of fun participating in the madness.

My co-founder and I went to this event together with the idea of building a simple local foodsharing, fresh fruit and vegetable barter marketplace to help create a more accessible sustainable alternative to the very money-dependent food system we all primarily rely on every day to feed ourselves. However in the process of brainstorming a name for our fruit and vegetable exchange we actually found at least two pre-existing websites that we hadn’t found before and were the exact same thing we had been trying to find, and ended up deciding to try using those sites first and reconsider what to build for the Hackathon.

We teamed up with Luke Iseman of Growerbot (Kickstarter) and Garduino (Project), along with his girlfriend Heather to work on his idea for building an online game similar to the mega-popular FarmVille (Facebook game by Zynga) but In Real Life. So like, you earn points (“Seeds”) for actually planting plants in your garden, and earn more points for uploading pictures and checking on your plants and posting measured growth values regularly. It’s called “Seed Mogul” and the goal is to encourage more local, independent, and distributed food production with an addictive and truly rewarding game. One of the parts of the idea that I really liked was his plan to actually allow users to “cash in” their “Seed” points for actual heirloom seeds that they would receive in the mail and use in their garden.

You can see what we built here (You just sign in with Facebook, just like FarmVille). Unfortunately we did not win any of the competition categories at the Hackathon. We probably could have made it a little more polished. But a lot of the key functionality is there. I’m realizing now that we could have also made a stronger case in our final pitch presentation for how this fits into the larger picture of the food sustainability movement and the efficacy of hyper-local fruit and vegetable production as a truly viable alternative food system model. In any case, feel free to sign up and check out our game! We’re hoping to see if anyone’s interested before working further on it. Most of all, James and I are very happy to have met Luke and Heather, and foodclouds is looking forward to possibly working together with Luke more in some fashion in the near future.

Categories
Uncategorized

How To Pair Samsung 3D Glasses to TV When They Don’t Want To Pair

So we just bought a bunch of replacement 3D glasses for the TV we got on craigslist. I followed all the instructions I could find, which all pretty much said the same thing:

Turn the TV on.
Start playing something 3D or turn the 3D mode on.
Press the Power button on the glasses, and wait for them to connect.

Well, that wasn’t working for me. After about an hour of research, I came across the solution! You have to unplug the television from the wall for at least 40 seconds (wait for the red TV power light to go off in the front), and plug the TV back in and retry the above procedure.

Apparently this resets the bluetooth(?) receiver in the TV. Good luck!

Categories
Uncategorized

How Do You Sleep At Night?

Do you ever worry about the problems in the world? Would you consider yourself “concerned” about Global Warming? Do you ever wonder what your daily actions are contributing to the bigger picture? Are you comfortable with the way you are living now or is it a guessing game of greenwashing and faux sustainability? I’m here to blast through all the bullshit and get back to basics with you, right here right now.

So basically, here’s what you want to do…

In the words of Mahatma Ghandi: “Be The Change”

And in the words of Marie Curie:

“Nothing in life is to be feared, it is only to be understood. Now is the time to understand more, so that we may fear less.”

So read up! Educate yourself. And do everything that you can live your life in a way that affects the most positive reality around you.

My suggestions? Meditate. Breathe deeply. Focus on what you can change. Drink water. Eat for nutrition. (Raw Vegan is best). Give yourself rest. Love often.

Blessings!
+Rex

Categories
Uncategorized

David Guetta – Where Them Girls At #electronic #hip-hop #dance [Music Video]

Categories
Uncategorized

NYC HDR


“my world is CHROME. here is some of the stuff i’ve been shooting around town.”

From NYC HDR, posted by Rexford William Pechler on 3/03/2011 (29 items)

Generated by Facebook Photo Fetcher


Categories
Uncategorized

7 Ways To Fundamentally Lower Your Food Costs

It all starts with changing where and how you get your food. Go someplace else or just bring a different approach!

  1. Grow Your Own.
  2. Buy In Bulk.
  3. Bargain.
  4. Cook.
  5. Share.
  6. Forage.
  7. Get it for free.
    + Bonus

http://www.youtube.com/watch?v=uO8AiKJeOlw

Full details after the jump.

Categories
Uncategorized

Building an Eco-Village

I started thinking about founding an eco-village about a year ago, and since then I’ve been researching various sustainable technologies and looking for land and partners. In the meantime I’ve found/built a network of interested people, and may have just found some potential land in New Mexico!

The goal is to create a place from the ground up, building shelter with straw bales, growing almost all of our own food. No septic tanks, no sewer systems, no paved roads. The ideal situation looks something like the garden of eden, lush edible foliage and abundant fruit trees. By fully embracing natural methods we can decrease the cost of living significantly by greatly reducing the cost of housing and food. To foster entrepreneurship and build a new community based on these fundamental principles of sustainability. And to show off and share our efforts and methods with the world through YouTube, media coverage, partnerships, and social networks.

Recently I left my job to focus my time on this project…

Example Eco-village Depiction

What does it look like?

When you first get to our eco-village, you find a large mud-covered building called the Better Earth Institute. This is a community center where we research sustainable technologies and hold community meetings and events. Next to the Institute there is a dormitory for interns and visitors. We’ve started building a neighborhood of houses across the courtyard.. All around there are young fruit trees growing vigorously. Patches of edible greens are everywhere around your feet. Berry bushes can be seen lining the pathways. Beyond the houses you can see a soccer field, and a series of greenhouses constructed out of wood and metal and plastic sheeting. You will also find an outdoor event center for summer music concerts, and film screenings. Not to mention, lots of lovely, happy, healthy people everywhere!

Here are some of the sustainable technologies I’m excited about:

  • Permaculture
    This is term (coming from “Permanent” + “Agriculture”), is a general farming/lifestyle principle that embraces natural systems, paying attention to combinations of plants to design a system that minimizes the need for manual labor like weeding, and at it’s best, creates an environment that is self-maintaining and provides perpetual abundance (for example, a combination corn field that replants itself every year). I’ve been studying this for a few years now, and I’m very excited to start putting it into practice.
  • Composting toilets
    Check out the book: Humanure.  Our human waste makes a fantastic fertilizer, and composting toilets are a sanitary and highly efficient way of making the most of what would otherwise be polluting waste.
  • Rainwater harvesting
    Rooftops make excellent rainwater harvesting. Permaculture gardening techniques can also be used to absorb as much of the rain into our soil as possible, instead of running away into a stream.
  • Solar water heating
    For showers, hand washing, etc!
  • Graywater treatment / recycling
    Drainage from showers, kitchen/bathroom sinks will be collected into a series of living water treatment tanks that house fish, beneficial bacteria and other micro-organisms that process and filter the water.
  • Organic Hydroponics
    Hydroponics can be used to simplify food production.
  • Year-round greenhouses
    By growing certain foods indoors, we can provide for ourselves year round. Greenhouses will be heated in the winter with active indoor compost piles and large water tanks that retain heat with thermal mass.

Funding
How are we going to pay for it all? Well, we have an initial committed group of about 12 people and together have some amount of savings to get started. We’re looking for a grant to help us build the initial Better Earth Institute center, and will be also accepting donations for that cause. Beyond that, membership in the eco-village will require some combination of labor and capital, following the model of Habitat for Humanity that requires home recipients to invest 300-500 hours of labor in the construction of their home, providing a foundation for strong community relationships in the process.

I’m now putting together a 501c3 non-profit educational organization called Better Earth Institute to provide the legal framework for this enterprise, with the stated mission of:

Researching and sharing methods to reduce the environmental and monetary cost of living by fully embracing and augmenting natural systems and embodying the spirit of entrepreneurship.

If you’re interested in getting involved, please donate and/or come join us!
Questions? contact me, or leave a comment below.