Hacker News new | past | comments | ask | show | jobs | submit login

You can put basically anything in Ogg. I toyed with the idea of putting logs in it - A log file is append-only, same as encoding a video. It has a field for timestamps already. You can use Ogg's binary seeking to quickly find positions / ranges within a log file without building up an index. It's got checksums too, I think.

It was a "nifty but who really needs it?" idea




I once made a custom Ogg stream for a simple multimedia document format [1]. The idea was that I wanted to have AV streams in the same file as basic vector graphics slides, and back in 2008 it was Ogg that had some open source momentum.

It worked, but my experience was that Ogg isn't really a well-designed container at all. Even QuickTime / MPEG-4 with its 1990s warts is more flexible and efficient. I would definitely pick Matroska today if I really wanted to torture myself with this kind of document format again.

Somebody else wrote more eloquently about Ogg's bizarre design choices:

https://hardwarebug.org/2010/03/03/ogg-objections/

"The variable overhead in the Ogg format comes from the page headers, mostly from the segment_table field. This field uses a most peculiar encoding, somewhat reminiscent of Roman numerals. In Roman times, numbers were written as a sequence of symbols, each representing a value, the combined value being the sum of the constituent values.

"The segment_table field lists the sizes of all packets in the page. Each value in the list is coded as a number of bytes equal to 255 followed by a final byte with a smaller value. The packet size is simply the sum of all these bytes. Any strictly additive encoding, such as this, has the distinct drawback of coded length being linearly proportional to the encoded value. A value of 5000, a reasonable packet size for video of moderate bitrate, requires no less than 20 bytes to encode."

- -

[1] https://github.com/pojala/twentytwenty/blob/master/twtw-ogg....


.logg - haha


That's so clever that now I have to do it lol




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: