LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 01-25-2014, 06:40 PM   #1
kktsuri
LQ Newbie
 
Registered: Jan 2014
Distribution: Mint
Posts: 22

Rep: Reputation: Disabled
Mounting Compressed Filesystem for Audio Raw Data?


Hey all,

I apologize if title doesn't make much sense I'll explain here now, did not know how to call it.

Basically, I've got several tools and applications (some of which are Windows applications running under WINE just fine) that deal majorly with RAW PCM audio. I'm talking about read-only capability here, I don't need to write to them, just read.

As you can imagine, these kind of raw PCM files can get quite big, so I was thinking of some sort of mounted filesystem like squashfs. Unfortunately, squashfs uses gz/lzma and both are very terrible for compressing audio, unless there's some tweaks to lzma I'm missing? I know in 7z which also uses LZMA you can apply Delta filters but they just don't cut it, it's bad compression and much slower than say, dedicated audio compression like FLAC.

Now, with flac I can easily compress raw PCM files and decompress them back when needed still in raw PCM format, the problem is, I have to do it sort of manually for each file, I don't even know which files I'll need at a moment. Therefore, I'd love some sort of thing I can "mount" with this.

squashfs would work great if it could have some sort of FLAC-compression or something for audio/PCM data, but unfortunately it doesn't so its compression ratio is terrible.


In short, I need something to "trick" the apps that they read from an actual raw PCM file, but in reality this is just a mounted virtual filesystem based off a compressed file like FLAC or squashfs. I can't do it with FLAC though.

It doesn't even have to be FLAC, it can be anything as long as it allows me to trick the app/mount it to a directory (so that the app sees it as raw data, not compressed) and have reasonable compression ratio for audio!

Thanks in advance and sorry if my request is kind of strange, but I was just thinking about it, since squashfs is there, maybe there's something for audio too.
 
Old 01-25-2014, 09:54 PM   #2
jackdog
LQ Newbie
 
Registered: Jan 2014
Posts: 3

Rep: Reputation: Disabled
Use flac. There are libraries available and it gives decent compression. You can also use MP3 and a host of other formats. If you go to hydrogen audio there is lots on it. File compression is useless because it compresses the wrong way and you need real time decode. Why not just convert the audio files to low bit rate MP3? Or in the alternative use native file compression on the host! That is best as it is completely transparent BUT if you want to stream where that is a different story.

Last edited by jackdog; 01-25-2014 at 09:56 PM.
 
Old 01-26-2014, 07:35 PM   #3
kktsuri
LQ Newbie
 
Registered: Jan 2014
Distribution: Mint
Posts: 22

Original Poster
Rep: Reputation: Disabled
Thanks for the answer, but I think you misunderstood me. I want to use FLAC's compression but like I said the apps deal with raw PCM audio (or just wav), so I'm asking if I can trick them in a way like squashfs does for example with apps that read normally from it (but it decompresses in the background while they read).

Right now, I can use FLAC, decompress when I need a file to temporary place/tmpfs, and then feed that file but... like I said sometimes it gets hard to keep track which files need to be decoded (and others freed, and besides, that's just more work hah). I know nothing like this probably exists but I figured to ask anyway heh.

tl;dr what I am looking for is something like squashfs but with compression suitable for audio; for example if squashfs had an option to use FLAC's compression (not just gz and LZMA), it would be perfect really.
 
Old 01-26-2014, 09:20 PM   #4
jackdog
LQ Newbie
 
Registered: Jan 2014
Posts: 3

Rep: Reputation: Disabled
Flac is for streaming. If you must have PCM then the ONLY solution is a compressed file system. Just out of curiosity what is generating the audio? Could you change the bit rate and sampling depth? This by itself will greatly decrease the size of the files. Do you know what bitrate and sample depth the receiving application requires? Can it be changed? The other thing is that 2 channel audio isnt a lot of data. A whole hours worth uncompressed is less than a GB so with drives costing 10 cents/GB this is 10 cents/hour so whats the big deal???
 
Old 01-27-2014, 06:14 PM   #5
kktsuri
LQ Newbie
 
Registered: Jan 2014
Distribution: Mint
Posts: 22

Original Poster
Rep: Reputation: Disabled
Yes, but it is more for mixing audio sources in a way rather than editing (not the files, think of it as mixing tens to hundreds of audio streams at once, instead of playing back one), and it's not only about space, the disk bandwidth as well. Most of the audio data is also with little noise and it compresses very well with FLAC. I think streaming is no problem for this.

Thanks for the response anyway; I was just interested if there's a way to use a "compressed filesystem" that can compress audio well or can use FLAC's algorithm for certain files (or all files). I don't know, wouldn't it be cool if squashfs could use multiple compression methods depending on the file, since lzma tends to compress raw audio/video poorly (sort of like RAR does automatically but only using delta filters which aren't so good).
 
Old 01-27-2014, 06:55 PM   #6
casualfred
Member
 
Registered: Aug 2012
Location: Kentucky, USA
Distribution: Slackware
Posts: 97

Rep: Reputation: 27
I searched about a bit, and there's a list of media-filesystems here:
http://sourceforge.net/apps/mediawik...diaFileSystems

However, most of them don't look very helpful. GSTFS might do what you need it to do. I think TwistedFLAC would've been perfect, but it's only for Macintosh. Good luck!
 
Old 01-28-2014, 04:57 PM   #7
kktsuri
LQ Newbie
 
Registered: Jan 2014
Distribution: Mint
Posts: 22

Original Poster
Rep: Reputation: Disabled
Thanks a bunch for that, this is the first time I hear of "media filesystems" I'll take a look into it and TwistedFLAC... I wonder is TwistedFLAC open source? would be pretty weird why it wasn't ported to Linux then. (if it is I can try look at it with my limited programming experience )

Aifffffs looks like exactly what I want except it should output raw or wavs... (since windows apps use raw/wav mostly even in WINE obviously) I can most likely modify it if it's open source because the IFF/RIFF containers are so easy to parse, but I want to know if there's something before I begin, so I'll take a closer look at others. Again, thank you for pointing me to media filesystems

Last edited by kktsuri; 01-28-2014 at 05:01 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Compressed Filesystem for Linux bypper Linux - General 5 06-14-2013 01:00 AM
How to determine if a filesystem is compressed kaplan71 Linux - General 5 09-04-2012 11:35 AM
Mounting a "raw" filesystem that has information on it Predatorian Linux - Hardware 5 09-10-2008 05:20 AM
Read compressed filesystem... Worstje Linux - Newbie 2 05-23-2004 04:36 PM
Mounting root filesystem with data=writeback Phaethar Red Hat 2 01-29-2004 04:47 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 01:46 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration