19 April, 2007

Milk does the muscles good

Just a small bit of interest... a new study suggests that skim milk is far more likely to promote muscle growth than alternative soy supplements. It's something to do with differing types of protein. While soy does have sufficient protein to keep you healthy, it isn't as helpful as casein for building muscle mass. Now that I've started working on building muscle, maybe I should be drinking more milk...

Anyhow, here's the article: http://www.cnn.com/2007/HEALTH/diet.fitness/04/19/skim.milk.reut/index.html

Social Networking

It seems to me that social networking is getting somewhat out of hand nowadays. Personally, I've got accounts on Blogger, last.fm, MySpace, Flickr, LinkedIn, Facebook, Hi5... and I can't even remember others I may have signed up on in the past. This is just ridiculous. Worse yet, on most of these accounts, I have very similar friend lists. Other people I know who have signed up on some or all of these sites. So when does this all end? Does it ever end?

Now granted, some of these sites have definite differing purposes. Blogger is more for pouring out your thoughts as I'm doing now, than for networking. But there is still that social aspect to it. Flickr is for sharing photos... but again, it has a very community-based design, and it's becoming more so all the time. Last.fm is about tracking music listening habits and discovering new music... but it also has a very social aspect to it: friends, "neighbours", forums, groups, etc. Still, why do we need ALL of these sites? Despite all of the ones I have an account on, I know there are far more that I still haven't signed up on!

