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:

http://people.xiph.org/~arek/pg/hx/test.html

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

http://bazaar.launchpad.net/~arkadini/fogg/trunk/files

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 fogg.dev 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

¡Eres estupenda!

November 23rd, 2007

There’s this book store I visit every time I’m in Moscow. Very centrally located, easy to get to. Extremely difficult to leave. Quite often I find myself being dragged out of it.

A couple of weeks ago when my mom was about to leave for Moscow I asked her if she would have time to go to that store and maybe buy some Spanish dictionaries and self-teaching books for me.

This morning my mom was finishing her Moscow - Warsaw - Kalisz twentysomething hours train journey. I texted her asking how it was going. Guess what? I got a reply in Spanish, and then a mixed Polish/Spanish(/lack of Cyrillic on both our mobiles) conversation ensued!!! Some of the messages were extremely amusingly transliterated and it was very heart-warming and funny. Did I mention my mom generally only speaks spoke two languages: Russian and Polish, though she would only admit speaking Russian and bad Polish?

¡Mamá, eres estupenda!

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!

white-boys: 0 - tourists: 1

July 29th, 2007

It turns out “all or nothing” approach doesn’t work very well with sun tanning!

Nevertheless, from a perspective of truly midland boy, that I am, I will treat today’s visit to the fine beaches of Barcelona as a success. After all, I managed to stop being a representative of a pale-white-skinned species, that hardly anybody around seems to know, and joined the ranks of the bright pink tourists. That should count for something, right?

Barcelona

June 24th, 2007

It’s been a whole month now since I moved to Barcelona.

It actually feels more like just a couple of long and exciting days, with many things happening, and my brain not really caring about recalling all the periods of sleeping and eating. At the same time, all the things going on directly before arriving here now seem so light years away.

Life is good here. Found a nice, quiet living place in the city center, about 30 minutes, or roughly one unit of my Spanish lessons, walking distance away from the office. Reason good enough to actually do the lessons on my way to work, plus I get a perfect dose of walking every day.

Managed to see a few of the more obvious landmarks, like Park Güell or Sagrada Familia, but doing worse at finding more ordinary places, like household product stores. I guess I will need more than 4 weekends to walk all the neighborhood.

Surprisingly, wave of tourists is quite a nice change after a year spent in my quiet and small hometown, especially with my, obviously biased, ears frequently catching phrases spoken in Russian and other central-European languages. The army of locals walking around in the night with six-packs of beer and trying to sell a can to every person passing by, tourist or not, is definitely more annoying.

And… the sea. Attracting both local people and tourists, so beaches are quite crowded. But for somebody who have spent all his life in mid-land places this is not really that discouraging. Besides, not many people seem to like to walk a couple extra minutes, in full sun, to get to the end of those narrow artificially elevated peninsulas cutting into the sea, where you don’t hear the city anymore, and there are only waves, wind, sun and a couple of quiet amateur fishermen.

And I get to see the sea on the weekdays at work. Fluendo’s office has a great, panoramic view of the sea and the port, and most of the developers have their desks in the “seaside” part. All those sail boats, bigger and small, leaving the port or coming back quietly and graciously is a sight that will take me some time to get used to. Not mentioning the huge ferries and ships passing by just 20 or 30 meters away from our windows…

I guess the view is one of the things that makes working at Fluendo fun. One of many things. But I’ll write about it some other time.

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.