Firefogg: Transcoding videos to open web standards with Mozilla Firefox

Firefogg: Transcoding videos to open web standards with Mozilla Firefox


GNU/Linux has never been short of audio and video players, but they live in a world of multiple codecs, chief culprit amongst them being MP3, AAC, WMA and (Adobe) Flash. I say "culprits" because they are not free and open codecs. They are encumbered by patents; most websites with embedded audio/video use them and most of the people who view them are also using other patented software: Windows. GNU/Linux is a good alternative and all distros come bundled with free and open multimedia alternatives too: Ogg. You would not be surprised that these players can handle Ogg but what if I told you that Mozilla's Firefox browser could not only handle this codec but could be used also to transcode videos to that format? Interested? Read on.

Firefox, thy name is versatile

It goes without saying that the Ogg codec has the unconditional support of Richard Stallman and the Free Software Foundation--but wanting doesn't get

One of the constant bugbears about viewing multimedia content on the web is the need for third-party plugins, especially for proprietary plugins like (Adobe) Flash. The free software community has responded with a non-patent version called Gnash, with limited success. It's still a plugin though, free or not; besides, the number of websites hosting Ogg as the basis for their streaming software can probably be counted on the fingers of one hand. It goes without saying that the Ogg codec has the unconditional support of Richard Stallman and the Free Software Foundation -- but wanting doesn't get. For example, I own an ageing iRiver MP3 player. It is one of the few that also supports Ogg but that seems a little superfluous given that so few sites offer it.

In an effort to redress the balance the web community is developing an embedded video tag in HTML5 (supported by Mozilla, Google Chrome and Apple's Safari but not Microsoft) which would bypass the need for plugins. It supports both Ogg and the more prevalent H.264 format used on YouTube. (The fate of Ogg and HTML5 seems to be inextricably linked). The battle is on for which one (or both) will become the normative codec. H.264 has patent issues; so, if you want an unencumbered codec it's got to be Ogg. For a good summary of all the codecs and issues involved see Roughly Drafted Magazine.

Of course you will have spent many hours downloading videos from the web and they will mostly be in non-free formats. There is nothing to prevent you doing a post download transcode to Ogg. As I said earlier, GNU/Linux is not short of multimedia players, as a quick visit to Linux links will show. Some of them also support the ability to transcode.

You knew I was going to invoke those handy little helpers

VLC is the Crab Nebula of multimedia players. It has one of everything and can handle virtually everything you can throw at it (including some you features you may not know about) but for transcoding small videos it may be overkill. VLC, Kino, Cinilerra and HandBrake are good at doing the heavy lifting on feature length videos but many of us are more used to dealing with videos of lengths common to sites like YouTube. and this is where Firefox comes into its own. With a little help from an addon called Firefogg. Yes, you knew I was going to invoke those handy little helpers.

Let Firefogg take the strain off the server

You won't find Firefogg at the official Mozilla Addons site. You'll have to get it on the Firefogg homepage which contains the link to install it. The big advantage of this addon is that it relieves the site to which you are uploading a video of the need to do the heavy lifting involved in actually transcoding. As the algorithms for transcoding become more complex and efficient, demands on processors grow. So, executing transcoding usually doesn't sit well with concurrent tasks on slower computers.

The downside of using Firefogg is that it depends absolutely on an internet connection. You are dependent on a good, steady and reasonably fast connection but if that connection is broken Firefogg has been designed to allow upload resumption. If you are away from access to the internet you'll have to rely on a stand-alone desktop application instead -- which is fine if you ignore the real point that Firefogg was designed primarily to convert and upload video to a website capable of hosting Ogg content. (At the moment it only supports two sites with two more to follow soon, one of which will be Wikipedia.)

However, if you are also on another machine without the desktop apps to do the conversion, then Firefogg can fill the gap. The extra good news about Firefogg is that it is impeccably free and open. It seems to have started life at the Google Summer of Code as a project for Xiph.org to "create a Firefox extension that will record sound locally and then stream to an Icecast server", but as often happens it has gone off in other interesting directions.

Well, that's the theory. How does Firefogg stack up in practice? First, catch you addon. Head over to the site and grab a copy. You'll need Firefox version 3.5. The frontpage has the addon link. Install it and restart Firefox (quick moan: When, oh when, is Mozilla going to do as both Opera and Google Chrome/Chromium do, and install this kind of thing, without the necessity for a restart?). And don't forget to enable Javascript in the browser too.

Figure 1: Firefogg install pageFigure 1: Firefogg install page

The primary function is to upload Ogg videos to a website but you can just as easily use it to convert copy on a local hard drive--and save it to your hard drive or other device. I do have KDE service menus for video and audio conversion but they are specific to one computer. Firefogg can be used anywhere with an internet connection.

Once Firefox is up and running again, click on the link make Ogg Video on the right-hand side of the frontpage and a new link will appear, Select file:

Figure 2: From here select a local fileFigure 2: From here select a local file

Select a video or video clip to convert. I have a collection of video in various formats, including MP4 and Flash. The file dialogue window will open:

Figure 3: Local file directoryFigure 3: Local file directory

I opted to convert an MP4 video of James Taylor (who else?) to Ogg. Once the file has been selected Firefogg offers the user a default encoding option but there is a good selection of other, more advanced options:

Figure 4: Default and advanced optionsFigure 4: Default and advanced options

Expanding Custom settings reveals a very clever user choice. If the video (clip) you are converting is for uploading to a website or for embedding in your own website Firefogg offers the sensible option to encode with low bandwidth, for obvious reasons. If you're saving your Ogg conversion to a local machine you can opt for the high quality version, though this will result in longer conversion times and a bigger file. Using the highest available settings for audio and video resulted in a 10MB spread in final file sizes for the James Taylor video. Firefogg also offers two-pass encoding which is generally held to give the best results but that is probably more true for the H.264 codec.

It appears that Microsoft are not the only purveyors of FUD

According to the Floss Manual site it's real value lies in fitting a transcoded video onto fixed media like a CD or DVD -- and that requires some elementary sums and recourse to the command line. That would be superfluous for uploading to websites or saving copy to a capacious hard drive. In any case, the difference in quality, bitrate and file size wise, between a YouTube H.264 video and a transcoded Ogg video file is negligible. It appears that Microsoft are not the only purveyors of FUD. That's quite a decent set of options. Of course it's nice to have the comfort zone of a nice point and click GUI but you still need some knowledge about the terminology of audio/video settings. The simplest feature is under Encoding range. Expand it and Firefogg reveals a useful feature for anyone who just wants to convert, save, or upload a section of audio or video by specifying the start and finish time.

Firefogg's developers have added a nice touch here. Toggable, sticky help. Hover your mouse over the blue info icons on each sub menu and some of the terminology becomes a little clearer. In some instances there will be a hyperlink to explore a term further at Wikipedia (for example, Framerate, for which Firefogg offers a maximum of 30 and Aspect ratio which offers two common settings, 16:9 and 4:3).

Firefogg presents the user with a nice progress bar and when encoding is finished it offers the final flourish of a preview (courtesy of the HTML5 video tag) with the option to save the output--either as a copy on a local hard drive or an removable device. The other option offered is to "send video", that is, to upload it those sites currently capable of using Firefogg.

Figure 5: Firefogg's preview and save optionsFigure 5: Firefogg's preview and save options

If you are hosting your own site you can use Firefogg's Javascript API to embed Firefogg capability. (If you are going to embed Firefogg in your site people have already been busy designing widgets for it and you can grab some ready made ones over at Ohloh.net if you can't be bothered to make your own.) The API offers an option to transcode/upload or to encode and initiate a regular multipart HTTP POST thereafter. In the Wikimedia Commons version of this you get a bonus: the file is not only converted and uploaded to the site but also thoughtfully deposits a copy on your local drive alongside the original. A win win situation.

