June 2007

SSL support for Apache in my prefix-portage overlay

I’m working on getting our Rails-based app, at work (OBT - obtech.net), working with SSL.

Since we all use OSX as our main dev boxen here, as well as Gentoo Linux machines, I long ago started hacking and helping on the Gentoo-Alt Prefix Portage project, so that I could help create one software repository we all use here. I found it very time consuming, before hand, to help other devs install and configure pieces of software every time they needed something — they’re not n00bs or anything, just UNIX CLI stuff isn’t their usual cup of tea.

I’m in the process of (re-)becoming an official Gentoo developer, focusing on Prefix Portage this time (last time was GNUstep). Until that goes through, I have a prefix-portage overlay, which is accessible through layman, or you can use SVN to check it out at http://www.dicianno.org/svn/PrefixPortage/branches/overlay-fafhrd/.

So, to summarize the point of this post, shortly, I got SSL support working in the Apache ebuild that was already in my overlay, at least on OSX. So, get to it!

Gentoo
OBT

Comments (0)

Permalink

Creating stream-able video

I spent much to much time trying to figure out the right combination of video/audio encodings that would would from an RTSP streaming server (went with a RealServer demo, for now) to a variety of clients (QuickTime Player, VLC, various phones, etceteras.)

First, VLC is a champ. Every time I tried a new streaming server, VLC could play the stream with video and audio. QuickTime Player was not so kind. Even the phone we were streaming to — the Nokia N95 (tech specs) — could play streams that QuickTime Player could not.

I tried a variety of tools, from the venerable ffmpeg to QuickTime Player’s export functionality to create stream-able videos (mainly for QuickTime, since it was being very picky). The tools I used were the following:

Here is a simple bash loop I made to iterate over .mov’s in the current directory and create MPEG4 video, MPEG4 audio (AAC LC), in an MPEG4 container that was hinted. You should set FRAMERATE and SIZE (as “WxH”) as environment variables. Note that the first line has -ac 1 which sets the audio to mono. Also, edit the -qscale to your liking (or remove it).

Code (bash)
  1. for i in `ls *mov –color=never`; do
  2.   ffmpeg -i $i -ac 1 -vn "$i.wav"
  3.   faac –mpeg-vers 4 –tns -o "$i.aac" "$i.wav"
  4.   ffmpeg -re -i "$i" -pass 1 -passlogfile "${i}pass" -vcodec mpeg4 -r $FRAMERATE -s $SIZE -qscale 8 -an "$i.m4v"
  5.   rm -f "$i.m4v"
  6.   ffmpeg -re -i "$i" -pass 2 -passlogfile "${i}pass" -vcodec mpeg4 -r $FRAMERATE -s $SIZE -qscale 8 -an "$i.m4v"
  7.   mp4creator -c "$i.m4v" -optimize -rate=$FRAMERATE "$i.mp4"
  8.   mp4creator -hint=1 "$i.mp4"
  9.   mp4creator -c "$i.aac" -interleave -optimize "$i.mp4"
  10.   mp4creator -hint=3 "$i.mp4"
  11.   mp4creator -list "$i.mp4"
  12. done

OBT
QuickTime
cli apps

Comments (0)

Permalink

Misha is wrong

This is a video from my company’s internet video service.

OBT
general

Comments (1)

Permalink

Rails and “legacy” DB’s

I’m importing a (so-called) “legacy” db, and was having some issues with creating associations because the primary key wasn’t named id. To fix this, simply use set_primary_key on the class, and then use foreign_key to create associations between classes as usual.

Code (ruby)
  1. class LegacyDatabaseTable < ActiveRecord::Base
  2.   set_primary_key :this_is_not_named_id
  3.   # …
  4. end

rails

Comments (0)

Permalink

The Pandava sons are the chakras

Even though I’m a self-admitted hinduphile, and am — at best — a student of traditional ashtanga yoga (yeah, the 8-limbed tree / 8-fold path, not “power yoga”), I’ve never been a big believer of kundalini, that is: the flow of spiritual energy back up the spine; the spine often symbolized as a serpent, and kundalini is that serpent uncoiling itself.

Well, I’m reading “The Essence of the Bhagavad Gita” written by Swami Kriyanada. The book is his retelling of his time listening to Paramhansa Yogananda as that great guru-to-many was writing his own commentary on the Bhagavad Gita.

I just read an interesting passage that basically showed the connection in allegory between the Pandava sons (of the Mahabharata, the great epic) and the 5 chakras / energy centers. It breaks down like this:

Sahadeva coccyx center (muladhara)
Nakula sacral center (swadisthana)
Arjuna lumbar center (manipura)
Bhima heart / life-force center (anahata)
Yudhisthira throat (bishuddha)

I find it so terribly intriguing that Arjuna represents the first of the non-lower chakras. “Lower” here is not a socialized term, to me. There is nothing “low” about the chakras that reside around or near the anus or the sex organs. However, those two chakras do represent the two most common issues people have (in my opinion): feeling grounded / having a base, and their sexual expressiveness. Further, it’s not really those areas that one has issues with, but it’s obsession and attachment to those things.

Anyways, so there Arjuna is seated. At the beginning of the higher path; still unsure of himself and where he is going, as he tends to be and do, but looking upwards, away from the pettiness of attachment.

yoga

Comments (0)

Permalink

MPEG4 Streaming whoas

I should right a whole post about the lack of robust video streaming servers, but I’ll save that for another day. For now, I’ve settled on RealServer (RS) (which is the commercialized version of Real’s open source Helix Server), and video actually streams to a plethora of apps, including: QuickTime Player (QT), VideoLan Client (VLC), various phones, etceteras.

So, what’s the deal with MPEG4 streaming?

Continue Reading »

Linux
QuickTime

Comments (0)

Permalink

New lamp

My cat destroyed my old pharmacist-style lamp last week. I decided to replace it with a floor standing lamp with shelves.
new_lamp
… I give it a week before the cat destroys this one, too.

general

Comments Off

Permalink

built-in iSight on my MBP can’t record video

Somehow, my MBP’s install is messed up, and the built-in iSight camera cannot be read from in video mode — but yet, still pictures work. I discovered this, as I could not get QuickTime Broadcaster’s preview view to show any video (or for it to broadcast). Then, I discovered that iChat cannot initiate any video chats with anyone.

I have no clue how this problem started. Part of me wants to blame Darwin Streaming Server. I have it turned off, so I no it’s not a conflict with it running, but part of me wonders if just installing it messed something up.

I really don’t want to reinstall OSX. *sigh*

MacBook Pro
OSX
QuickTime

Comments (0)

Permalink

Let’s see if I can do this …

I’m trying to once again actually use my blog. There’s so many exciting things going on related to work and life that I feel I need to talk about it. And about work …

Continue Reading »

general

Comments (2)

Permalink