Saturday 28 August 2010

Online Stalking: it's not the ISPs Fault.

The BBC is running an article about how ISPs are 'thwarting' a crackdown on online stalking. Apparently, they should not only deliver Internet connectivity (their job), they should also police it (not their job). It's like saying that the makers of paper should be responsible for what's written on it, or that the makers of envelopes should be responsible for what's delivered in them.

Of course, what's barely mentioned is that you should be very careful about personal details that you post online. Do NOT post details of your current location, places where you can often be found, your home address, your phone number, etc. Doing so is just asking for trouble, and blaming the ISP—even when social networking sites (still not the ISP) encourage you to yield such information—is equivalent to blaming manufacturers of junk food for forcing you to eat rubbish by making appealing adverts.

The last thing we want is ISPs policing Internet access according to a private set of rules formed by a mob committee. I'm even wary of the Law of the Land applying to the delivery of content (the hosting is another matter). It's a slippery slope when your government gets used to being able to filter content that it finds objectionable.

Friday 27 August 2010

h264 is not Free

With news of the sudden royalty free amendment to the h264 license by the MPEG LA sweeping the web, it's easy to forget that this actually changes very little, indeed. You now won't ever be charged for viewing free video on the Internet.

You will still be charged for distributing an h264 encoder or decoder.

This means that if you're someone like the Mozilla group, you can't include h264 support for the HTML5 <video> tag without paying hefty royalties for the privilege. You might wonder what the problem is: surely it's right that one company licenses the right to distribute the technology of another? No. Not when it comes to the Web and the standards that underpin it (such as HTML5). Paying a royalty to take part in the Web defeats the entire point of an open internet, where ideas can be freely exchanged using the promise that the base standards are available to everyone on a royalty-free basis.

There's some sanity on this 'sweeping change' from the MPEG LA at Create Digital Motion.

H264 is not the only codec out there. You can distribute the encoders, decoders and content with WebM/VP8 and Ogg/Theora without restriction.

Use 'em.

Wednesday 25 August 2010

Being an Ex-Catholic Atheist at a Catholic Funeral

My gran died last Thursday. At 88 years old and of frail health, her increasingly common mental lapses meant that it wasn't unexpected when it happened, but nothing quite prepares you for that phonecall.

Her funeral was today, attended by the two generations behind her—probably the best turnout at a family gathering for many years. Religiously, my family is traditionally Catholic, at least in name. We traditionally only see the inside of a church at funerals, with weddings being secular affairs and not much interest in baptising our children. Still, if you were to ask my sisters, aunts, uncles or cousins what religious affiliation they belong to, it'd be Catholic.

As far as I know, I'm the only openly declared atheist. Before going on, the reason I left the church is simply because I couldn't reconcile my beliefs about how to live a good life with what I was reading and being taught. I have no stories about abusive priests, psychological trauma induced by images of hell, or any of the stuff that commonly makes it into the Reasons to Hate the Catholic Church™.

So the ceremony itself was a little weird. Having gone through Catholic education, I knew exactly what to say at what times, and when to stand, sit or kneel. It's slightly odd that I remembered the prayers: they must have been burned into my brain when I was a boy.

But, aside from standing and sitting and that shaking of hangs thing they do prior to communion, I didn't do any of it. I didn't recite or respond to the prayers, sing hymns, bless myself with water, bow my head or press my hands together in front of me. While the priest was asking people to honour god, I was instead remembering my gran.

When I was paying attention to what the priest was saying, the thing that generally struck me was the occasional reminder that we're born sinners, achieving grace only through Christ. There was even a dig at non-believers in the reading from the book of 'Wisdom', where we are collectively labelled as 'fools' for believing that death is the end of a persons life.

As a foolish non-believer, what I found very odd was the tinkling of bells by the altar boy when the priest blessed and raised the bread and wine, a process which—according to believers—transubstantiates them into the actual body of blood of Jesus Christ. The communion itself seemed similarly strange, with people treating these little, mass-produced flecks of unleavened bread with such incredible solemnity. Knowing that most of the congregation in front of him probably hadn't communed in years, and bearing in mind the Catholic no-no about taking communion with a sin-stained soul, the priest offered blessings to those who remembered enough of the dogma to stay away because of that.

With with mass almost at its end, all that remained was to sprinkle 'holy' water over the coffin and wreath it with smoke from burning incense. This done, the coffin was taken to the cemetery and interred alongside my granddad, laid to rest seventeen years earlier.

