TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

MP3 for Image Compression (2006)

344 pointsby joshumaxabout 8 years ago

23 comments

robert_fossabout 8 years ago
I just posted the article[1] that I think prompted this script to be brought up.<p>What I did instead was to run images through an audio editing tool, which lets you apply echoes or do mindboggling things like change the volume of the image. The script can be found on github[2].<p>[1] <a href="http:&#x2F;&#x2F;memcpy.io&#x2F;audio-editing-images.html" rel="nofollow">http:&#x2F;&#x2F;memcpy.io&#x2F;audio-editing-images.html</a><p>[2] <a href="https:&#x2F;&#x2F;github.com&#x2F;robertfoss&#x2F;audio_shop&#x2F;" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;robertfoss&#x2F;audio_shop&#x2F;</a>
评论 #14134197 未加载
评论 #14134478 未加载
kardosabout 8 years ago
The obvious question here is: what does JPEG encoded music sound like?
评论 #14134040 未加载
评论 #14135145 未加载
评论 #14134283 未加载
评论 #14134408 未加载
评论 #14134709 未加载
评论 #14133747 未加载
xamuelabout 8 years ago
There&#x27;s a whole subreddit for things like this. <a href="https:&#x2F;&#x2F;www.reddit.com&#x2F;r&#x2F;glitch_art&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.reddit.com&#x2F;r&#x2F;glitch_art&#x2F;</a>
bwang29about 8 years ago
Now I wonder, what happens if you add sound effect, to change pitch, tone, or widen the sound stage. What would do to the decoded image?<p>I think the 2.00 bits&#x2F; pixel result looks quite more &quot;analog&quot; with a film grain effect to me.
评论 #14133467 未加载
评论 #14133664 未加载
avianabout 8 years ago
I did something similar with Ogg Vorbis back in 2006.<p>There are also some results of experiments with the Opus codec posted in the comments.<p><a href="https:&#x2F;&#x2F;www.tablix.org&#x2F;~avian&#x2F;blog&#x2F;archives&#x2F;2006&#x2F;01&#x2F;lossy_compression&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.tablix.org&#x2F;~avian&#x2F;blog&#x2F;archives&#x2F;2006&#x2F;01&#x2F;lossy_co...</a>
ameliusabout 8 years ago
MP3 is inherently a one dimensional codec, whereas JPEG is two dimensional. No wonder it performs much better.
评论 #14134304 未加载
评论 #14133654 未加载
评论 #14134181 未加载
评论 #14133840 未加载
评论 #14134242 未加载
dheeraabout 8 years ago
Our ears are more sensitive to amplitude errors than phase errors (as a function of frequency, in frequency space). Our eyes are the opposite.
heywireabout 8 years ago
I love this. I am really hoping others come to the comments to share similar &quot;misuse&quot; of technology stories.
评论 #14133421 未加载
BinaryBulletabout 8 years ago
Not really related, but a while back I wrote a script to visualize&#x2F;hear audio generation loss with different file formats:<p><a href="https:&#x2F;&#x2F;github.com&#x2F;skratchdot&#x2F;audio-generation-loss&#x2F;tree&#x2F;master&#x2F;files&#x2F;loop01" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;skratchdot&#x2F;audio-generation-loss&#x2F;tree&#x2F;mas...</a><p>So, mp3s add a bunch of silence to the beginning of the file, and ogg files start to &quot;chirp&quot;. I never got around to putting this info in a consumable, easy to understand format though. The videos in these folders just continuously re-encode a source file w&#x2F; a given lossy format.<p>See also: <a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Generation_loss" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Generation_loss</a>
评论 #14136227 未加载
E6300about 8 years ago
It would be interesting to see if the horizontal artifacts could be avoided by feeding the pixels in a different order to the encoder.
评论 #14133572 未加载
tonymillionabout 8 years ago
They&#x27;re both based on the DCT. Mp3 (and AAC and Vorbis and more) use a modified DCT which uses block overlapping to mitigate aberrations on the block boundary.<p>Its no surprise it works, however you wouldn&#x27;t necessarily get &quot;as good&quot; compression as you would from an optimized DCT coder (JPEG etc) based on the data duplication (2x for the overlapping blocks).<p>See <a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Modified_discrete_cosine_transform" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Modified_discrete_cosine_trans...</a> <a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Discrete_cosine_transform" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Discrete_cosine_transform</a>
ManlyBreadabout 8 years ago
I wonder if it&#x27;s possible to create a set of data that produces an actual image when compressed with JPEG and an actual music when compressed with MP3 (for example, a JPEG picture of pianist that also gives a MP3 piano piece).
评论 #14139161 未加载
throwaway19373about 8 years ago
While amusing, this is bound to quite bad since the function basis is restricted to a single axis.
sakawaabout 8 years ago
Curious enough, years ago I&#x27;ve seen a blog post where the author used PNG lossless compression for FLAC audios. Guess there should be a lot of room for improving both image and audio compression, even because we&#x27;re still ending up using jpeg and mp3.
评论 #14136322 未加载
peterburkimsherabout 8 years ago
Is there a way to use image compression for MP3s?<p>I&#x27;d like to store music files in my phone&#x27;s camera roll, and easily upload them to a website where some Javascript could decode and play them.
randcrawabout 8 years ago
Now for big time shits-and-grins, add a deep learning GAN to generate a more refined signal during the decompression &#x2F; upsampling stage.<p>That&#x27;s something your Turbo Pascal code never attempted.
hgearsabout 8 years ago
I think the question really is, does it do anything for file size? If there were a radical difference in total size, the quality degradation might be an interesting compromise.
评论 #14134263 未加载
bluedinoabout 8 years ago
I remember reading an article where file data (a ZIP file I believe) was converted into a bitmap image, and then it was compressed with PNG for another few % of compression.
评论 #14135310 未加载
评论 #14135323 未加载
MrBraabout 8 years ago
What about turning the image into a sound, then compressing it with MP3, then turning it back to an image again?
jacquesmabout 8 years ago
The search for an image that encodes the Close Encounters theme is on.
gwbas1cabout 8 years ago
Where are the images???
marvyabout 8 years ago
I&#x27;m amazed this works at all!
评论 #14134955 未加载
lifterbroabout 8 years ago
Interesting!