Previous Entry Share Next Entry
More jheora stuff
By now I patched Wikimedia's Cortado/jheora fork to play back any valid Theora bitstream with 4:2:0 subsampling. This is mostly a matter of properly consuming bits from the bitstream used for non-VP3 features (e.g. per-block qi indices).

Also, I hardened jheora and the jst-component using jheora to not simply stop playback whenever an exception occurs within the decoder. Upon losing sync of the bitstream (e.g. when the bitstream is damaged) corrupted values may end up getting used as array indices later on - which of course usually lead to an ArrayOutOfBoundsException. The decoder now catches all exceptions and returns appropriate error codes (well, in fact just BADPACKET). The playback component can then decide to continue (the next packet may be fine anyway) or not. The new default behaviour is to just continue decoding. I tested this "error recovery" by randomly consuming bits in the decoder during various stages of decoding, thus wrecking the bitstream on purpose. This results in colorful block-storms and all imaginable sorts of corruption - but playback won't stop, which I consider a much better behavior than just giving up.

Anyway: Thusnelda, the Java world is prepared for you, so don't hesitate to replace the old encoder! ;-)
Tags: , , ,

  • 1
Hi, maikmerten. All these improvements in Cortado sounds really great. ;)
We are working in a project to streaming of live opensource events.
Can I send you more informations about that ?

Sure, feel free to send me information about your project. Streaming open-source events is perhaps *the* classic Theora/Cortado use-case ;

I'm not an expert in Ogg, but we are using Icecast2 and Cortado player to make a webradio, the problem is that when we send metadata in the stream the player stops after each song. Is it a player problem or just a metter of wrong configuration?

Most likely a player issue. Did you try the Vorbis playback applet from ? This should do fine if you're streaming audio-only.

  • 1

Log in