Archive for the 'Open source' Category

Page 2 of 5

DVDs, MP3s, YouTube, and other hindrances to free software

Update (2009-05-20): 1080p and standard definition videos of the talk in Theora/Vorbis are now available. See below for details.

I presented a talk entitled “DVDs, MP3s, YouTube, and other hindrances to free software” (abstract) today at FOSSLC’s Summercamp 2009 (#fosslcSC09) in Ottawa. Here are the slides:

Here are the videos (all videos are Copyright © 2009 FOSSLC, licensed under Creative Commons Attribution-Share Alike 2.5 Canada):

  • Videos recorded on JVC Everio GZ-HD40U video camera (high-quality; recording was started a few seconds into the talk):
  • Videos and data created by the ePresence system (low-quality, include slides):
    • ePresence page; Flash video with slides
    • Ogg Theora/Vorbis video at 320×240 (75.3 MiB). This video becomes out-of-sync during the Q&A period, but should be fine otherwise. If your browser supports the video tag with Ogg Theora/Vorbis, the video will appear below:
    • FLV Sorenson/Speex video at 320×240 (66.3 MiB). This is the source video used on ePresence page. I can provide details on how I transcoded it to Theora/Vorbis if there is interest.
    • Extra data from ePresence page (slide images, XML data) (3.5 MiB)
    • Slide timestamps XML file (part of extra data above). These would be useful for re-implementing the ePresence page using JavaScript and the video tag instead of Flash. If you have some code that does this, feel free to share it in the comments here. It is likely that such a solution could be easily adapted to work with other ePresence videos, including other FOSSLC videos.

Please feel free to re-encode or transform the above videos in whichever ways you wish. Besides syncing the videos with slides in a standards-based way, you may want to trim the videos to the start and end of the talk or re-encode them to a different resolution.

If you would like the source files for the HD version, which are in MPEG-2, please let me know. They are quite large (about 8 GiB in total) so I haven’t posted them here.

Slide errata:

  • The “Why do we care?” slide should have mentioned the Gdium Liberty, a netbook that uses a MIPS processor, as an example of a product made by a small company, which does not have the resources to license Flash or codecs. Reducing people’s reliance on Flash and royalty-requiring codecs will allow many more products like this to enter the market. As it is, there are very few small companies making innovative new computers.
  • The “What can we do about patented codecs?” and “What can we do about TPMs?” slides should have mentioned alternative music stores like Jamendo, which hosts music freely-licensed by the authors and offers it for download without DRM and in Ogg Vorbis format.
  • The “What can we do about proprietary formats?” slide should have mentioned Free Youtube! and Free Slideshare!, which allow you to view YouTube and SlideShare without using a Flash player.

RiP: A Remix Manifesto downloads

I have created Ogg Theora/Vorbis and XviD/MP3 versions of the excellent documentary RiP: A Remix Manifesto. You can find them at the following locations (Update – 2009-05-10: You can pay what you want for zipped versions of these, which are about 1% smaller, at http://www.ripremix.com/getdownloads/):

I encourage you to support the creator by paying what you can at one of these pages:

I recommend the Theora/Vorbis version because it is higher-quality (853×480 pixels) and because Theora and Vorbis are royalty-free codecs (see The codec dilemma for why this is important). I also provided an XviD/MP3 version since many DVD players support this format.

If you want to remix the documentary, check out Open Source Cinema, where you can upload your own modifications to it. The videos there and the downloads listed above are licensed under the Creative Commons Attribution-Noncommercial 3.0 Unported license.

Why Ubuntu uses PulseAudio

Since version 8.04, Ubuntu has used PulseAudio as its default sound system. After hearing of various problems people have had with PulseAudio (like this one and this one), one may wonder why Ubuntu uses PulseAudio at all, especially since these problems can often be fixed by turning off PulseAudio with no ill effects. The rationale for the switch to PulseAudio in Ubuntu is laid out on this page:

https://wiki.ubuntu.com/DesktopTeam/Specs/CleanupAudioJumble

I’m providing this link in the hopes that others don’t have to search as far for the answer as I did. Here are some highlights from that document, describing the benefits of PulseAudio:

Beyond the obvious sound mixing functionality it offers advanced audio features like “desktop bling”, hot-plug support, transparent network audio, hot moving of playback streams between audio devices, separate volume adjustments for all playback or record streams, very low latency, very precise latency estimation (even over the network), a modern zero-copy memory management, a wide range of extension modules, availability for many operating systems, and compatibility with 90% of all currently available audio applications for Linux in one way or another.

The document also has an extensive list of Use cases, which demonstrate where PulseAudio can be useful. While PulseAudio has many interesting features, the majority of these are not exposed to the user through a discoverable user interface so people don’t know they exist and, thus, don’t miss them if they disable PulseAudio.

For those that are interested, I found the above wiki page by searching for Hardy Heron release notes, leading me to this page, which linked to this blueprint, whose full specification is the wiki page.

Solving the codec problem

This is a response to John Dowdell’s Put down the Flavorade and slowly back away…. post, which is itself a reply to Tristan Nitot’s Making video a first class citizen of the Web. Here it is, starting with a quote from John Dowdell’s post:
Continue reading ‘Solving the codec problem’

filtlog: Simple page hit/referrer summaries

I’ve tried a few different log file analyzers for getting stats about my web site, but they’ve all been confusing or lacking some features. FireStats is nice, but it only handles part of my site (the blog part) and I have no idea what time period it’s using in its page counts. The Webalizer is also useful, but it doesn’t understand that “/?p=266” is a different URL from “/?p=80” and its filtering options are non-obvious.

So I decided to write my own, filtlog, which you can find at:

http://github.com/ossguy/filtlog

It is very simple and easy to use. Just pass your web server log file or a set of log files to it and it will print a summary of how many hits each page got and which referrers were the most popular for each page. To make your results more accurate, you can add user agent strings of known bots to the config file, which causes those bots to be ignored in the results. You can also make the results more concise by specifying a maximum number of pages you want results for.

Because the code is very simple (50 lines of Ruby), filtlog is an excellent starting point for building more complex analysis tools. It is easy to change filtlog to organize the stats differently or provide other features like user agent tallying.

If you have any questions about filtlog, including how to use it or how the code works, post a comment on this article.

dynamic_fgets: Reading long input lines in C

Accepting lines of input that are arbitrarily long is not something the C standard library was designed for. However, it can be an immensely useful feature to have. I recently came across this problem while rewriting the file input parts of libbitconvert. Here’s my solution, modeled after the C standard library’s fgets:

int dynamic_fgets(char** buf, int* size, FILE* file)
{
	char* offset;
	int old_size;

	if (!fgets(*buf, *size, file)) {
		return BCINT_EOF_FOUND;
	}

	if ((*buf)[strlen(*buf) - 1] == 'n') {
		return 0;
	}

	do {
		/* we haven't read the whole line so grow the buffer */
		old_size = *size;
		*size *= 2;
		*buf = realloc(*buf, *size);
		if (NULL == *buf) {
			return BCERR_OUT_OF_MEMORY;
		}
		offset = &((*buf)[old_size - 1]);

	} while ( fgets(offset, old_size + 1, file)
		&& offset[strlen(offset) - 1] != 'n' );

	return 0;
}

And here is an example of how to use it:

char* input;
int input_size = 2;
int rc;

input = malloc(input_size);
if (NULL == input) { return BCERR_OUT_OF_MEMORY; }
rc = dynamic_fgets(&input, &input_size, stdin);
if (BCERR_OUT_OF_MEMORY == rc) { return rc; }
/* use input */
free(input);

To show you how dynamic_fgets works, I’ll break into down line by line and then describe some of its features:
Continue reading ‘dynamic_fgets: Reading long input lines in C’

Moonlight and the Microsoft Media Pack

You may have heard that Moonlight, the free software Silverlight plugin for GNU/Linux distributions, allows users to view certain audio and video encoded with Microsoft codecs. What may be confusing, though, is how you can do this if Moonlight is free software since the Microsoft codecs are patented (see “The codec dilemma” for details). I dug into this a bit and here’s what I found:
Continue reading ‘Moonlight and the Microsoft Media Pack’

Libre x86 C compilers for Unix-like systems

In the quest to ensure my C code is as portable as possible and, in particular, does not depend on any gcc extensions, I did some looking for C compilers that work on Unix-like x86 (32-bit) systems, are libre (“free as in freedom”), and support C89. Here is a list of the compilers I found that meet this definition and some of the caveats and benefits of each:
Continue reading ‘Libre x86 C compilers for Unix-like systems’

Evaluating codec freedom

I was recently asked about how free the Vorbis and Theora codecs are, particularly with respect to gratis versus libre. The answer to this question is more complicated than it looks and requires a deeper look into the difference between a specification and an implementation.
Continue reading ‘Evaluating codec freedom’

Blip Unembed 0.1 released

Here is the first version of Blip Unembed, a script I created to convert blip.tv embed URLs into the original blip.tv URLs and to download FLV files from blip.tv given the original URL or the embed URL:

blip_unembed.sh

The script should work on any system with a POSIX shell (such as Ubuntu, Mac OS X, or Windows with MSYS) and curl (curl is in the Ubuntu repositories and also available for Windows; curl is in Mac OS X by default). To use it, simply run blip_unembed.sh with the original URL (ie. http://blip.tv/file/1591892) or the embed URL (ie. http://blip.tv/play/lG3h1k0A) of the blip.tv video you want to see. The original URL and FLV URL will be printed and the FLV file will be downloaded. If you have any questions, please leave a comment on this post or contact me directly.

This script is the latest in my attempts to help people depend less on Flash (previous projects include Vimeo Downloader). For more details, see Why I haven’t installed a Flash player. For viewing YouTube or Vimeo videos without Flash, use Free Youtube! by Stephen Paul Weber. I suspect Free Youtube! will support blip.tv very soon.

Update: Free Youtube! now supports blip.tv, thanks to this script. Just install Greasemonkey, then Free Youtube! and you will have Flash-free blip.tv.