Use H.264 for videos

Posted on 2008.04.22
Categories: Technology; Tagged with: , , , , , , , ,

I’m going to categorize this under “Technology”, since I don’t have a section on Geekie.org dedicated exclusively to multimedia.

H.264 is a really good video compression standard. It’s also known as MPEG-4 Advanced Video Coding. You can read more about the technical details on Wikipedia.

The benefit of H.264 is that the resulting output files are substantially smaller as a result of significantly reduced (low) bitrates. Yet, H.264 is able to do so without sacrificing image quality; the output video quality is often comparable to an uncompressed AVI. Trials have shown that H.264 outperforms DivX and Xvid, in terms of quality, thanks to the new features in MPEG-4 Part 10.

Apple QuickTime is one of the major video players (and encoders) which supports H.264 and is proud of it. Their page about H.264 has the following description:

H.264 uses the latest innovations in video compression technology to provide incredible video quality from the smallest amount of video data. This means you see crisp, clear video in much smaller files, saving you bandwidth and storage costs over previous generations of video codecs. H.264 delivers the same quality as MPEG-2 at a third to half the data rate and up to four times the frame size of MPEG-4 Part 2 at the same data rate. H.264 is truly a sight to behold.

Standard definition video (ie. 640×480) is imperceptibly encoded to only 1 to 2 mbps, while maintaining the same degree of quality. HD support also exists, at amazingly low bitrates (comparatively).

Unfortunately, Microsoft isn’t embracing H.264 in the same way, and neither Windows Media Player nor Microsoft Silverlight (at the time of writing) support H.264 or MPEG-4 Video. They have chosen, instead, to create “Microsoft MPEG-4″, a semi-proprietary implementation of an open standard. Shame!

If you want to distribute H.264 media, the best containers are MP4 (MPEG-4 Video), MOV (Apple QuickTime Movie), and very recently, FLV (Adobe Flash Video). Each of them can carry a H.264 stream. For instance, here is a QuickTime Movie encoded with H.264.

Software that can be used to create H.264-encoded video include:

  • Apple QuickTime Pro and other programs like Camtasia which use the QuickTime toolkit
  • MediaCoder (free and open source!), using the x264 library (also free and open source!)

You, too, can create high quality H.264 videos. Read Apple’s instructions (for QuickTime Pro) or blip.tv’s how-to. (Did I recommend blip.tv as a place to upload your videos? It’s really good.)

1 Star2 Stars3 Stars4 Stars5 Stars (2 votes, average: 3.5 out of 5)
Loading ... Loading ...

Output Buffering in PHP

Posted on 2007.11.19
Categories: PHP; Tagged with: , , , , , , ,

This article discusses output buffering and some things you can do using the ob_start() / ob_end_flush() functions in PHP. Particularly, it explains how to modify your (X)HTML output on the go using output buffering while utilizing our zlib.output_compression method mentioned in “PHP compression without ob_start“. (Strangely, that article was for not using ob_start, while this article is about using ob_start.) I also talk about some tasks you wouldn’t normally be able to accomplish without output buffering.

(more…)

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...

Yet more changes

Today marks a very important hallmark in the revisions to Geekie.org’s design. The Vistered Little theme has been used for many months, since the creation of Geekie.org, but went relatively unmodified until recently. Today, I have made changes to the theme that could justify its independent release as a WordPress theme.

Geekie.org’s theme is now no longer regarded as the Vistered Little design for several reasons.

Wallpaper

  • the wallpaper switching functionality has been disabled (there is no option for the user to change the visual design)
  • the default background will be switched every once in a while from our repository of royalty-free images
  • all background images designed for 800 x 600 and above, preferably 1024 x 768
  • all background images optimized for fast loading, especially on a broadband connection

Sidebars

  • there are now two sidebars (left and right) rather than the original one (right) and the choice for a left sidebar
  • each sidebar is now also widgets-compatible
  • fully coded in VALID CSS
  • new sidebars not dependent on location
  • all sidebar locations compatible with Firefox 2.0+, IE 7, on Windows XP/2003 at 1024 x 768
    • if you have problems, please comment or e-mail us
  • the sidebars are now loaded AFTER the main body (posts)
  • enhances the loading time (delays in loading the sidebar do not prevent the user from reading the page)
  • search engines pick up new content before considering the often-useless links of the sidebar
  • some shifts between where widgets are displayed have occurred

Advertisements

  • after some experimentation and research, leaderboard ad units (top of page) have been removed
    • they prevented more content from being shown
  • a sidebar ad (skyscraper) unit has been added on the right side
  • we will experiment with in-post ads and banners after the first post
  • the rotation of ads has been temporarily halted for performance reasons

Other

  • faster loading time with compression
  • now fully VALID XHTML 1.0 Transitional
  • CSS & JavaScript in process of being optimized
  • no more waiting for the main content - the posts are always shown first, followed by the sidebars, and lastly the ads
    • before this change, ads would need to load first before the sidebars, followed by the content (we’ve switched it around entirely)
  • less distracting advertisements
  • more useful content viewable before scrolling
  • users with JavaScript disabled or ad blocking can still enjoy full benefits (this was somewhat lacking before my modifications)
  • font design experimentation is still ongoing

In summary

Users will find the newer interface a whole lot easier to navigate and use. It has been optimized for efficiency, not necessarily performance on our server, but ease for the client. There is now compatibility (full) for Internet Explorer as well as other major browsers.

Although the site has been designed for Windows XP & above, Gecko browsers, and the 1024 x 768 resolution, I am confident that a few minor changes can easily make the site compatible with other platforms and resolutions. It is not my intention to make this site backwards-compatible with Firefox 1.5, Internet Explorer < 6, or Opera.

If you have any comments, please feel free to leave them.

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...

More changes

Posted on 2007.09.26
Categories: Geekie.org; Tagged with: , , , , , , , , , ,

Over the past few days, I’ve developed a few more ideas for Geekie.org that are being implemented. In addition to the obvious switch in wallpaper — from now on I’ll be swapping the background every once in a while — I’m also experimenting with fonts.

A user using the default theme on our web site can click on “Opt in to the Arial font beta” beneath the header title. Doing so will reload the page, and create a session variable that will show you the Arial design for as long as your session lasts. I didn’t use cookies for this particular feature, but it is a possibility. You can click to opt out if you don’t like it.

The Arial font beta will make most text a bit smaller. This usually isn’t a problem, but if it is for you, drop us a line (leave a comment) and let me know. Remember, you can always switch back.

I’ve also decided to start optimizing the site’s CSS and JavaScript files for efficiency. In the past, the site loaded way too slowly — even on a fast connection — but with the implementation of compression, and optimization, we should be getting better.

1 Star2 Stars3 Stars4 Stars5 Stars (1 votes, average: 1 out of 5)
Loading ... Loading ...

PHP compression without ob_start

Posted on 2007.09.23
Categories: PHP; Tagged with: , , ,

PHP compression is a popular feature that many have used over the years. Unfortunately, many have implemented the simple type of compression without reading what the online manual had to say - “note that using zlib.output_compression is preferred over ob_gzhandler().”

In this article, I will discuss the differences in implementation.

(more…)

1 Star2 Stars3 Stars4 Stars5 Stars (2 votes, average: 4.5 out of 5)
Loading ... Loading ...