After all this, what I'm most shocked with is myself. For quite an extended period of time, I believed this stuff. I took part in the rites and rituals, saw value in the prayers and songs and material paraphernalia. And it wasn't even that long ago: I was a practising Catholic up until about ten years ago, a lapsed one for about five years after that, finally moving on to agnosticism and finally atheism over the course of the following two or three years. Not coincidentally, all of this happened alongside actually reading the bible, learning about its origins, learning about other religions, and seeing the harm inflicted by the church thanks to its views on contraception, sex education, and homosexuals.

How times change.

Saturday 21 August 2010

Net-Connected Consoles with Hard Drives Deliver Poor Quality Games

A while ago, I bought Uncharted 2 for the PS3. Unfortunately, with the arrival of my daughter into the world, it was one of those titles that barely got loaded at first.

Today, I put the disk into the console, and then BAM!, several hundred megabytes of updates are required before I can play the game. It would appear that there have been one or two bugs in the shipped version.

Which got me wondering: why, with the console's predecessors, was this never an issue? The answer is kinda obvious: you've got a network, a hard drive and a very competitive market. With previous generations of console, you had to make damn sure that what you burned onto that CD for shipping was a quality product. Your update channel amounted to a return of the physical medium for a fixed copy. Not very attractive. Now, however, you can ship with any half-arsed, bug-ridden product and patch it later.

One thing that console games used to have over their PC siblings was that they just worked. Stick the disk in and go. No configuring audio and video drivers, no checking the specs of your machine against the overly optimistic listings on the side of the box (only to find out that the screen shots on the packaging must have been taken from some next-generation video hardware), and no patching shoddy software with updates to fix problems that should never have made it through testing.

EDIT: apparently, a couple of hundred megabytes of patches aren't enough. It took only a half hour of playing (in the raid on the museum in Instanbul) to be bitten by this glitch:

uc2-bug.jpg

Sunday 1 August 2010

Encoding x264 Video for the iPod Touch with mencoder

Update, 18-Aug-2012: I've changed to using an ffmpeg/mplayer combo to do this, as it's much more reliable and stable. See my new post for a breakdown.

I tend to view a lot of video content on my first-generation iPod Touch. It's great for travelling, with its these-days-paltry 16GB capacity able to store well over a dozen half hour episodes of whatever I'm following at the time.

While there are some wonderful graphical encoders out there (HandBrake springs to mind), what I was looking for was something I could script. I know that HandBrake has a command line interface, but I prefer mencoder's support for embedded subtitle streams, which is something I use often.

If you're on a fairly recent SVN of mplayer (say >= r31363), you'll find that mencoder now supports a profile in x264encopts. This is important! The default is high, which the iPod explicitly doesn't support. What you need is baseline, leading to something like this:















mencoder INPUT-FILE -o OUTPUT_FILE
 -vf scale=480:-10,harddup# resize the video to whichever height is suitable for the max 480px width
 -sws 9# Choose a really good scaler (lanczos)
 -of lavf# use lavf for output
 -lavfopts format=mp4# specifically, mp4
 -oac faac# AAC audio for output
 -faacopts mpeg=4:object=2:raw:br=128# Audio coding parmeters
 -mc 0 -noskip# Really work at keeping A/V sync
 -ovc x264# x264 video
 -x264encopts nocabac: bframes=0: level_idc=30: global_header: threads=auto: subq=5: frameref=6: partitions=all: trellis=1: chroma_me: me=umh: bitrate=768: profile=baselineVideo coding parameters. Note the baseline
 -aid 0 -sid 0# Audio and subtitle tracks
 -subfont-text-scale 4# Better subtitle scaling for an iPod sized device



(or, for a more cut n' paste friendly version:

mencoder INPUT-FILE -o OUTPUT-FILE -vf scale=480:-10,harddup -sws 9 -of lavf -lavfopts format=mp4 -oac faac -faacopts mpeg=4:object=2:raw:br=128 -mc 0 -noskip -ovc x264 -x264encopts nocabac:level_idc=30:bframes=0:global_header:threads=auto:subq=5:frameref=6:partitions=all:trellis=1:chroma_me:me=umh:bitrate=768:profile=baseline -aid 0 -sid 0 -subfont-text-scale 4)

This transcodes the source in a single pass. Lots of people strongly advocate two-pass encoding, but really, I find the quality of a single pass encode good enough for the iPod screen. There's no denying that two-pass is higher quality, but the extra time to encode disposable content just isn't worth it in my opinion.