Hacker News new | ask | show | jobs
by thakoppno 57 days ago
> Satellite TV uses a file system called an MPEG transport stream that allows multiple audio, video, or data layers to be packaged into a single stream file.

Interesting read but that part really made me question my own sanity. It’s probably just lost in translation.

3 comments

I wouldn't describe Transport Stream as a "file system" but most people probably aren't familiar with the term multiplexing. It's true if you record a TS (e.g. to a .ts file) you can later split out the different Program Streams which can hold pretty much anything.
Pedantry alert: you're generally extracting Elementary Streams from a given TS. A Program Stream is basically a variant of a TS that's meant more for files at rest - say, on a DVD, or a PS2 game (which did use MPEG-2 PS extensively in the PSS file format, except storing the audio as XA ADPCM in a data stream) - while a TS is a bit more robust for transmission
that's how it works. point a free-to-air dish at the right place in the sky, demodulate the DVB-S2 signal, and it's often IP traffic moving through mpeg transport streams.
it’s the claim of it being a file system that’s throwing me. obviously nbd but maybe my mental models broken again.
File system is the wrong word. What they should have used is file format.

It is not wrong that you can have a file (bits and bytes encoded in the shape described by a file format) on some remote point. If you have an index of those files where you can programmatically choose between multiple files that could even pass as a crude "file system". But I doubt this is what they meant to refer to.

It is likelier they wrongly assumed a file system is the system in which a file is organized, where in fact they meant file format.

I think they were going for a reasonable analogy, especially when a stream is saved to disk to have its contents extracted: each channel contained in the stream can then be thought of as a separate file, not unlike files in a zipped directory.
I'd almost call it an "interleaved archive format" for a layman, but even archive isn't quite the right word here.
The word for this in media is container file format
That's probably better, but also that's not much different on a conceptual level from a "filesystem". Both contain multiple files, and describe where in the overall image those files are. The difference is exactly in the interleaving - a multiplexed media container is somewhat constrained to a packet-based scenario, where individual packets of the constituent files are separated so that video, audio, and ancillary data all reach the decoder at roughly the same time. A pure filesystem is not constrained as such and can put the files anywhere within the container.

A filesystem stored in a monolithic file is not so constrained. I work with Harmonix games as a modder, and they use a bespoke format called "ARK", which is a two-part format. There exists one or more "ARK parts", which in implementation are virtually concatenated, and then the HDR lists a binary offset from the beginning of the first ARK part to tell the games where the individual files are. This could also be called a "container" conceptually. But none of such files are interleaved in any way except for the audio files, which use encrypted multichannel Ogg Vorbis streams plus a bespoke header to aid in seeking.

Plus, the context was explaining it to laypeople, where the specific jargon is less important than imparting knowledge and understanding.

The difference between a file system and a container format is mostly a matter of perspective - indeed OSX literally uses "disk images" as their container format. Is .zip a filesystem? You probably wouldn't want to use it natively on a disk, but for a lot of purposes it's the same kind of thing.
Many SSDs (I first learnt about the concept from those notorious SandForce SSDs [1]) also utilise compression at controller level to reduce wear.

So yeah, many SSDs are just huge, non-solid archives.

[1] https://en.wikipedia.org/wiki/SandForce#Technology

Maybe they meant "a file-based system" because they all run Plan 9.