Archive for the 'Development' Category

Playing with the new Pigment

February 25th, 2009

Loïc finally committed the initial version of the new Pigment v0.5 last week. I’ve been waiting for it for quite some time, as it was supposed to have the real third dimension, custom geometries, scene graph and more. So I’ve spent last few nights playing with it, finally being able to implement some of the ideas into a quick demo.

Check the video, what you’ll see is a combination of the new Pigment, gstreamer and a few hundreds of lines of Python code, displaying simultaneously a couple of video files and a live webcam capture on some non-flat surfaces.

(click to play, high quality ogg/theora, ~35MB)
(YouTube version for the non-oggers)

Yes, you can see it crashing at the end of the video. And can you spot a minor bug appearing a couple of times here and there? Just keep in mind that it’s an early preview of a something that has not even reached trunk yet. And I bet some feedback from people trying to do more blingy things with the new Pigment will help make it stable in no time.

Flash Vorbis player

October 3rd, 2008

Yes, it’s been quite some time since I last posted. And yes, it’s been even longer since I promised something here, and still haven’t delivered. And no, there will be no excuses.

Instead, how about I share one thing with you…

The name is: FVorbis. Which stands for more or less “Ogg and Vorbis in Flash”. That’s right, pure ActionScript 3 implementation of the Ogg and Vorbis libraries that require no kind of native support from the Flash Player. A simple Vorbis player implemented using the new FVorbis lib compiles to about 46KB SWF file. And that’s it.

The source is actually written in haXe, not ActionScript, but the haXe compiler is able to produce proper AVM2 bytecode and put it into an SWF file that can be used with Flash Player all the same. Plus, using haXe has its numerous advantages.

The implementation relies on some new features that appeared in Flash Player version 10 (of which beta/RCs are available already for the most common platforms). That includes the new flash.Vector type and ability to generate sound programmatically.

For a very rough performance estimation: a ~50 seconds Vorbis file decodes completely in about 3-4 seconds at full speed of a single CPU core on my machine. In a player designed to decode at minimum speed allowing it to keep audio device playing continuous stream the CPU usage is at 5-15% of a single core. The machine is Core 2 Duo 2.6 GHz.

So, if you don’t have Flash 10 installed yet - go grab the latest version, and head to the first FVorbis demo at:

The source code’s public bazaar branch is currently at:

The haXe/Flash implementation of the Ogg and Vorbis libraries has been initially auto-translated from the Cortado’s JOrbis code, followed by several-thousand-lines patch transformation and manual type and system library call changes and adjustments. Followed by further fixing of imperfections of the automated translation and tedious hunting of a bug in haXe compiler. The patches for haXe compiler - adding support of the flash.Vector, SampleDataEvent, and forced tagging of generated swf files with version 10 - are included in the branch. In case you would like to play with the libraries yourself…

At this point great many thanks need to go to the whole Xiph.Org team for Vorbis and more, to the Fluendo group for Cortado and a hacking environment, to the author of the JOrbis for java implementation and to Tor-Einar Jarnbjo for inspiration.

Update: the project is now hosted on Launchpad.

Oh, I’m green again

December 10th, 2007

It seems every time my face appears on Planet Gnome it’s composed of more and more pixels. I probably don’t even want to think about the next time… :P

Anyway, be sure to check out the video (Theora!) in this Florian’s post which features not only my aforementioned face but also some seriously cool mix of Python and Pigment, the combination that has some serious potential to rock and kick (and pretty soon, according to what I can hear from the Elisa/Pigment “department” on the other side of the office).

Remixing one of my favourite British men:

Everything is good
And brown
Oh, I’m green again
With a sunshine smile upon my face

FLAC support in Mac OS X 10.5 “Leopard”

October 28th, 2007

The rumour about FLAC support in Leopard started appearing more than one year ago. As rumours go, that one was pretty vague - nonetheless some people managed to infer that iTunes would support it as well, naturally. I must admit that at some point, due to a certain person that shall remain unnamed, I got quite confused myself.

On Friday Leopard has been released. Yesterday I’ve spoken on IRC about the FLAC support with some users that already have 10.5. Then I played with the developer kit for Mac OS X 10.5, now available to everybody. And I have my answer.

Xcode 3.0 developer kit contains some new examples in /Developer/Examples/CoreAudio. One of them is an example implementation of AudioCodec compressor and decompressor for FLAC streams (as in “streams of logically related bits” not “network streams”). To build that codec you would need to, following included README, download FLAC source distribution, copy some of the source files into a subdirectory in the example AudioCodec implementation, edit one of the copied files and build the whole thing in Xcode. After it builds the resulting bundle needs to be copied into /Library/Components. From the README: “You now have a working FLAC encoder and decoder on the system.”

Right. What you still don’t have is any way to extract those FLAC-formatted bit streams from the files FLAC usually comes in, like .flac or occasionally .ogg files, to be able to use your new and shiny codec to decode them. You still don’t have a way to put those FLAC-formatted bit streams into a .flac or .ogg file. Possibly 10.5 comes with some tools, or some more D.I.Y. examples, to manipulate CoreAudio Files (.caf) or maybe even QuickTime (.mov) files, so you can store and extract those FLAC-formatted bit streams in/from those Apple-specific file formats. But still, neither QuickTime Player nor iTunes won’t be able to play .flac files even if you build and install the example codec.

And that’s it. That’s the FLAC “support” in Leopard, as far as I know. Expected more? Sorry, move along.

