Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: How to decode files with large number of channels and/or high sample r (Read 5667 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

How to decode files with large number of channels and/or high sample r

Suppose I have a FLAC wich uses eight channels with 384kHz sample rate.

Now, in order to work with that file, I'd like to decode it first into a PCM format. But eight channels and 384kHz sample rate can't be handled by a .WAV file, what else should I use? Also, .WAV files can't get larger than 4GB, which is quite problematic at high sample rates and high number of channels.

The other way round is interesting as well: Suppose I have eight channels, each on in his separate .WAV file, how do I combine them together to one multichannel FLAC, or lossless formats like Ogg/Vorbis?

What I need is some sort of PCM file, that stores the channels as simple values. I don't need much metadata, that can be stored in external files without problems.

Please don't ask "why do you need so many channels", or "that high sample rate doesn't make sense!". This is a hypothetical question that is supposed to help me develop software, if you must know.

How to decode files with large number of channels and/or high sample r

Reply #1
Quote
But eight channels and 384kHz sample rate can't be handled by a .WAV file

WAV can handle them btw.

How to decode files with large number of channels and/or high sample r

Reply #2
Quote
Now, in order to work with that file, I'd like to decode it first into a PCM format.
Most audio editors "work with" large files by using a proprietary PCM format for internal/temporary storage.  So you can open a large file, edit it, and save it in a format that can handle the file size.

Quote
The other way round is interesting as well: Suppose I have eight channels, each on in his separate .WAV file, how do I combine them together to one multichannel FLAC, or lossless formats like Ogg/Vorbis?
An audio editor or DAW should be able to handle that too.  The audio editor is probably going to have the PCM data in seperate arrays for each channel (but that's up to the programmer).  If you feed that data from the arrays into the CODEC correctly, the CODEC will arrange the channel data correctly. 

You'd have to dig into the code if you want to know how to directly interface with the CODECS, or how the various file formats store multichannel data.    Audacity is an open source audio editor, and there are open source CODECS too.  And there's information on MSDN... if you can find it...

I've used WAVtoAC3encoder to encode some DVD soundtracks, and it allows me to feed-in a multichannel WAV, or separate WAVs for each channel.  I think SurCode and the other professional encoders have the same option.    Since I'm working with movie-length files, I have to use 6 separate WAVs (for 5.1 digital surround).    It can actually handle non-compliant WAV files of any size, but I don't have a tool to create such WAV files.


Quote
What I need is some sort of PCM file, that stores the channels as simple values.
Take a look at the RF64 format.  The only issue is that you need software that's compatible with it...  For example, my video editor can't open RF64 files.  There may be a couple of other similar formats too... Maybe W64?