It's actually starting to get pretty frustrating keeping up on all of these... what I need is some method of consolidating all of this collaboration into one single point of contact. Some method for keeping up on all of them from one central system. I'm trying out this Flock web browser in the hopes that it would provide something of the sort, but no such luck. It provides an easy interface for blogging (which I'm using right now) and drag-and-drop uploading for Flickr images... but that's about it. What I'm looking for is... a control panel or command center of sorts, for all of my social networking and collaboration sites. Some way to get an overview of what's happening on all of those accounts, without having to log in and load them up individually. I want to be able to "link" friends on different networks, so that I can see who I have added where. Hmmm, perhaps this calls for a brand new website... SocialControl, or something of the sort. Couldn't hurt to try. After all, my contact page is getting way too cluttered with all of the sites that I'm on now. Now this is an idea I may have to run with.... does anybody else have any input on this? Similar thoughts? Does this seem like something that might be useful?

On a side note, I noticed a very important feature missing from that Flock browser as I was publishing this post. It doesn't let you tag your post... I had to come in and do that by hand after the fact. Oh well, not everything can be perfect.


UPDATE: 3 hours later, I decided to do a quick google search for something along the lines of what I was thinking, and I came across The Internet Address Book. Could this be something useful? It's apparently been out since September '06, and I've never heard of it before, so I'm guessing it's not faring as well as most of the network it claims to connect to. On the other hand, from what I see so far, it doesn't so much connect to these networks as simply lists your IDs on them. I was definitely thinking of going beyond that. More to come later... perhaps?

30 March, 2007

Encoding Flash Videos

One of our clients recently sent us a video that they want to have displayed on their website... and we've decided that the best option would be to use an FLV (Flash Video) file. We're also going to be using the same video format for an upcoming site of our own... one small part of the site will have uploaded videos, so they will need to be automagically converted to FLV. This sounds simple enough, right? Sure, it should be.

Turns out it's not all that simple.

After lots of trial and error, I came up with this command:
mencoder -vf scale=216:144,hqdn3d -af resample=44100:0:2 -hr-edl-seek -ovc lavc -lavcopts vcodec=flv:vqmin=3:v4mv:vmax_b_frames=0:vme=4:vqblur=0.0:tcplx_mask=0.2:mbcmp=6:trell:cbp:naq:dia=2:aic -oac mp3lame -lameopts vbr=2:q=5:aq=0:vol=2:mode=1 -ofps 10 -of lavf -lavfopts format=flv:i_certify_that_my_video_stream_does_not_use_b_frames dvd:// -o test.flv

Finally, I got a decent quality encode, with a decent file size, and not too ridiculous of an encode time... about 45 seconds encoding time for 1 minute of video. This was, however, on an already-busy 1.6GHz Pentium Mobile with 1gb RAM.

Now all I need to do is find another switch or perhaps another command to detect the video resolution and automatically maintain the proper aspect ratio when downscaling it... with that command, I scaled 720x480 down to 216x144 (0.3 times the size), but I had to pull out a calculator and figure out those numbers by myself... that doesn't work with an automated process. Oh well, one step closer at least!

Hell, I could make my own YouTube or Google Videos equivalent with this.... nice!

UPDATE:
Okay so, a couple frustrating hours later, I've finally got this down pat. I was getting some very nasty distortion on parts of the video... turns out that was due to the "tcpl_mask" option... according to the mencoder manpage:
Temporal complexity masking (default: 0.0 (disabled)). Imagine a scene with a bird flying across the whole scene; tcplx_mask will raise the quantizers of the bird’s macroblocks (thus decreasing their quality), as the human eye usually does not have time to see all the bird’s details. Be warned that if the masked object stops (e.g. the bird lands) it is likely to look horrible for a short period of time, until the encoder figures out that the object is not moving and needs refined blocks. The saved bits will be spent on other parts of the video, which may increase subjective quality, provided that tcplx_mask is carefully chosen.
In theory, it sounds like a great option. It could potentially add a lot of compression.... in reality, it barely effected the file size at all, and it cause all kinds of headaches. Along the way to finding this, however, I did find some other useful video filters, and I learned a bit more about encoding videos. (I thought for some time that it was possibly interlacing or interleaving that was causing the problems... so I ended up reading up on them, learning exactly how they work and what they do... only to realize there was no way they were guilty). I also managed to find that magic switch to automagically scale the video. I just have to specify one dimension now and it figures out the matching dimension... I love it! So, finally, here is the fully functional, heavily optimized version of that command:

mencoder -vf pp=h1/v1/dr,scale=216:-3,harddup -af resample=44100:0:2 -hr-edl-seek -ovc lavc -lavcopts vcodec=flv:vqmin=3:v4mv:vmax_b_frames=0:vme=4:vqblur=0.0:mbcmp=6:trell:cbp:naq:dia=2:aic -oac mp3lame -lameopts vbr=2:q=5:aq=0:vol=2:mode=1 -ofps 10 -of lavf -lavfopts format=flv:i_certify_that_my_video_stream_does_not_use_b_frames dvd:// -o test.flv

Yay! My work is done here.

27 March, 2007

Self.

I've recently been reading another novel by my favorite author, Robert Heinlein. This one, titled "To Sail Beyond The Sunset," is rather interesting. It's the account of one Maureen Smith's life. At least, that's what it has been so far. Considering that I'm about 2/3 through the book, I think it may well continue along this line. Anyhow, it's quite interesting to me as I've already read several of his other books, and this is giving me quite a bit of background and insight into some of the past of his worlds, his timelines and his characters.

But none of that is really the point I'm getting at here. In reading this book, I found a very interesting quote. I had to read it over at least three times before I really got it. And it really made sense.

"Gratitude": An imaginary emotion that rewards an imaginary behavior, "altruism." Both imaginaries are false faces for selfishness, which is a real and honest emotion. Long ago Mr. Clemens demonstrated in his essay "What Is Man?" that every one of us acts at all times in his own interest. Once you understand this, it offers a way to negotiate with an antagonist in order to find means to cooperate with him for mutual benefit. But if you are convinced of your own "altruism" and you try to shame him out of his horrid selfishness, you will get nowhere.
Damn, he's right. I've never been terribly interested in reading Mr. Clemens' works in the past... but the more references I pick up from Robert Heinlein's works (and they are plentiful,) the more I'm intrigued. He sounds like as much of a cynical bastard as myself. Perhaps more... that's a scary thought. Either way, I think I may need to get ahold of some of his writings. Especially this particular essay, "What Is Man?"

19 February, 2007

Selective Racism

If "racist" terms offend you, I would recommend tuning out now.

Alright, now that the warning is out of the way, I can get on with my rant. This is another of my "why I hate people" rants. See, it started out yesterday when I went to see a movie. It was "The Departed", a movie about corrupt cops in Irish Boston. Original, I know. Pretty good movie anyways. So, being set in Irish Boston, dealing with organized crime, they start off right away talking about "guineas". For those of you who may not know, guinea is a derogatory term for an Italian. I laugh the first time I hear the term, and not a single other person in the audience seems to even notice it. Now at this point, I should mention the people sitting in front of me. In the row directly ahead of me is a black woman, and in the row ahead of her are two more black women. Nothing against them, it's just vital to the story. Alright so after a couple minutes of Jack Nicholson talking about guineas, he also uses the word "nigger". And oh boy was there a reaction to that one! The woman directly ahead of me said "I don't like this so much already," or something along those lines. A bit of hooting at the screen, general disgust at the use of the word. The movie goes on, lots more talk of guineas, he had to have used that term at least 20+ times throughout the movie. At one point, he also used the terms "mick" (Irish) and "chink" (Chinese); again, inciting laughter from me and no reaction from the rest of the audience. Then he says "nigger" again. More disgust and hooting from the rows ahead of me. Oh and did I mention the vacuum that was created by every white asshole in the theatre puckering each time that word was mentioned?

So let me get this straight. You can say "guinea", you can say "mick", you can say "chink" and nobody cares. They could have probably even gotten away with dago, wop and goombah without a hint of notice from the crowd. But as soon as you say "nigger", everybody is up in arms. This makes absolutely no sense to me.

Honestly, I don't really understand "racial slurs". They're only offensive if you take offense. I'm Irish, I call myself a mick and laugh about it. I'm white, I call myself cracker, whitebread, honkey and again I laugh about it. One of my best friends in high school was Chinese and Vietnamese. He got called to the principal's office one day because he was walking through the halls, chanting "I chink I can, I chink I can..." When he was in there, the principal told him that he couldn't use racial slurs. His reaction? "How can it be a racial slur? I AM a chink! A slanty-eye! A gook!" And he's right. It's not a slur, because he takes no offense.

Our society has turned into a bunch of coddled pussies. Hasn't anybody ever heard the old saying "Stick and stones may break my bones, but words can never hurt me." Get over it, people.

09 February, 2007

I fought the law...

...and I won? Irrefutable proof that The Dead Kennedys had it right with their version of the song.

I love the intarweb.

01 February, 2007

The terrorists have won.

http://www.cnn.com/2007/US/01/31/boston.bombscare/index.html
http://www.cnn.com/2007/US/02/01/boston.bombscare/index.html

I give up. I used to have some glimmer of hope for humanity. That's all gone. My absolute favorite quote, from this additional article, reads:
"It is unconscionable that in this post-9/11 environment that Turner Broadcasting would do something like this in an urban setting," Boston Police Superintendent Ed Davis said.

Wait wait wait .... "post-9/11" environment?!?!?
Hold on, let me think for a second, do a bit of math here... They're talking about September 11, 2001... today is February 1, 2007... that makes it 5 years, 4 months, 20 days. Nearly 65 months. 1969 days. You get the point. A LONG FUCKING TIME! By the same right, this is a "post-WW2 environment", a "post-Great War environment"... hell a "post-Civil War environment!"

I don't really know where I'm going with this... but this crap makes me both very angry and very sad at the same time. It's just pathetic.