fognl

Get off my lawn.

Sunday, November 06, 2011

How to use the LookSee Encoder API

A few people have been asking about how to use the LookSee Encoder API, so I thought I would post something about it. I hadn't really planned on other people wanting to use it, but apparently I'm not the only person who wants to encode a video out of a series of JPG images.

LookSee Encoder
LookSee Encoder is essentially a slimmed-down FFmpeg implementation that runs on Android. It can encode a video from a series of images, create a series of images from a video file, and convert videos between formats. It's packaged as a standalone application that you download to your device. Once downloaded, an application communicates with it via broadcast Intents. Some example code illustrating how to use it can be downloaded here.

Note:

  • If you're encoding a series of images into a video, be sure and name the image files sequentially as 9-digit 0-padded numbers, for example 000000005.jpg. The numbers cannot skip. FFmpeg finds the files to include the video as "%09d.jpg". It will run through the list of files in sequence until it can't find any more files. If the file names skip a number (e.g. 000000005.jpg, 000000007.jpg), FFmpeg will stop at #5.
  • Following the link to LookSee Encoder, you'll notice a low rating. This is the result of a total of 1 rating from someone named "kristhian" who tried to convert a 2-hour movie on his Android device. It took a very long time. If kristhian had tried to perform the same task on a dual-core desktop PC, it's likely it would have taken more than the hour he complained about. Honestly, I hadn't considered someone trying to convert a feature-length film with it. So, just a note. If you write an app that handles long videos, you might want to warn the user about the time required to extract all the frames from Lord Of The Rings.
If you want to see LookSee Encoder in action, try LookSee Animator or LookSee Draw.

Saturday, September 03, 2011

Monday morning before last, I wrecked my car, an '01 Acura Integra. I was driving down a rural highway on my way to work like I do every morning, when an 80-year-old man crossed the road in front of me. He had no idea I was there, and I had no time to react. I hit him at about 45mph, and totaled my car.

The strange thing is, I was actually driving it to work just that one day that week. I had a meeting scheduled with a guy I was going to buy another car from, a Civic hatchback that I would use as a commuter car so I could keep the Integra in the garage and "save" it. I figured if it spent the majority of its time in the garage, it wouldn't get worn out, stolen, scratched, etc. I guess I took care of that problem...

I got several injuries out of the wreck. I broke my heel (surgery is coming up next week), bit through my tongue, cracked a rib, got stabbed in the knee by my ignition key, and got a mild concussion. But for some reason, I keep thinking of the loss of my car as the worst part of the whole thing. Maybe that will change after I've spent 3 months on crutches struggling to do simple things like carrying a cup of coffee while I walk. Who knows? 

Anyway, I had the car for 6 years, and drove it almost exactly 100,000 miles during that time. It had 45,684 miles on it when I got it, and it had 146,548 miles on it when it died. During that time, I took it on a few trips, drove it back and forth to work, washed it, serviced it, and had a lot of fun driving it. It was quick for a FWD 4cyl. car, sounded good, and never left me stranded. I got to where I enjoyed the Saturday or summer-evening ritual of pushing it out of the garage, opening the hood, looking around at things, and making sure everything was working properly.

It was just a piece of machinery, but I'm going to miss it.


Saturday, July 30, 2011

Quick and dirty distributed Git repository

A friend told me about a cool trick for using DropBox as a distributed Git repository, and I adapted the approach for use with Ubuntu One.

In your ~/Ubuntu One directory, do this:

mkdir -p repo/myproject
cd repo/myproject
git init --bare

Then in your project directory, do this:

git remote add uone $HOME/Ubuntu\ One/repo/myproject

Now, when you want to push changes to your Ubuntu One directory, just do this:

git push uone master

...and it will be shared according to Ubuntu One's upload settings.

You can share your repo directory with others, and they can get your changes by doing this in a project directory (once their sync directory is populated with the shared folder's contents):

git clone $HOME/Ubuntu\ One/repo/myproject

...and that appears to be it.

Obviously, it's not what you'd typically do for a big project, but for small things you want to share with specific people, it works pretty well (not to mention providing a handy backup).


Thursday, February 10, 2011

Blogger for Android

Cool... a blogging app for Android just appeared. Test 123...

Wednesday, October 20, 2010

Greed 2: Dark Theme

I just posted a Greed update that adds a "Dark Theme" option in the preferences. When selected, the article list and article viewer switch to a dark theme, better for reading at night.

Note that the article viewer does this by manipulating the styles in the HTML it's displaying in articles. This means that it works for the most part, but there will inevitably be some pages that display in their original colors, since the HTML contains style rules.

Saturday, October 16, 2010

Greed 2: Initial Signup screen

A co-worker downloaded Greed today while I was sitting right beside him in an iPhone programming class and tried to log into it. He got his credentials wrong, and Greed locked up. So I decided to fix it. It turns out I had done something kind of stupid at the point where an authentication attempt had failed. Having removed the offending code, it appears to work better.

Wednesday, October 13, 2010

Greed 2: Oops

I just realized (thanks to Fnord) that I had been running an updated version of Greed on my phone, but hadn't pushed it to the Market yet. Oops!

This version removes an unneeded permission for the phone (making calls, which actually never get made), and an issue with the feed list going black and not loading. I've been running it for months, and didn't realize I hadn't updated it so everyone else could use it.