If you are a XiphQT user you had the same “support” for FLAC decoding more than a year ago, when version 0.1.5 had been released. Except it included support for FLAC in .ogg files. I know, to many people that’s next to useless, but still. And XiphQT’s code for decoding FLAC is roughly half the size of the Apple’s example and doesn’t have loops copying data between interfaces sample by sample! Even a simple thing like multi-channel mappings is incorrect in their implementation - they either didn’t bother to read the FLAC specification or didn’t bother to implement it properly, because it’s hard to believe they don’t know how to use their own API. Nice “example” Apple!

At this point there’s only one more thing left to write. Expect native FLAC file format support in XiphQT soon.

XiphQT 0.1.8, as promised

September 2nd, 2007

OK, XiphQT 0.1.8 is now out.

The previous, 0.1.7, version was quite stable except for one crash/freeze-causing issue that was discovered soon after the release, was fixed soon after the discovery, then spent another 5 months or so in the repository. Those selected few who bothered reading my comments on the trac, of those few who actually went to the trac to file a ticket on that bug, could find out there was a binary dev snapshot with a fix, available as soon as the source code was fixed. But it seems most of the users couldn’t find it. Now that it’s been released that’s taken care of.

One very warm and fuzzy thing about 0.1.8 is the resolution of the video stalling issue. So, no more attempts to find a Linux box (or tempting thoughts of replacing the current OS with a Linux on my “Macintosh HD”) every time I come across an Ogg/Theora URL!

Late summer XiphQT news

August 26th, 2007

OK now, who said XiphQT is dead?

I should make one thing clear: I don’t really like QuickTime. I have a kind of love-hate relationship with XiphQT, like in “love Xiph, hate QT”. After periods of development activity I get to the point where my stomach hurts more often than it should and the percentage of aggressive and explicit sentences spoken aloud be me rises way above the acceptable level. So then I stop and sometimes it takes longer than shorter to be able and want to work on XiphQT again.

Anyway, it seems today I managed to reduce the video stalling issue in the importer code almost completely - initial and more sophisticated approach didn’t work but the one borrowed from Perian did.

Other news is that Ivo Emanuel Gonçalves made a Windows installer for XiphQT - many thanks Ivo! Now, if only somebody could update the Windows port too, because it’s still at 0.1.5, that would be just awesome!

Also, there’s been quite a number of trac tickets about why the official project page doesn’t say anything about the most recent development snapshot, which fixes quite an annoying iTunes crash issue. Words like “silly” also appeared in some e-mails I got on that subject. And I totally agree. And intend to fix it.

That may actually mean a release. And because I’ll be going to Poland the first weekend of September - that may actually mean a release quite soon. Yay!

Ogg Vorbis handling regression fixed

March 28th, 2007

Recent changes in the Ogg importer component brought some regression - some Ogg Vorbis files may cause QuickTime (iTunes, etc.) to freeze or crash (ticket #1154, #1155).

The problem should now be fixed in the SVN (r12814) and a new binary snapshot containing the fix is available. Recommended to all XiphQT users.

Xiph QuickTime Components 0.1.7

March 23rd, 2007

A new XiphQT release is finally out!

The version number is 0.1.7 and while it has the property of being strictly greater than the previous version number, which was 0.1.5, it doesn’t really reflect the state of the project. I should probably annotate the version number with something like “pronounce: oh-seven-one” ;) No worries, other Xiph projects seem to have problems with version numbering, too. And I’ll just number the next release, which should be ready in much less than 11 months, with 0.8, or maybe even higher, we’ll see…

The release notes highlight the changes quite nicely. And I’ve already received some feedback on improved performance, something I wasn’t sure would be really noticeable. Overall, seems to be quite a reasonable release, definitely worth upgrading - get it if you haven’t done that yet.

Xiph, QuickTime Components and Summer of Code 2007

March 17th, 2007

Once again, Xiph.Org has been accepted for Google Summer of Code! And amongst Xiph project ideas for this year XiphQT also has its place. So, if you ever wanted something in XiphQT fixed or wished a new feature was added but never had quite enough arguments to convince yourself it’s worth actually trying and doing it yourself - maybe now is the time?

Of course, XiphQT is only a small part of Xiph.Org. If you’d prefer to hack on a more general and open audio and media stuff, there aren’t many limits, neither. Last year, besides the directly project-related ideas proposed by Xiph developers, we saw a number of original and interesting submissions ranging from nearly pure hardware to fairly sophisticated algorithms, with FCPGAs, assembler, libraries and applications in between, all one way or another related to audio and media. And participating in the event was quite an experience, too!

All that is, basically, to say: whether you would like to add Ogg Skeleton, OggPCM or CMML support to XiphQT, apply FLAC to compression of power system analysis (ATP) data, work on a next generation audio codec or do something completely original (preferably it having relations to audio, open media or Xiph technologies) - come see us on irc (, #xiph) and consider applying. There’s still enough time (until March 24th) to prepare at least one quality application!

Exporting Oggs from QuickTime

November 12th, 2006

Committed the code for the new OggExport and CAVorbisEncoder components. You can find in the Xiph.Org’s SVN repository.

The new bits are alpha software, thus hard hat equipped testers are welcome!

At the moment the exporter will produce Ogg Vorbis files, with quality fixed at 0.4 (~128kbit/s) ignoring any user-set options. But at least in QuickTime Pro and iMovie it seems to work.

More features should follow soon…