Conclusion: transcoding in the cloud?

the core of Firefogg's purpose is revealed in the support it gets from the FSF, Richard Stallman and Wikimedia Commons

The thinking behind the development of Firefogg places it centrally in the battle for adopting open and free video standards on the web. It was never intended as a stand alone application for transcoding multimedia on the desktop, but clearly you can use it like that. As with so many other projects, other developers come onboard and take it in other slightly directions and extend it; however, the core of Firefogg's purpose is revealed in the support it gets from the FSF, Richard Stallman and Wikimedia Commons.

The Firefogg developers are certainly committed to free and open standards. In addition to Ogg they plan to add support for Flac, Speex("a free codec for free speech" and part of the GNU Project) and Celt(used by or supported by Ekiga, a free alternative to Skype). Support for uploading to Wikipedia is promised but if you can't wait and you want to explore further you can go to test.wikipedia.org, add the Add Media Wizard and a Firefogg upload button will be added.

Firefogg? Well, every little helps

Chris Blizzard at Mozilla has written a Greasemonkey userscript called Theoratube which syncs with Firefogg to scrape YouTube videos, transcode them to Theora and stream them back to the browser via a private URL. Bland explains how it works on his website.

The common thread in all of these developments is the ability to promote open multimedia standards across the web, using the web itself as the platform to transcode in the cloud so to speak. As usual, the digital curmugdeon is Microsoft and Internet Explorer. However, the more people switch to Firefox and Chromium the more they bypass the barriers to HTML5 and Ogg adoption. However, it's still something of an uphill struggle to establish and maintain free and open standards against the weight of vested proprietary interests. Firefogg? Well, every little helps.

Category: 

Comments

Mechoros's picture
Submitted by Mechoros on

Hey Gary,

I commented or posted something else and I was informed there was a reply to this, but I can't find it?! It was about Firefogg on my computer just not starting to encode videos. Am I missing something here or how do I see this response?!
Cheers,
Mechoros

Ryan Cartwright's picture

Is it possible you clicked Preview and then closed the browser without clicking Post Comment? I've done this a few times myself.

--
Equitas IT Solutions - fairness, quality, freedom
http://www.equitasit.co.uk

Mechoros's picture
Submitted by Mechoros on

