Tag: Computers

Thursday Quote: Gianni Tedesco

March 8, 2012 » Geek

“Until one understands the difference between pressing a button and seeing a light turn on as compared to the immense void of a blinking prompt that asks us to “imagine any possible mechanism” then our educational process is, medical ultimately, recipe in vain.”

– Gianni Tedesco
All your metaphors about computers are wrong

Thursday Quote: Chris Stout

February 3, 2011 » Geek, Life

“Sometimes, people who say they’re “bad with computers” or “just can’t figure this out” are simply lazy.”

– Chris Stout

Thursday Quote: Matthew Inman

December 31, 2009 » Uncategorized

“Watching someone else use your computer is like watching a drunk orangutan solve a Rubix cube.

– Matthew Inman, mind The Three Phases of Owning a Computer

Tags: ,

Hard subs with mencoder, or, annotating screencasts for free.

December 2, 2009 » Geek

I was working on a screen cast for a project and I could not get anything to work the way I wanted to. I didn’t have the desire to purchase software, so I sought a way to annotate it for free. I tried a half dozen free and open source video editors, with no real luck. Either they choked on the format I captured (from CamStudio) or they didn’t have a readily available inline text tool.

What I ended up using was plain old subtitles, plus the handyman’s secret weapon, mplayer/mencoder.

Here’s what I did. I fired up the video in VLC and found the points where I wanted to put my subtitle help text. Subtitle files are usually pretty straight forward. I chose the .srt format, which is plain text. You can edit by hand, or you can use a tool, I used the aptly named subtitleeditor. Which, by the way, barfed on my video file.

Here’s a snippet of the resulting .srt file:

Next I needed to turn those “soft” subs into “hard” ones. This is where mplayer/mencoder come in. To add soft subs to a video in mplayer, you use the -sub option. Running this in mplayer first is a good way to see how it will look at tweak it according to the many options you have. I went with the defaults, it looks pretty good that way.

Lastly, I needed a good mencoder recipe to pull it all together. After lots of searching I found a great MPEG4 one here.

It’s a two pass system, and the crucial piece is in calculating the bitrate:

My bitrate was 2540600. After you get that, you just plug it into the two passes below. This includes my subtitle options.

It takes a while but not too long. When all was said and done I had a perfect hard-subbed version and it shrank my file size from ~550MB to 7.6MB. That is a great encoding recipe.

Average video still.
An average frame, with hard subs.

Great bash calculator

November 3, 2009 » Geek

I spend a lot of time on the command line, shop and one thing I run up against every once in a while is doing math. I normally jump through the bc hoops, malady but today this bit came through my feed reader.

Just drop it into your .bashrc, .alias, or whatever else you use.

Great solution using existing tools, props to TinyHacker.com for this one.

Tags: , ,