blog/public/posts/volatile_formats/index.html

152 lines
7.9 KiB
HTML
Raw Normal View History

2021-01-29 00:00:00 -05:00
<!DOCTYPE html>
<html class="no-js" lang="en-us" prefix="og: http://ogp.me/ns# fb: http://ogp.me/ns/fb#">
<head>
<meta charset="utf-8">
<base href="https://beckmeyer.us/">
<meta name="viewport" content="width=device-width">
<title>Volatile Formats &ndash; Joel Beckmeyer&#39;s Blog</title>
<link rel="stylesheet" href="/css/styles.css">
<link id="theme_css" rel="stylesheet" href="/css/themes/light.css">
</head>
<body>
<input class="show-hide-menu-input" style="display:none;" autocomplete="off" type="checkbox" id="toggle-1">
<div class="main">
<div class="header">
<div class="header-content">
<div class="title">
<a href="https://beckmeyer.us/">Joel Beckmeyer&#39;s Blog</a>
</div>
<div>
<div class="header-right">
<label id="show-hide-menu-label" class="clickable-header-label" for="toggle-1">
<img class="color-adapting-image" width="30" src="/images/hamburger.svg" alt="menu button">
</label>
</div>
<label class="overlay" for="toggle-1"></label>
<div class="dont-show">
Links:
</div>
<ul class="links">
<li><a href="/">Home</a></li>
<li><a href="/contact/">Contact</a></li>
<li><a href="/posts/">Posts</a></li>
</ul>
</div>
</div>
</div>
<div class="body">
<div class="body-content">
<div class="title-header">
<h1>Volatile Formats</h1>
<div class="title-header-date">
<time>Thursday, March 18, 2021</time>
</div>
</div>
<p><em>Note: This is a continuation of the thoughts I started
thinking about in my <a href="https://beckmeyer.us/posts/volatile_mediums/">Volatile Mediums</a> blog post.</em></p>
<p>The next level up from physical mediums for data storage
is the <em>way</em> that the data is stored. In the digital age,
we have a plethora of formats for storing information.
For me, one of the most interesting areas of information
storage is the analog-digital space.</p>
<p>The fundamental problem of storing audio, video, and other
replications of the physical world is that there is so much
information that we can collect with sensors
(think microphones, video cameras, etc.). It would be great
if we could go get the best camera and microphone out there,
record whatever people record these days, and have that
exact physical experience &ldquo;played back&rdquo; for us on a screen
and speaker/headphones.</p>
<p>Unfortunately, there are several problems with this. Among
those is the actual design of the sensor. It takes a lot of
careful thought, engineering, and the like to create a truly
good microphone or camera. And after all of that, this sensor
will cost something. Hopefully, that cost will correspond to
the actual technical ability of that sensor! In any case,
not everyone can have the best camera or microphone due to
any number of constraints, not just those listed above.</p>
<p>The second problem is the sampling issue. The sensor will
create some sort of output that can then be measured, or
<strong>sampled</strong>, by an ADC (analog-to-digital converter). The
very word &ldquo;sample&rdquo; belies what this nearly magical box is
doing: it is only looking at certain portions or timestamps
of the analog signal. Granted, the time between samples
can be very small (e.g. 44.1 kHz is a fairly common sample
rate for audio), but there is still some loss of signal.
Once the ADC creates these samples, it converts them into
a digital format (something that can be stored on a
CD, hard drive, thumb drive, etc.).</p>
<p>The third problem is the encoding issue. The ADC creates all
of these samples, but we need to start thinking about storage
limitations. Storing the raw output of a sensor can take a
lot of space: an average album length (40 minutes) could
easily take 400MB of space! Now, again, the physical storage
space is moving in the upward direction to combat this, but
storing isn&rsquo;t the only problem. One prime issue is internet
bandwidth.</p>
<p>The solution to this is compression, like a ZIP file. It
makes big files smaller by doing some fancy math tricks
that can be reversed by a computer to reconstruct the
original file. However, for audio/video files, another level
of compression exists which actually gets rid of some of the
information in the original file to save more space. This
is called &ldquo;lossy&rdquo; compression, as opposed to &ldquo;lossless&rdquo;
compression.</p>
<p>Great! We&rsquo;ve found a way to save more space. The problem
with lossy compression is that we have to decide which
information to throw away. Usually, this is frequencies
that the average human ear/eye can&rsquo;t perceive. But, let&rsquo;s
just say that some compression is a bit too &ldquo;greedy&rdquo; when it
comes to saving space and starts to cut into the band of
frequencies that can be perceived. Also note that
the design of these compression algorithms is an artform
and takes lots of careful consideration.</p>
<p>The final problem I want to mention is the codec problem.
There are many different codecs available today, and for
each and every one of them to be useful, you need to have a
way to decode each and every one of them. Unfortunately,
this is sometimes very difficult.</p>
<p>It could be a licensing
issue, where you don&rsquo;t have the correct software installed
or purchased to actually decode that file on your computer.</p>
<p>Or it could be a physical constraints issue, where your
computer isn&rsquo;t powerful enough to decode the file at a fast
enough rate for you to view it without stuttering,
buffering, etc.</p>
<p>Third, it could be a personal preference. Some people
have much more sensitive eyes/ears and need to have formats
that are more <strong>transparent</strong>, meaning that the lossy file
is perceptually identical to the source it was encoded from.</p>
<p>With all of these issues at play, I think there are several
key points to make:</p>
<h3 id="1-codecs-need-to-be-freely-available-for-widespread-use-with-no-strings-attached">1. Codecs need to be freely available for widespread use with no strings attached.<a href="#1-codecs-need-to-be-freely-available-for-widespread-use-with-no-strings-attached" class="heading-anchor" aria-label="Anchor"><img src="/images/chain-link.svg" class="color-adapting-image" height="20"></a></h3>
<p>Can&rsquo;t stress this one enough: we need to make sure we are
doing everything possible to not let our information die
when a corporation or individual makes a decision that
impacts the &ldquo;who, what, where, when, and how&rdquo; of their codec
usage.</p>
<h3 id="2-lossless-compression-is-good-but-it-is-not-the-only-thing-we-need">2. Lossless compression is good, but it is not the only thing we need.<a href="#2-lossless-compression-is-good-but-it-is-not-the-only-thing-we-need" class="heading-anchor" aria-label="Anchor"><img src="/images/chain-link.svg" class="color-adapting-image" height="20"></a></h3>
<p>We need to remember that not everyone has the ability to use
lossless codecs, whether that be because of internet
bandwidth limitations, storage limitation, or the like.
Instead, we need to continue to innovate in the lossy
compression space to narrow the perceptual gap between lossy
and lossless more and more.</p>
<h3 id="3-a-codec-should-never-become-obsolete">3. A codec should never become obsolete.<a href="#3-a-codec-should-never-become-obsolete" class="heading-anchor" aria-label="Anchor"><img src="/images/chain-link.svg" class="color-adapting-image" height="20"></a></h3>
<p>This one may sound weird, but the fact is, if we&rsquo;re talking
about long-term storage of information, we can&rsquo;t let codecs
die, since there may come a day where we need a codec to
decode great-grandpa&rsquo;s album that never made it big.</p>
</div>
</div>
</div>
<hr class="dont-show">
<div class="footer">
<p>Have any questions? Let me know on <a href="https://matrix.to/#/@joel:thebeckmeyers.xyz">Matrix</a>, or start a discussion on <a href="https://social.beckmeyer.us/TinfoilSubmarine">Fediverse</a>!</p>
</div>
</body>
</html>