Hey Ryan,

thanks for your post, maybe I forgot that, will try to really publish and not only preview my comments...
Anyway, my problem with Firefogg is still the same, I select a video to be transcoded, and then just nothing happens. I tried several files with different codecs, all to no avail. I tried in a new Firefox window instead of a tab, still nothing happens after I select a file. I am using Firefox 3.6.3, and Firefogg 1.1.3. Windows XP.
Is there anything that springs to your minds?
Thank you.
Mecho

Author information

Gary Richmond's picture

Biography

A retired but passionate user of free and open source for nearly ten years, novice Python programmer, Ubuntu user, musical wanabee when "playing" piano and guitar. When not torturing musical instruments, rumoured to be translating Vogon poetry into Swahili.

Most forwarded

Interview with Dave Mohyla, of DTIDATA

Dave Mohyla is the president and founder of dtidata.com, a hard drive recovery facility based in Tampa, Florida.

TM: Where are you based? What does your company do?
DTI Data recovery is based in South Pasadena, Florida which is a suburb of Tampa. We have been here for over 10 years. We operate a bio-metrically secured class 100 clean room where we perform hard drive recovery on all types of hard disks, from laptop hard drives to multi drive RAID systems.

Anybody up to writing good directory software?

Since the very beginning, directories (of any kind) have had a very central role in the internet. (I have recently grown fond of Free Web Directory. Even Slashdot can be considered a directory: a collection of great news and invaluable user-generated comments. As far as software is concerned, doing a quick search on Google about software directories will return the free (as in freedom) software directories like Savannah, SourceForge, Freshmeat and so on, followed by shareware and freeware sites such as FileBuzz, PCWin Download Center and All Freeware (great if you're looking for shareware and freeware, but definitely less comprehensive than their free-as-in-freedom counterparts).

Interview with Mark Shuttleworth

Mark Shuttleworth is the founder of Thawte, the first Certification Authority to sell public SSL certificates. After selling Thawte to Verisign, Mark moved on to training as an astronaut in Russia and visiting space. Once he got back he founded Ubuntu, the leading GNU/Linux distribution. He agreed on releasing a quick interview to Free Software Magazine.

Is better education the key to finding better software?

I read David Jonathon's article Anybody Up To Writing Good Directory Software? the other day, which got me thinking about software directories in general. As David mentioned, many of the software directories one finds when doing a quick google search are free as in beer, not as in freedom. But what interests me is the software directories that already exist, providing a combination of both free as in beer software, and open source software. Sites such as Freeware Downloads and Shareware Download don't advertise themselves as providing free as in liberty software, but each of them have a good selection of open source software available... if you know where to look.

Most emailed

Free Open Document label templates

If you’ve ever spent hours at work doing mailings, cursed your printer for printing outside the lines on your labels, or moaned “There has got to be a better way to do this,” here’s the solution you’ve been looking for. Working smarter, not harder! Worldlabel.com, a manufacture of labels offers Open Office / Libre Office labels templates for downloading in ODF format which will save you time, effort, and (if you want) make really cool-looking labels

Creating a user-centric site in Drupal

A little while ago, while talking in the #drupal mailing list, I showed my latest creation to one of the core developers there. His reaction was "Wow, I am always surprised what people use Drupal for". His surprise is somehow justified: I did create a site for a bunch of entertainers in Perth, a company set to use Drupal to take over the world with Entertainers.Biz.

Update: since writing this article, I have updated the system so that the whole booking process happens online. I will update the article accordingly!

So, why, why do people and companies develop free software?

More and more people are discovering free software. Many people only do so after weeks, or even months, of using it. I wonder, for example, how many Firefox users actually know how free Firefox really is—many of them realise that you can get it for free, but find it hard to believe that anybody can modify it and even redistribute it legally.

When the discovery is made, the first instinct is to ask: why do they do it? Programming is hard work. Even though most (if not all) programmers are driven by their higher-than-normal IQs and their amazing passion for solving problems, it’s still hard to understand why so many of them would donate so much of their time to creating something that they can’t really show off to anybody but their colleagues or geek friends.

Sure, anybody can buy laptops, and just program. No need to get a full-on lab or spend thousands of dollars in equipment. But... is that the full story?

Fun articles

Santa Claus - the most successful open source project

It dawned on me the other day, as I was shopping for the dozens of gifts it seems I have to buy every December, that Santa Claus is the most successful open source project in history. (Bridget @ Illiterarty would agree with that). Santa Claus is essentially a marketing development that is embodied by everyone who stuffs a sock, gives a gift, hosts a dinner or wishes Merry Christmas over the holiday season.

Most emailed

Editorial

When I first started thinking about Free Software Magazine, I was feeling enthusiastic about the dream. I had Dave, Gianluca, and Alan willing to help me, I had established members of the free software community willing to help me out, I had writers volunteering their time and energy for free, and I had a generous offer from OpenHosting for servers, all before I'd proved myself. There was a sense of excitement in the air, and I thought maybe, just maybe, I could make this work.

Free Software Magazine uses Apollo project management software and CRM for its everyday activities!